diff options
author | chriszero <zerov83@gmail.com> | 2014-11-15 19:43:07 +0100 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2014-11-15 19:43:07 +0100 |
commit | 23f9f7712bfa33b5a488a447a6fabe6035cc3240 (patch) | |
tree | 06bbe8e0bc52496c5ad3c41accc7524aa597e670 /Config.h | |
parent | a40adaf76fb1267d38b4c5e6386933ddb2d0d328 (diff) | |
download | vdr-plugin-plex-23f9f7712bfa33b5a488a447a6fabe6035cc3240.tar.gz vdr-plugin-plex-23f9f7712bfa33b5a488a447a6fabe6035cc3240.tar.bz2 |
initial commit
Diffstat (limited to 'Config.h')
-rw-r--r-- | Config.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/Config.h b/Config.h new file mode 100644 index 0000000..3bc805a --- /dev/null +++ b/Config.h @@ -0,0 +1,80 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include <Poco/UUID.h> +#include <Poco/UUIDGenerator.h> +#include <string> + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +//VDR +#include <vdr/osd.h> +#include <vdr/menuitems.h> + + + +/// vdr-plugin version number. +/// Makefile extracts the version number for generating the file name +/// for the distribution archive. +static const char *const VERSION = "0.0.1" +#ifdef GIT_REV + "-GIT" GIT_REV +#endif + ; + +#define STRING_SIZE 256 + +class Config +{ + +public: + static Config& GetInstance() { + static Config instance; + return instance; + } + + std::string s_username = "username"; + std::string s_password = "password"; + + bool HideMainMenuEntry; + bool DisableRemote; + + std::string GetUUID(); + void SetUUID(const char* uuid); + std::string GetHostname(); + std::string GetLanguage(); + std::string GetUsername(); + std::string GetPassword(); + + +private: + Config() {} + std::string s_uuid; + std::string s_hostname; +}; + + +////////////////////////////////////////////////////////////////////////////// +// cMenuSetupPage +////////////////////////////////////////////////////////////////////////////// + +/** +** Play plugin menu setup page class. +*/ +class cMyMenuSetupPage:public cMenuSetupPage +{ + protected: + char Username[STRING_SIZE]; + char Password[STRING_SIZE]; + char Uuid[STRING_SIZE]; + + virtual void Store(void); + + public: + cMyMenuSetupPage(void); + virtual eOSState ProcessKey(eKeys); // handle input +}; + +#endif // CONFIG_H |