diff options
author | Denis Loh <denis.loh@gmail.com> | 2009-11-19 12:21:55 +0100 |
---|---|---|
committer | Denis Loh <denis.loh@gmail.com> | 2009-11-19 12:21:55 +0100 |
commit | 2d245fcabb385347359759de8e6c40ce16e43cab (patch) | |
tree | ee6d718e2be089c50a1f0f6ca6fb89cc3c3161b0 /misc/config.h | |
parent | 4510b4d123a4f62c49c55fa517f15df4fa90ebec (diff) | |
download | vdr-plugin-upnp-2d245fcabb385347359759de8e6c40ce16e43cab.tar.gz vdr-plugin-upnp-2d245fcabb385347359759de8e6c40ce16e43cab.tar.bz2 |
Added options for verbosity level and auto detect settings
Diffstat (limited to 'misc/config.h')
-rw-r--r-- | misc/config.h | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/misc/config.h b/misc/config.h index 018213e..40ae6f7 100644 --- a/misc/config.h +++ b/misc/config.h @@ -11,21 +11,60 @@ #include <vdr/tools.h> #include "../common.h" +/** + * The configuration settings + * + * This holds the configurations for the server. It holds information about the + * network settings as well as some status flags. + */ class cUPnPConfig { private: static cUPnPConfig* mInstance; cString mParsedArgs; cUPnPConfig(); public: - char* mInterface; - char* mAddress; - int mPort; - int mEnable; - int mAutoSetup; + static int verbosity; ///< the verbosity of the plugin, the higher the more messages + ///< are printed. + char* mInterface; ///< the network interface, which the server is bound to + char* mAddress; ///< the IP address which is used by the server + int mPort; ///< the port which the server is listening on + int mEnable; ///< indicates, if the server is enabled or not + int mAutoSetup; ///< indicates, if the settings are automatically detected public: virtual ~cUPnPConfig(); + /** + * Get the configuration + * + * This returns the instance of the current configuration settings. + * + * @return the configuration object + */ static cUPnPConfig* get(); + /** + * Parse setup variable + * + * This parses the setup variable with the according value. The value is a + * string representation and must be converted into the according data type. + * + * @return returns + * - \bc true, if parsing was successful + * - \bc false, otherwise + * @param Name the name of the variable + * @param Value the according value of the variable + */ bool parseSetup(const char* Name, const char* Value); + /** + * Processes the commandline arguments + * + * This processes the commandline arguments which the user specified at the + * start of the plugin. + * + * @return returns + * - \bc true, if processing was successful + * - \bc false, otherwise + * @param argc the number of arguments in the list + * @param argv the arguments as a char array + */ bool processArgs(int argc, char* argv[]); }; |