diff options
author | geronimo <geronimo013@gmx.de> | 2012-07-30 09:19:12 +0200 |
---|---|---|
committer | geronimo <geronimo013@gmx.de> | 2012-07-30 09:19:12 +0200 |
commit | 41922cdaf9c8db57c6b51f090eefe95b0008a0fb (patch) | |
tree | dbedbef06a7419552b7be90ac97b48417fda1fa1 /libs/fsScan/include | |
parent | 05bf6a9b1be1c03ed33df638d3f7d0fddf968ebc (diff) | |
download | cmp-41922cdaf9c8db57c6b51f090eefe95b0008a0fb.tar.gz cmp-41922cdaf9c8db57c6b51f090eefe95b0008a0fb.tar.bz2 |
former libfsScan now contains only media related stuff, so renamed lib to libmediaScan
Diffstat (limited to 'libs/fsScan/include')
-rw-r--r-- | libs/fsScan/include/AbstractMedia.h | 85 | ||||
-rw-r--r-- | libs/fsScan/include/AbstractMultiFileMovie.h | 57 | ||||
-rw-r--r-- | libs/fsScan/include/Audio.h | 46 | ||||
-rw-r--r-- | libs/fsScan/include/DVDImage.h | 46 | ||||
-rw-r--r-- | libs/fsScan/include/FSMediaScanner.h | 52 | ||||
-rw-r--r-- | libs/fsScan/include/LegacyVdrRecording.h | 41 | ||||
-rw-r--r-- | libs/fsScan/include/MediaFactory.h | 58 | ||||
-rw-r--r-- | libs/fsScan/include/Movie.h | 46 | ||||
-rw-r--r-- | libs/fsScan/include/Picture.h | 44 | ||||
-rw-r--r-- | libs/fsScan/include/VdrRecording.h | 41 |
10 files changed, 0 insertions, 516 deletions
diff --git a/libs/fsScan/include/AbstractMedia.h b/libs/fsScan/include/AbstractMedia.h deleted file mode 100644 index 8c87dd5..0000000 --- a/libs/fsScan/include/AbstractMedia.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * ======================== legal notice ====================== - * - * File: AbstractMedia.h - * Created: 2. Juli 2012, 14 - * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning - * - * CMP - compound media player - * - * is a client/server mediaplayer intended to play any media from any workstation - * without the need to export or mount shares. cmps is an easy to use backend - * with a (ready to use) HTML-interface. Additionally the backend supports - * authentication via HTTP-digest authorization. - * cmpc is a client with vdr-like osd-menues. - * - * Copyright (c) 2012 Reinhard Mantey, some rights reserved! - * published under Creative Commons by-sa - * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * - * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * - * -------------------------------------------------------------- - */ -#ifndef ABSTRACTMEDIA_H -#define ABSTRACTMEDIA_H - -#include <File.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <vector> - -typedef struct { - const char *extension; - const char *mimeType; -} SupportedExtension; - -class cAbstractMedia { -public: - typedef enum { - Invalid, - Audio, - Movie, - DVDImage, - LegacyVdrRecording, - VdrRecording, - Picture, - Unknown - } SupportedMediaType; - - virtual ~cAbstractMedia(); - - SupportedMediaType MediaType(void) const { return mediaType; } - const char *MimeType(void) const { return mimeType; } - const char *AbsolutePath(void) const; - ulong LastModified(void) const; - const char *LogicalPath(void) const { return logicalPath; } - virtual const char *Name(void) const; - virtual bool NeedsFurtherScan(void) const; - virtual size_t Size(void) const; - virtual const char *URI(void) const { return uri; } - virtual void Refresh(void); - ///< will be called right before start streaming, so this call is used to - ///< determine the real size, number of files, etc. - virtual size_t ReadChunk(char *buf, size_t bufSize); - ///< used to hide the differences between single- and multi-file media. - virtual void Reset(void); - static const char *MediaType2Text(int Type); - -protected: - cAbstractMedia(const cFile &File, const char *Mime, SupportedMediaType Type); - void SetMimeType(const char *MimeType); - const cFile &KeyPath(void) { return keyPath; } - int fd; - -private: - SupportedMediaType mediaType; - char *mimeType; - char *uri; - char *logicalPath; - cFile keyPath; - }; - -#endif /* ABSTRACTMEDIA_H */ - diff --git a/libs/fsScan/include/AbstractMultiFileMovie.h b/libs/fsScan/include/AbstractMultiFileMovie.h deleted file mode 100644 index 6913a74..0000000 --- a/libs/fsScan/include/AbstractMultiFileMovie.h +++ /dev/null @@ -1,57 +0,0 @@ -/** - * ======================== legal notice ====================== - * - * File: AbstractMultiFileMovie.h - * Created: 3. Juli 2012, 07 - * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning - * - * CMP - compound media player - * - * is a client/server mediaplayer intended to play any media from any workstation - * without the need to export or mount shares. cmps is an easy to use backend - * with a (ready to use) HTML-interface. Additionally the backend supports - * authentication via HTTP-digest authorization. - * cmpc is a client with vdr-like osd-menues. - * - * Copyright (c) 2012 Reinhard Mantey, some rights reserved! - * published under Creative Commons by-sa - * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * - * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * - * -------------------------------------------------------------- - */ -#ifndef ABSTRACTMULTIFILEMOVIE_H -#define ABSTRACTMULTIFILEMOVIE_H - -#include <Movie.h> - -class cAbstractMultiFileMovie : public cMovie { -public: - virtual ~cAbstractMultiFileMovie(); - - virtual size_t ReadChunk(char *buf, size_t bufSize); - virtual const char *Name(void) const { return name; } - virtual const char *FirstFile(void) = 0; - virtual const char *NextFile(void) = 0; - virtual size_t Size(void) const { return size; } - -protected: - cAbstractMultiFileMovie(const cFile &File, const char *Mime, SupportedMediaType Type); - virtual void Reset(void); - void SetName(char *Name); - void SetSize(size_t Size); - bool checkBuffer(void); - int movieFiles; - int curFileNo; - char *buf; - int bufSize; - -private: - char *name; ///< name of multifile media may be different from any filesystem name, so handle a copy - size_t size; - }; - -#endif /* ABSTRACTMULTIFILEMOVIE_H */ - diff --git a/libs/fsScan/include/Audio.h b/libs/fsScan/include/Audio.h deleted file mode 100644 index 42611c2..0000000 --- a/libs/fsScan/include/Audio.h +++ /dev/null @@ -1,46 +0,0 @@ -/** - * ======================== legal notice ====================== - * - * File: Audio.h - * Created: 2. Juli 2012, 15 - * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning - * - * CMP - compound media player - * - * is a client/server mediaplayer intended to play any media from any workstation - * without the need to export or mount shares. cmps is an easy to use backend - * with a (ready to use) HTML-interface. Additionally the backend supports - * authentication via HTTP-digest authorization. - * cmpc is a client with vdr-like osd-menues. - * - * Copyright (c) 2012 Reinhard Mantey, some rights reserved! - * published under Creative Commons by-sa - * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * - * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * - * -------------------------------------------------------------- - */ -#ifndef AUDIO_H -#define AUDIO_H - -#include <AbstractMedia.h> - -class cAudio : public cAbstractMedia { -public: - cAudio(const cFile &File, const char *Mime); - virtual ~cAudio(); - - virtual bool NeedsFurtherScan(void) const; - -private: - static const char *ContentType(const char *Extension); - static SupportedExtension knownExtensions[]; - friend class cMediaFactory; - friend class FScanTest; - friend int check4Media(void *, cFile *, const char *); - }; - -#endif /* AUDIO_H */ - diff --git a/libs/fsScan/include/DVDImage.h b/libs/fsScan/include/DVDImage.h deleted file mode 100644 index 5845d77..0000000 --- a/libs/fsScan/include/DVDImage.h +++ /dev/null @@ -1,46 +0,0 @@ -/** - * ======================== legal notice ====================== - * - * File: DVDImage.h - * Created: 3. Juli 2012, 08 - * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning - * - * CMP - compound media player - * - * is a client/server mediaplayer intended to play any media from any workstation - * without the need to export or mount shares. cmps is an easy to use backend - * with a (ready to use) HTML-interface. Additionally the backend supports - * authentication via HTTP-digest authorization. - * cmpc is a client with vdr-like osd-menues. - * - * Copyright (c) 2012 Reinhard Mantey, some rights reserved! - * published under Creative Commons by-sa - * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * - * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * - * -------------------------------------------------------------- - */ -#ifndef DVDIMAGE_H -#define DVDIMAGE_H - -#include <AbstractMultiFileMovie.h> - -class cDVDImage : public cAbstractMultiFileMovie { -public: - cDVDImage(const cFile &File); - virtual ~cDVDImage(); - - virtual const char *Name(void) const; - virtual const char *FirstFile(void); - virtual const char *NextFile(void); - virtual void Refresh(void); - virtual size_t Size(void) const; - -private: - int mainMovie; - }; - -#endif /* DVDIMAGE_H */ - diff --git a/libs/fsScan/include/FSMediaScanner.h b/libs/fsScan/include/FSMediaScanner.h deleted file mode 100644 index 1c85b46..0000000 --- a/libs/fsScan/include/FSMediaScanner.h +++ /dev/null @@ -1,52 +0,0 @@ -/** - * ======================== legal notice ====================== - * - * File: FSMediaScanner.h - * Created: 2. Juli 2012, 13 - * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning - * - * CMP - compound media player - * - * is a client/server mediaplayer intended to play any media from any workstation - * without the need to export or mount shares. cmps is an easy to use backend - * with a (ready to use) HTML-interface. Additionally the backend supports - * authentication via HTTP-digest authorization. - * cmpc is a client with vdr-like osd-menues. - * - * Copyright (c) 2012 Reinhard Mantey, some rights reserved! - * published under Creative Commons by-sa - * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * - * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * - * -------------------------------------------------------------- - */ -#ifndef FSMEDIASCANNER_H -#define FSMEDIASCANNER_H - -#include <ManagedVector.h> -#include <MediaFactory.h> -#include <map> - -class cAbstractMedia; -class cFSMediaScanner { -public: - cFSMediaScanner(); - virtual ~cFSMediaScanner(); - - cManagedVector &MediaPool(void) { return pool; } - std::map<int, size_t> &Categories(void) { return categories; } - cAbstractMedia *FindMedia(const char *LogicalPath); - void Refresh(void); - void SetMediaFactory(cMediaFactory *factory); - -private: - size_t fileBufSize; - cManagedVector pool; - std::map<int, size_t> categories; - cMediaFactory *mediaFactory; - }; - -#endif /* FSMEDIASCANNER_H */ - diff --git a/libs/fsScan/include/LegacyVdrRecording.h b/libs/fsScan/include/LegacyVdrRecording.h deleted file mode 100644 index cc46348..0000000 --- a/libs/fsScan/include/LegacyVdrRecording.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * ======================== legal notice ====================== - * - * File: LegacyVdrRecording.h - * Created: 3. Juli 2012, 08 - * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning - * - * CMP - compound media player - * - * is a client/server mediaplayer intended to play any media from any workstation - * without the need to export or mount shares. cmps is an easy to use backend - * with a (ready to use) HTML-interface. Additionally the backend supports - * authentication via HTTP-digest authorization. - * cmpc is a client with vdr-like osd-menues. - * - * Copyright (c) 2012 Reinhard Mantey, some rights reserved! - * published under Creative Commons by-sa - * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * - * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * - * -------------------------------------------------------------- - */ -#ifndef LEGACYVDRRECORDING_H -#define LEGACYVDRRECORDING_H - -#include <AbstractMultiFileMovie.h> - -class cLegacyVdrRecording : public cAbstractMultiFileMovie { -public: - cLegacyVdrRecording(const cFile &File); - virtual ~cLegacyVdrRecording(); - - virtual const char *FirstFile(void); - virtual const char *NextFile(void); - virtual void Refresh(void); - }; - -#endif /* LEGACYVDRRECORDING_H */ - diff --git a/libs/fsScan/include/MediaFactory.h b/libs/fsScan/include/MediaFactory.h deleted file mode 100644 index 2ddcaa5..0000000 --- a/libs/fsScan/include/MediaFactory.h +++ /dev/null @@ -1,58 +0,0 @@ -/** - * ======================== legal notice ====================== - * - * File: MediaFactory.h - * Created: 2. Juli 2012, 15 - * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning - * - * CMP - compound media player - * - * is a client/server mediaplayer intended to play any media from any workstation - * without the need to export or mount shares. cmps is an easy to use backend - * with a (ready to use) HTML-interface. Additionally the backend supports - * authentication via HTTP-digest authorization. - * cmpc is a client with vdr-like osd-menues. - * - * Copyright (c) 2012 Reinhard Mantey, some rights reserved! - * published under Creative Commons by-sa - * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * - * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * - * -------------------------------------------------------------- - */ -#ifndef MEDIAFACTORY_H -#define MEDIAFACTORY_H - -#include <File.h> -#include <sys/stat.h> -#include <sys/types.h> - -class cAbstractMedia; -class cFile; -class cManagedVector; -class cServerConfig; -class cMediaFactory { -public: - cMediaFactory(const cServerConfig &config); - virtual ~cMediaFactory(); - - cAbstractMedia *CreateMedia(const cFile &FileOrDirectory); - void Scan4Media(cManagedVector &pool); - const cFile &BaseDirectory(void) { return baseDirectory; } - void SetBaseDirectory(const cFile &dir); - -private: - void Scan4MetaData(cAbstractMedia *media); - int CreateMedia(const cFile *Parent, const char *Name); - static int createMedia(void *opaque, cFile *Parent, const char *Name); - const cServerConfig &config; - cFile baseDirectory; - cManagedVector *mediaPool; - char *scratch; - size_t scratchSize; - }; - -#endif /* MEDIAFACTORY_H */ - diff --git a/libs/fsScan/include/Movie.h b/libs/fsScan/include/Movie.h deleted file mode 100644 index 5a4f60d..0000000 --- a/libs/fsScan/include/Movie.h +++ /dev/null @@ -1,46 +0,0 @@ -/** - * ======================== legal notice ====================== - * - * File: Movie.h - * Created: 2. Juli 2012, 15 - * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning - * - * CMP - compound media player - * - * is a client/server mediaplayer intended to play any media from any workstation - * without the need to export or mount shares. cmps is an easy to use backend - * with a (ready to use) HTML-interface. Additionally the backend supports - * authentication via HTTP-digest authorization. - * cmpc is a client with vdr-like osd-menues. - * - * Copyright (c) 2012 Reinhard Mantey, some rights reserved! - * published under Creative Commons by-sa - * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * - * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * - * -------------------------------------------------------------- - */ -#ifndef MOVIE_H -#define MOVIE_H - -#include <AbstractMedia.h> - -class cMovie : public cAbstractMedia { -public: - cMovie(const cFile &File, const char *Mime, SupportedMediaType Type = cAbstractMedia::Movie); - virtual ~cMovie(); - - virtual bool NeedsFurtherScan(void) const; - -private: - static const char *ContentType(const char *Extension); - static SupportedExtension knownExtensions[]; - friend class cMediaFactory; - friend class FScanTest; - friend int check4Media(void *, cFile *, const char *); - }; - -#endif /* MOVIE_H */ - diff --git a/libs/fsScan/include/Picture.h b/libs/fsScan/include/Picture.h deleted file mode 100644 index 669509b..0000000 --- a/libs/fsScan/include/Picture.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * ======================== legal notice ====================== - * - * File: Picture.h - * Created: 2. Juli 2012, 15 - * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning - * - * CMP - compound media player - * - * is a client/server mediaplayer intended to play any media from any workstation - * without the need to export or mount shares. cmps is an easy to use backend - * with a (ready to use) HTML-interface. Additionally the backend supports - * authentication via HTTP-digest authorization. - * cmpc is a client with vdr-like osd-menues. - * - * Copyright (c) 2012 Reinhard Mantey, some rights reserved! - * published under Creative Commons by-sa - * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * - * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * - * -------------------------------------------------------------- - */ -#ifndef PICTURE_H -#define PICTURE_H - -#include <AbstractMedia.h> - -class cPicture : public cAbstractMedia { -public: - cPicture(const cFile &File, const char *Mime); - virtual ~cPicture(); - -private: - static const char *ContentType(const char *Extension); - static SupportedExtension knownExtensions[]; - friend class cMediaFactory; - friend class FScanTest; - friend int check4Media(void *, cFile *, const char *); - }; - -#endif /* PICTURE_H */ - diff --git a/libs/fsScan/include/VdrRecording.h b/libs/fsScan/include/VdrRecording.h deleted file mode 100644 index a8ec292..0000000 --- a/libs/fsScan/include/VdrRecording.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * ======================== legal notice ====================== - * - * File: VdrRecording.h - * Created: 3. Juli 2012, 08 - * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning - * - * CMP - compound media player - * - * is a client/server mediaplayer intended to play any media from any workstation - * without the need to export or mount shares. cmps is an easy to use backend - * with a (ready to use) HTML-interface. Additionally the backend supports - * authentication via HTTP-digest authorization. - * cmpc is a client with vdr-like osd-menues. - * - * Copyright (c) 2012 Reinhard Mantey, some rights reserved! - * published under Creative Commons by-sa - * For details see http://creativecommons.org/licenses/by-sa/3.0/ - * - * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp - * - * -------------------------------------------------------------- - */ -#ifndef VDRRECORDING_H -#define VDRRECORDING_H - -#include <AbstractMultiFileMovie.h> - -class cVdrRecording : public cAbstractMultiFileMovie { -public: - cVdrRecording(const cFile &File); - virtual ~cVdrRecording(); - - virtual const char *FirstFile(void); - virtual const char *NextFile(void); - virtual void Refresh(void); - }; - -#endif /* VDRRECORDING_H */ - |