summaryrefslogtreecommitdiff
path: root/libs/fsScan/include/FileSystem.h
diff options
context:
space:
mode:
authorgeronimo <geronimo013@gmx.de>2012-07-22 11:38:43 +0200
committergeronimo <geronimo013@gmx.de>2012-07-22 11:38:43 +0200
commitab7186c6c116629983dc506c4b53794026518455 (patch)
treef5508dd32f35509fb45f7cf046a0a8e0bc1c4605 /libs/fsScan/include/FileSystem.h
parent04a867b018a8c6761047ef8878a4434692673084 (diff)
downloadcmp-ab7186c6c116629983dc506c4b53794026518455.tar.gz
cmp-ab7186c6c116629983dc506c4b53794026518455.tar.bz2
worked out new file class
Diffstat (limited to 'libs/fsScan/include/FileSystem.h')
-rw-r--r--libs/fsScan/include/FileSystem.h51
1 files changed, 51 insertions, 0 deletions
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 */
+