summaryrefslogtreecommitdiff
path: root/filebrowser.h
diff options
context:
space:
mode:
Diffstat (limited to 'filebrowser.h')
-rw-r--r--filebrowser.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/filebrowser.h b/filebrowser.h
new file mode 100644
index 0000000..4eb3555
--- /dev/null
+++ b/filebrowser.h
@@ -0,0 +1,39 @@
+#ifndef __MPV_FILEBROWSER
+#define __MPV_FILEBROWSER
+
+#include <string>
+#include <vdr/plugin.h>
+
+using std::string;
+
+class cMpvFilebrowser:public cOsdMenu
+{
+ private:
+ string rootDir;
+ static string currentDir;
+ static string currentItem;
+
+ void ShowDirectory(string Path);
+ void AddItem(string Path, string Text, bool IsDir);
+ bool PlayFile(string Filename, bool Shuffle=false);
+
+ public:
+ cMpvFilebrowser(string RootDir);
+ virtual eOSState ProcessKey(eKeys Key);
+ static string CurrentDir() { return currentDir; }
+};
+
+class cMpvFilebrowserMenuItem:public cOsdItem
+{
+ private:
+ string path;
+ bool isDir;
+
+ public:
+ cMpvFilebrowserMenuItem(string Path, string Item, bool IsDir);
+ string Path() { return path; }
+ bool IsDirectory() { return isDir; }
+};
+
+#endif
+