2 Copyright 2004-2005 Chris Tallon, Andreas Vogel
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29 #include "wselectlist.h"
39 class MediaListHolder;
41 class VMediaList : public TBBoxx , public TimerReceiver
47 void processMessage(Message* m);
48 int handleCommand(int command);
53 static int createList();
55 //move functions for getMedia
56 const static ULONG MV_NEXT=1;
57 const static ULONG MV_PREV=2;
58 const static ULONG MV_RND=3;
59 const static ULONG MV_NONE=0;
61 //move selection to the next matching media
63 //return NULL if none found
64 //the returned Media is a copy and must contain an URI!
65 Media * getMedia(ULONG type,ULONG move=MV_NONE);
67 //get the number of media entries of particular types in this list
68 //if lowerThen is set, only count entries lt this one
69 int getNumEntries(ULONG mediaType,int lowerThen=-1,bool noAudiolist=false);
71 //get the directory of the current medium (display only)
72 const char * getDirname(ULONG mediaType) const;
75 //update all viewers/players
78 //the engine on top of the viewer has finished
82 virtual void timercall(int ref);
87 //set the media list, this makes no copy, list is owned by me afterwards
88 void setList(MediaListHolder* chanList);
90 * fill the medialist basing on the current dirname
93 VMediaView *getViewer();
95 void playAudio(bool all=false,bool activate=false, bool showInfo=false);
97 MediaListHolder *mediaList;
102 //sort list defined by new order
103 void sortList(int order);
104 static const int SORT_NONE=0;
105 static const int SORT_NAME=1;
106 static const int SORT_TIME=2;
107 static const int SORT_RANDOM=3;
108 void updateSelectList();
109 void updateSelectList(int current);
110 //start playing everything from the current selected Media
111 //the startlevel will be set to the current level
113 //change to the selected directory with updating
114 bool changeDirectory(Media *m);
115 //update the selection in the dirlist from the selectlist
117 void updateSelection(bool toSelectList=false);
118 //find the next entry in a media list
119 //return -1 if none found, otherwise index in list
120 int findNextEntry(int current, MediaList *list,ULONG ltype, ULONG move,bool wrap);
121 //get the currently selected media fro a list
122 Media * getCurrentMedia(DirList *dl);
124 DirList* audiodirlist;
133 enum Dirmode dirmode;
134 bool playingAll; //flag for combined and recursive playing