summaryrefslogtreecommitdiff
path: root/tools/playlist.h
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>2009-10-21 00:02:02 +0000
committercvs2svn <admin@example.com>2009-10-21 00:02:02 +0000
commit97a97ca3358eb48de3eb7a222e487e800566569f (patch)
tree97c920d0225a1c9773a3bce2207f261d7d230123 /tools/playlist.h
parenta61961358c5a2ec92340b3f8e056bab55438f103 (diff)
downloadxineliboutput-CVS.tar.gz
xineliboutput-CVS.tar.bz2
This commit was manufactured by cvs2svn to create branch 'CVS'.CVS
Diffstat (limited to 'tools/playlist.h')
-rw-r--r--tools/playlist.h132
1 files changed, 0 insertions, 132 deletions
diff --git a/tools/playlist.h b/tools/playlist.h
deleted file mode 100644
index 50c3d97a..00000000
--- a/tools/playlist.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * playlist.h: Media player playlist
- *
- * See the main source file 'xineliboutput.c' for copyright information and
- * how to reach the author.
- *
- * $Id: playlist.h,v 1.8 2008-02-19 04:24:34 phintuka Exp $
- *
- */
-
-#ifndef __XINELIBOUTPUT_PLAYLIST_H
-#define __XINELIBOUTPUT_PLAYLIST_H
-
-#include <vdr/tools.h> // cString, cListObject, cList<>
-#include <vdr/thread.h> // cMutex
-
-
-//
-// cPlaylistItem
-//
-
-class cPlaylistItem : public cListObject
-{
- private:
- cPlaylistItem();
-
- virtual int Compare(const cListObject &ListObject) const;
-
- public:
- cPlaylistItem(const char *filename); /* file name with full path */
- cPlaylistItem(const char *filename, /* file name without path */
- const char *path,
- const char *title = NULL,
- int position = -1);
-
- cString Filename; /* file name and full path */
-
- // Metainfo (ID3 etc.)
- cString Title;
- cString Tracknumber;
- cString Artist;
- cString Album;
-
- // position in playlist (if given in playlist file)
- int Position;
-};
-
-
-//
-// cPlaylistChangeNotify interface
-//
-
-class cPlaylistChangeNotify
-{
- public:
- virtual void PlaylistChanged(const cPlaylistItem *Item) = 0;
-
- virtual ~cPlaylistChangeNotify() {}
-};
-
-
-//
-// cPlaylist
-//
-
-
-class cID3Scanner;
-
-class cPlaylist : protected cList<cPlaylistItem>
-{
- private:
-
- cMutex m_Lock;
- cString m_Name; // playlist (or folder) name
- cString m_Folder; // path to "root" of playlist
- cPlaylistItem *m_Current; // now playing
- unsigned int m_Version;
-
- enum { ePlaylist, eImplicit } m_Origin;
-
- cPlaylistChangeNotify *m_Menu;
- cID3Scanner *m_Scanner;
-
- protected:
-
- bool StoreCache(void);
- bool ReadCache(void);
-
- int ReadPlaylist(const char *PlaylistFile);
- int ScanFolder(const char *FolderName,
- bool Recursive = false,
- bool (config_t::*Filter)(const char *) = &config_t::IsAudioFile);
-
- friend class cID3Scanner;
- friend class cPlaylistReader;
- void PlaylistChanged(const cPlaylistItem *Item);
- cPlaylistItem *Last(void) { return cList<cPlaylistItem>::Last(); }
-
- public:
-
- cPlaylist();
- virtual ~cPlaylist();
-
- const cString& Name(void) const { return m_Name; }
-
- // listen for changes in playlist
- void Listen(cPlaylistChangeNotify *Menu = NULL);
-
- // read playlist from file or create playlist from directory tree
- bool Read(const char *PlaylistFile, bool Recursive = false);
- void StartScanner(void);
- void Del(cPlaylistItem *it);
-
- void Sort(void);
- int Count(void) const;
-
- // access/iterate playlist items
- cPlaylistItem *First(void) { return Next(NULL); }
- cPlaylistItem *Next(const cPlaylistItem *i);
-
- // get/set current (now playing) item
- cPlaylistItem *Current(void);
- void SetCurrent(cPlaylistItem *current);
- cPlaylistItem *Next(void);
- cPlaylistItem *Prev(void);
-
- static cString EscapeMrl(const char *name);
- static cString GetEntry(cPlaylistItem *i, bool isPlaylist = false, bool isCurrent = false);
-};
-
-
-#endif // __XINELIBOUTPUT_PLAYLIST_H