summaryrefslogtreecommitdiff
path: root/libs/fsScan/include
diff options
context:
space:
mode:
Diffstat (limited to 'libs/fsScan/include')
-rw-r--r--libs/fsScan/include/AbstractMedia.h13
-rw-r--r--libs/fsScan/include/AbstractMultiFileMovie.h12
-rw-r--r--libs/fsScan/include/Audio.h14
-rw-r--r--libs/fsScan/include/DVDImage.h12
-rw-r--r--libs/fsScan/include/FSMediaScanner.h (renamed from libs/fsScan/include/FilesystemScanner.h)26
-rw-r--r--libs/fsScan/include/File.h67
-rw-r--r--libs/fsScan/include/FileRepresentation.h56
-rw-r--r--libs/fsScan/include/FileSystem.h50
-rw-r--r--libs/fsScan/include/LegacyVdrRecording.h12
-rw-r--r--libs/fsScan/include/MediaFactory.h19
-rw-r--r--libs/fsScan/include/Movie.h14
-rw-r--r--libs/fsScan/include/Picture.h12
-rw-r--r--libs/fsScan/include/VdrRecording.h12
13 files changed, 78 insertions, 241 deletions
diff --git a/libs/fsScan/include/AbstractMedia.h b/libs/fsScan/include/AbstractMedia.h
index 750ffde..8c87dd5 100644
--- a/libs/fsScan/include/AbstractMedia.h
+++ b/libs/fsScan/include/AbstractMedia.h
@@ -1,25 +1,25 @@
/**
* ======================== 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
@@ -56,6 +56,7 @@ public:
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);
diff --git a/libs/fsScan/include/AbstractMultiFileMovie.h b/libs/fsScan/include/AbstractMultiFileMovie.h
index aed75b9..6913a74 100644
--- a/libs/fsScan/include/AbstractMultiFileMovie.h
+++ b/libs/fsScan/include/AbstractMultiFileMovie.h
@@ -1,25 +1,25 @@
/**
* ======================== 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
diff --git a/libs/fsScan/include/Audio.h b/libs/fsScan/include/Audio.h
index 44472ef..42611c2 100644
--- a/libs/fsScan/include/Audio.h
+++ b/libs/fsScan/include/Audio.h
@@ -1,25 +1,25 @@
/**
* ======================== 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
@@ -32,6 +32,8 @@ 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[];
diff --git a/libs/fsScan/include/DVDImage.h b/libs/fsScan/include/DVDImage.h
index 1a657ff..5845d77 100644
--- a/libs/fsScan/include/DVDImage.h
+++ b/libs/fsScan/include/DVDImage.h
@@ -1,25 +1,25 @@
/**
* ======================== 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
diff --git a/libs/fsScan/include/FilesystemScanner.h b/libs/fsScan/include/FSMediaScanner.h
index 51cd44e..1c85b46 100644
--- a/libs/fsScan/include/FilesystemScanner.h
+++ b/libs/fsScan/include/FSMediaScanner.h
@@ -1,39 +1,39 @@
/**
* ======================== legal notice ======================
- *
- * File: FilesystemScanner.h
+ *
+ * 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 FILESYSTEMSCANNER_H
-#define FILESYSTEMSCANNER_H
+#ifndef FSMEDIASCANNER_H
+#define FSMEDIASCANNER_H
#include <ManagedVector.h>
#include <MediaFactory.h>
#include <map>
class cAbstractMedia;
-class cFilesystemScanner {
+class cFSMediaScanner {
public:
- cFilesystemScanner();
- virtual ~cFilesystemScanner();
+ cFSMediaScanner();
+ virtual ~cFSMediaScanner();
cManagedVector &MediaPool(void) { return pool; }
std::map<int, size_t> &Categories(void) { return categories; }
@@ -48,5 +48,5 @@ private:
cMediaFactory *mediaFactory;
};
-#endif /* FILESYSTEMSCANNER_H */
+#endif /* FSMEDIASCANNER_H */
diff --git a/libs/fsScan/include/File.h b/libs/fsScan/include/File.h
deleted file mode 100644
index 587d99c..0000000
--- a/libs/fsScan/include/File.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * ======================== legal notice ======================
- *
- * File: File.h
- * Created: 21. Juli 2012, 12
- * 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 FILE_H
-#define FILE_H
-
-#include <stddef.h>
-#include <sys/types.h>
-
-class cFileSystem;
-class cFileRepresentation;
-class cStringBuilder;
-class cFile {
-public:
- cFile(const char *Path = NULL);
- cFile(const cFile &other);
- cFile(const cFile &Parent, const char *RelativePath);
- virtual ~cFile();
-
- cFile &operator =(const cFile &other);
- bool CanRead(void) const;
- bool CanWrite(void) const;
- bool CanExecute(void) const;
- bool Exists(void) const;
- bool IsDirectory(void) const;
- bool IsFile(void) const;
- bool IsSymbolic(void) const;
- off64_t Size(void) const;
- ulong LastModified(void) const;
- const char *Name(void) const;
- void SetVirtualRoot(bool isRoot = true);
- const char *AbsolutePath(void) const; ///< returns an allocated string
- char *toURI(void) const; ///< returns an allocated string
- cFile *Parent(void) const; ///< allocates a new file instance!
- void VisitFiles(int (*cb)(void *, cFile *, const char *), void *opaque);
- static void Cleanup(void);
-
-private:
- cFile(const cFileRepresentation *);
- const cFileRepresentation *rep;
- static cFileSystem *fs;
- friend class cFileSystem;
-};
-
-#endif /* FILE_H */
-
diff --git a/libs/fsScan/include/FileRepresentation.h b/libs/fsScan/include/FileRepresentation.h
deleted file mode 100644
index 39a3c1e..0000000
--- a/libs/fsScan/include/FileRepresentation.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * ======================== legal notice ======================
- *
- * File: FileRepresentation.h
- * Created: 21. Juli 2012, 12
- * 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 FILEREPRESENTATION_H
-#define FILEREPRESENTATION_H
-
-#include <sys/types.h>
-
-class cStringBuilder;
-class cFileRepresentation {
-public:
- virtual ~cFileRepresentation();
-
- const char *Path(void) const;
- const cFileRepresentation *getParent(void) const { return parent; };
- void SetVirtualRoot(bool isRoot);
-
-private:
- cFileRepresentation(const char *Name);
- cFileRepresentation(const cFileRepresentation *Parent, const char *Name);
- char *toURI(void) const;
- bool exists;
- bool isRoot;
- bool isVirtualRoot;
- mode_t mode;
- off64_t size;
- ulong lastModified;
- char *name;
- mutable char *path;
- const cFileRepresentation *parent;
- friend class cFileSystem;
- friend class cFile;
- };
-
-#endif // FILEREPRESENTATION_H
diff --git a/libs/fsScan/include/FileSystem.h b/libs/fsScan/include/FileSystem.h
deleted file mode 100644
index 0cf4a2f..0000000
--- a/libs/fsScan/include/FileSystem.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * ======================== legal notice ======================
- *
- * File: FileSystem.h
- * Created: 21. Juli 2012, 12
- * 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 FILESYSTEM_H
-#define FILESYSTEM_H
-
-#include <tr1/unordered_map>
-#include <string>
-
-class cFile;
-class cFileRepresentation;
-class cFileSystem {
-public:
- cFileSystem();
- virtual ~cFileSystem();
-
- cFileRepresentation *representationOfFile(const char *Path);
- cFileRepresentation *representationOfFile(const cFile &Parent, const char *Path);
-
-private:
- cFileRepresentation *cacheEntry(const char *Path);
- std::tr1::unordered_map<std::string, cFileRepresentation *> fileCache;
- static char PathSeparator;
- static char RootPath[4];
- friend class cFileRepresentation;
- };
-
-#endif /* FILESYSTEM_H */
-
diff --git a/libs/fsScan/include/LegacyVdrRecording.h b/libs/fsScan/include/LegacyVdrRecording.h
index d60902a..cc46348 100644
--- a/libs/fsScan/include/LegacyVdrRecording.h
+++ b/libs/fsScan/include/LegacyVdrRecording.h
@@ -1,25 +1,25 @@
/**
* ======================== 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
diff --git a/libs/fsScan/include/MediaFactory.h b/libs/fsScan/include/MediaFactory.h
index 200335b..2ddcaa5 100644
--- a/libs/fsScan/include/MediaFactory.h
+++ b/libs/fsScan/include/MediaFactory.h
@@ -1,25 +1,25 @@
/**
* ======================== 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
@@ -32,9 +32,10 @@
class cAbstractMedia;
class cFile;
class cManagedVector;
+class cServerConfig;
class cMediaFactory {
public:
- cMediaFactory(const cFile &BaseDirectory);
+ cMediaFactory(const cServerConfig &config);
virtual ~cMediaFactory();
cAbstractMedia *CreateMedia(const cFile &FileOrDirectory);
@@ -43,8 +44,12 @@ public:
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;
};
diff --git a/libs/fsScan/include/Movie.h b/libs/fsScan/include/Movie.h
index ecb62ec..5a4f60d 100644
--- a/libs/fsScan/include/Movie.h
+++ b/libs/fsScan/include/Movie.h
@@ -1,25 +1,25 @@
/**
* ======================== 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
@@ -32,6 +32,8 @@ 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[];
diff --git a/libs/fsScan/include/Picture.h b/libs/fsScan/include/Picture.h
index 3e9a079..669509b 100644
--- a/libs/fsScan/include/Picture.h
+++ b/libs/fsScan/include/Picture.h
@@ -1,25 +1,25 @@
/**
* ======================== 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
diff --git a/libs/fsScan/include/VdrRecording.h b/libs/fsScan/include/VdrRecording.h
index 9b92c61..a8ec292 100644
--- a/libs/fsScan/include/VdrRecording.h
+++ b/libs/fsScan/include/VdrRecording.h
@@ -1,25 +1,25 @@
/**
* ======================== 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