summaryrefslogtreecommitdiff
path: root/filebrowser.h
blob: 4eb3555adaa06550522b401ca914f2be3d7a40db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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