summaryrefslogtreecommitdiff
path: root/plex.h
diff options
context:
space:
mode:
authorchriszero <zerov83@gmail.com>2015-01-28 21:17:18 +0100
committerchriszero <zerov83@gmail.com>2015-01-28 21:17:18 +0100
commit87eb8a9e931606da4197391b6e3a09376b1383c2 (patch)
tree9427c28a2d7e9e44d4d77dc7fe53ff91f5152e23 /plex.h
parent1da4dbe662e75be47e046472137c6bd72daa7b4d (diff)
downloadvdr-plugin-plex-87eb8a9e931606da4197391b6e3a09376b1383c2.tar.gz
vdr-plugin-plex-87eb8a9e931606da4197391b6e3a09376b1383c2.tar.bz2
- Counting played time correctly
- Implemented switching audiostreams - Removed some compile warnings
Diffstat (limited to 'plex.h')
-rw-r--r--plex.h203
1 files changed, 99 insertions, 104 deletions
diff --git a/plex.h b/plex.h
index 4090888..e37e39e 100644
--- a/plex.h
+++ b/plex.h
@@ -23,35 +23,31 @@
#include <iterator>
#include <algorithm>
-static const char *DESCRIPTION = "Plex for VDR Plugin";
-static const char *MAINMENUENTRY = "Plex for VDR";
-
/**
** Device plugin remote class.
*/
class cMyRemote:public cRemote
{
- public:
-
- /**
- ** Soft device remote class constructor.
- **
- ** @param name remote name
- */
- cMyRemote(const char *name):cRemote(name)
- {
- }
-
- /**
- ** Put keycode into vdr event queue.
- **
- ** @param code key code
- ** @param repeat flag key repeated
- ** @param release flag key released
- */
- bool Put(const char *code, bool repeat = false, bool release = false) {
- return cRemote::Put(code, repeat, release);
- }
+public:
+
+ /**
+ ** Soft device remote class constructor.
+ **
+ ** @param name remote name
+ */
+ cMyRemote(const char *name):cRemote(name) {
+ }
+
+ /**
+ ** Put keycode into vdr event queue.
+ **
+ ** @param code key code
+ ** @param repeat flag key repeated
+ ** @param release flag key released
+ */
+ bool Put(const char *code, bool repeat = false, bool release = false) {
+ return cRemote::Put(code, repeat, release);
+ }
};
/**
@@ -59,15 +55,15 @@ class cMyRemote:public cRemote
*/
class cMyPlayer:public cPlayer
{
- private:
- char *FileName; ///< file to play
-
- public:
- cMyPlayer(const char *); ///< player constructor
- virtual ~ cMyPlayer(); ///< player destructor
- void Activate(bool); ///< player attached/detached
- /// get current replay mode
- virtual bool GetReplayMode(bool &, bool &, int &);
+private:
+ char *FileName; ///< file to play
+
+public:
+ cMyPlayer(const char *); ///< player constructor
+ virtual ~ cMyPlayer(); ///< player destructor
+ void Activate(bool); ///< player attached/detached
+ /// get current replay mode
+ virtual bool GetReplayMode(bool &, bool &, int &);
};
/**
@@ -77,14 +73,14 @@ class cMyPlayer:public cPlayer
*/
class cMyStatus:public cStatus
{
- private:
- int Volume; ///< current volume
+private:
+ int Volume; ///< current volume
- public:
- cMyStatus(void); ///< my status constructor
+public:
+ cMyStatus(void); ///< my status constructor
- protected:
- virtual void SetVolume(int, bool); ///< volume changed
+protected:
+ virtual void SetVolume(int, bool); ///< volume changed
};
/**
@@ -92,26 +88,26 @@ class cMyStatus:public cStatus
*/
class cMyControl:public cControl
{
- private:
- cMyPlayer * Player; ///< our player
- cSkinDisplayReplay *Display; ///< our osd display
- void ShowReplayMode(void); ///< display replay mode
- void ShowProgress(void); ///< display progress bar
- virtual void Show(void); ///< show replay control
- virtual void Hide(void); ///< hide replay control
- bool infoVisible; ///< RecordingInfo visible
- time_t timeoutShow; ///< timeout shown control
-
- public:
- cMyControl(const char *); ///< player control constructor
- virtual ~ cMyControl(); ///< player control destructor
-
- virtual eOSState ProcessKey(eKeys); ///< handle keyboard input
+private:
+ cMyPlayer * Player; ///< our player
+ cSkinDisplayReplay *Display; ///< our osd display
+ void ShowReplayMode(void); ///< display replay mode
+ void ShowProgress(void); ///< display progress bar
+ virtual void Show(void); ///< show replay control
+ virtual void Hide(void); ///< hide replay control
+ bool infoVisible; ///< RecordingInfo visible
+ time_t timeoutShow; ///< timeout shown control
+
+public:
+ cMyControl(const char *); ///< player control constructor
+ virtual ~ cMyControl(); ///< player control destructor
+
+ virtual eOSState ProcessKey(eKeys); ///< handle keyboard input
};
/*
- * Plex Browser
+ * Plex Browser
*/
class cPlexBrowser :public cOsdMenu
@@ -124,21 +120,21 @@ private:
std::vector<std::string> m_vStack;
std::string m_sSection;
std::string m_sActualPos;
- /// Create a browser menu for current directory
- void CreateMenu();
- /// Handle menu level up
- eOSState LevelUp(void);
- /// Handle menu item selection
- eOSState ProcessSelected();
-
+ /// Create a browser menu for current directory
+ void CreateMenu();
+ /// Handle menu level up
+ eOSState LevelUp(void);
+ /// Handle menu item selection
+ eOSState ProcessSelected();
+
public:
cPlexBrowser(const char *title, plexclient::PlexServer* pServ);
~cPlexBrowser();
/// File browser destructor
- //virtual ~ cPlexBrowser();
- /// Process keyboard input
- virtual eOSState ProcessKey(eKeys);
-
+ //virtual ~ cPlexBrowser();
+ /// Process keyboard input
+ virtual eOSState ProcessKey(eKeys);
+
};
/**
@@ -146,11 +142,11 @@ public:
*/
class cPlayMenu:public cOsdMenu
{
- private:
- public:
- cPlayMenu(const char *, int = 0, int = 0, int = 0, int = 0, int = 0);
- virtual ~ cPlayMenu();
- virtual eOSState ProcessKey(eKeys);
+private:
+public:
+ cPlayMenu(const char *, int = 0, int = 0, int = 0, int = 0, int = 0);
+ virtual ~ cPlayMenu();
+ virtual eOSState ProcessKey(eKeys);
};
/**
@@ -158,14 +154,14 @@ class cPlayMenu:public cOsdMenu
*/
class cMyOsd:public cOsd
{
- public:
- static volatile char Dirty; ///< flag force redraw everything
- int OsdLevel; ///< current osd level
-
- cMyOsd(int, int, uint); ///< osd constructor
- virtual ~ cMyOsd(void); ///< osd destructor
- virtual void Flush(void); ///< commits all data to the hardware
- virtual void SetActive(bool); ///< sets OSD to be the active one
+public:
+ static volatile char Dirty; ///< flag force redraw everything
+ int OsdLevel; ///< current osd level
+
+ cMyOsd(int, int, uint); ///< osd constructor
+ virtual ~ cMyOsd(void); ///< osd destructor
+ virtual void Flush(void); ///< commits all data to the hardware
+ virtual void SetActive(bool); ///< sets OSD to be the active one
};
/**
@@ -173,13 +169,13 @@ class cMyOsd:public cOsd
*/
class cMyOsdProvider:public cOsdProvider
{
- private:
- static cOsd *Osd;
+private:
+ static cOsd *Osd;
- public:
- virtual cOsd * CreateOsd(int, int, uint);
- virtual bool ProvidesTrueColor(void);
- cMyOsdProvider(void);
+public:
+ virtual cOsd * CreateOsd(int, int, uint);
+ virtual bool ProvidesTrueColor(void);
+ cMyOsdProvider(void);
};
/**
@@ -187,31 +183,30 @@ class cMyOsdProvider:public cOsdProvider
*/
class cMyDevice:public cDevice
{
- public:
- cMyDevice(void);
- virtual ~ cMyDevice(void);
+public:
+ cMyDevice(void);
+ virtual ~ cMyDevice(void);
- virtual void GetOsdSize(int &, int &, double &);
+ virtual void GetOsdSize(int &, int &, double &);
- protected:
- virtual void MakePrimaryDevice(bool);
+protected:
+ virtual void MakePrimaryDevice(bool);
};
class cMyPlugin:public cPlugin
{
- public:
- cMyPlugin(void);
- virtual ~ cMyPlugin(void);
- virtual const char *Version(void);
- virtual const char *Description(void);
- virtual bool ProcessArgs(int, char *[]);
- virtual bool Initialize(void);
- virtual void MainThreadHook(void);
- virtual const char *MainMenuEntry(void);
- virtual cOsdObject *MainMenuAction(void);
- virtual cMenuSetupPage *SetupMenu(void);
- virtual bool SetupParse(const char *, const char *);
+public:
+ cMyPlugin(void);
+ virtual ~ cMyPlugin(void);
+ virtual const char *Version(void);
+ virtual const char *Description(void);
+ virtual bool Initialize(void);
+ virtual void MainThreadHook(void);
+ virtual const char *MainMenuEntry(void);
+ virtual cOsdObject *MainMenuAction(void);
+ virtual cMenuSetupPage *SetupMenu(void);
+ virtual bool SetupParse(const char *, const char *);
};
-#endif \ No newline at end of file
+#endif