summaryrefslogtreecommitdiff
path: root/libs/fsScan/include
diff options
context:
space:
mode:
Diffstat (limited to 'libs/fsScan/include')
-rw-r--r--libs/fsScan/include/AbstractMedia.h2
-rw-r--r--libs/fsScan/include/AbstractMultiFileMovie.h2
-rw-r--r--libs/fsScan/include/Audio.h2
-rw-r--r--libs/fsScan/include/DVDImage.h2
-rw-r--r--libs/fsScan/include/File.h65
-rw-r--r--libs/fsScan/include/FileRepresentation.h53
-rw-r--r--libs/fsScan/include/FileSystem.h51
-rw-r--r--libs/fsScan/include/FilesystemScanner.h2
-rw-r--r--libs/fsScan/include/LegacyVdrRecording.h2
-rw-r--r--libs/fsScan/include/MediaFactory.h2
-rw-r--r--libs/fsScan/include/Movie.h2
-rw-r--r--libs/fsScan/include/Picture.h2
-rw-r--r--libs/fsScan/include/VdrRecording.h2
13 files changed, 179 insertions, 10 deletions
diff --git a/libs/fsScan/include/AbstractMedia.h b/libs/fsScan/include/AbstractMedia.h
index 4b8fedd..6ca9677 100644
--- a/libs/fsScan/include/AbstractMedia.h
+++ b/libs/fsScan/include/AbstractMedia.h
@@ -2,7 +2,7 @@
* ======================== legal notice ======================
*
* File: AbstractMedia.h
- * Created: 2. Juli 2012, 14:33
+ * Created: 2. Juli 2012, 14
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libfsScan: mediatypes and filesystem scanning
*
diff --git a/libs/fsScan/include/AbstractMultiFileMovie.h b/libs/fsScan/include/AbstractMultiFileMovie.h
index e3bd520..e7bad44 100644
--- a/libs/fsScan/include/AbstractMultiFileMovie.h
+++ b/libs/fsScan/include/AbstractMultiFileMovie.h
@@ -2,7 +2,7 @@
* ======================== legal notice ======================
*
* File: AbstractMultiFileMovie.h
- * Created: 3. Juli 2012, 07:39
+ * Created: 3. Juli 2012, 07
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libfsScan: mediatypes and filesystem scanning
*
diff --git a/libs/fsScan/include/Audio.h b/libs/fsScan/include/Audio.h
index d1a784a..2b2046d 100644
--- a/libs/fsScan/include/Audio.h
+++ b/libs/fsScan/include/Audio.h
@@ -2,7 +2,7 @@
* ======================== legal notice ======================
*
* File: Audio.h
- * Created: 2. Juli 2012, 15:00
+ * Created: 2. Juli 2012, 15
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libfsScan: mediatypes and filesystem scanning
*
diff --git a/libs/fsScan/include/DVDImage.h b/libs/fsScan/include/DVDImage.h
index e773e72..4f3af2e 100644
--- a/libs/fsScan/include/DVDImage.h
+++ b/libs/fsScan/include/DVDImage.h
@@ -2,7 +2,7 @@
* ======================== legal notice ======================
*
* File: DVDImage.h
- * Created: 3. Juli 2012, 08:34
+ * Created: 3. Juli 2012, 08
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libfsScan: mediatypes and filesystem scanning
*
diff --git a/libs/fsScan/include/File.h b/libs/fsScan/include/File.h
new file mode 100644
index 0000000..4883cdd
--- /dev/null
+++ b/libs/fsScan/include/File.h
@@ -0,0 +1,65 @@
+/**
+ * ======================== legal notice ======================
+ *
+ * File: File.h
+ * Created: 21. Juli 2012, 12:41
+ * 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 <sys/types.h>
+
+class cFileSystem;
+class cFileRepresentation;
+class cStringBuilder;
+class cFile
+{
+public:
+ cFile(const char *Path);
+ cFile(const cFile &Parent, const char *RelativePath);
+ virtual ~cFile();
+
+ 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;
+
+ char *AbsolutePath(void) const;
+ cFile *Parent(void) const;
+ void VisitFiles(int (*cb)(cFile *, const char *));
+
+ 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
new file mode 100644
index 0000000..2193929
--- /dev/null
+++ b/libs/fsScan/include/FileRepresentation.h
@@ -0,0 +1,53 @@
+/**
+ * ======================== legal notice ======================
+ *
+ * File: FileRepresentation.h
+ * Created: 21. Juli 2012, 12:41
+ * 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();
+
+ cStringBuilder *internalPath(void) const;
+ const cFileRepresentation *getParent(void) const { return parent; };
+
+private:
+ cFileRepresentation(const char *Path);
+ cFileRepresentation(const cFileRepresentation *Parent, const char *Path);
+ bool exists;
+ bool isRoot;
+ mode_t mode;
+ off64_t size;
+ ulong lastModified;
+ char *name;
+ 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
new file mode 100644
index 0000000..eb0264e
--- /dev/null
+++ b/libs/fsScan/include/FileSystem.h
@@ -0,0 +1,51 @@
+/**
+ * ======================== legal notice ======================
+ *
+ * File: FileSystem.h
+ * Created: 21. Juli 2012, 12:44
+ * 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/FilesystemScanner.h b/libs/fsScan/include/FilesystemScanner.h
index 7a188ce..b90b50d 100644
--- a/libs/fsScan/include/FilesystemScanner.h
+++ b/libs/fsScan/include/FilesystemScanner.h
@@ -2,7 +2,7 @@
* ======================== legal notice ======================
*
* File: FilesystemScanner.h
- * Created: 2. Juli 2012, 13:58
+ * Created: 2. Juli 2012, 13
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libfsScan: mediatypes and filesystem scanning
*
diff --git a/libs/fsScan/include/LegacyVdrRecording.h b/libs/fsScan/include/LegacyVdrRecording.h
index 147e6fc..9c191be 100644
--- a/libs/fsScan/include/LegacyVdrRecording.h
+++ b/libs/fsScan/include/LegacyVdrRecording.h
@@ -2,7 +2,7 @@
* ======================== legal notice ======================
*
* File: LegacyVdrRecording.h
- * Created: 3. Juli 2012, 08:16
+ * Created: 3. Juli 2012, 08
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libfsScan: mediatypes and filesystem scanning
*
diff --git a/libs/fsScan/include/MediaFactory.h b/libs/fsScan/include/MediaFactory.h
index b9b5391..a3b1987 100644
--- a/libs/fsScan/include/MediaFactory.h
+++ b/libs/fsScan/include/MediaFactory.h
@@ -2,7 +2,7 @@
* ======================== legal notice ======================
*
* File: MediaFactory.h
- * Created: 2. Juli 2012, 15:43
+ * Created: 2. Juli 2012, 15
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libfsScan: mediatypes and filesystem scanning
*
diff --git a/libs/fsScan/include/Movie.h b/libs/fsScan/include/Movie.h
index af8b437..63cccc7 100644
--- a/libs/fsScan/include/Movie.h
+++ b/libs/fsScan/include/Movie.h
@@ -2,7 +2,7 @@
* ======================== legal notice ======================
*
* File: Movie.h
- * Created: 2. Juli 2012, 15:12
+ * Created: 2. Juli 2012, 15
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libfsScan: mediatypes and filesystem scanning
*
diff --git a/libs/fsScan/include/Picture.h b/libs/fsScan/include/Picture.h
index a911a71..a1998e7 100644
--- a/libs/fsScan/include/Picture.h
+++ b/libs/fsScan/include/Picture.h
@@ -2,7 +2,7 @@
* ======================== legal notice ======================
*
* File: Picture.h
- * Created: 2. Juli 2012, 15:18
+ * Created: 2. Juli 2012, 15
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libfsScan: mediatypes and filesystem scanning
*
diff --git a/libs/fsScan/include/VdrRecording.h b/libs/fsScan/include/VdrRecording.h
index 2e3904b..25e5996 100644
--- a/libs/fsScan/include/VdrRecording.h
+++ b/libs/fsScan/include/VdrRecording.h
@@ -2,7 +2,7 @@
* ======================== legal notice ======================
*
* File: VdrRecording.h
- * Created: 3. Juli 2012, 08:30
+ * Created: 3. Juli 2012, 08
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libfsScan: mediatypes and filesystem scanning
*