diff options
author | Denis Loh <denis.loh@gmail.com> | 2009-10-24 14:24:17 +0200 |
---|---|---|
committer | Denis Loh <denis.loh@gmail.com> | 2009-10-24 14:24:17 +0200 |
commit | 1cf955a715830130b7add8c1183d65b0f442fd23 (patch) | |
tree | c9d03961e9f83b1100ef6010a4a53063f127aa5d /misc/util.h | |
download | vdr-plugin-upnp-1cf955a715830130b7add8c1183d65b0f442fd23.tar.gz vdr-plugin-upnp-1cf955a715830130b7add8c1183d65b0f442fd23.tar.bz2 |
Initial commit
Diffstat (limited to 'misc/util.h')
-rw-r--r-- | misc/util.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/misc/util.h b/misc/util.h new file mode 100644 index 0000000..ffedd67 --- /dev/null +++ b/misc/util.h @@ -0,0 +1,45 @@ +/* + * File: util.h + * Author: savop + * + * Created on 21. Mai 2009, 21:25 + */ + +#ifndef _UTIL_H +#define _UTIL_H + +#include <vdr/tools.h> +#include <vdr/plugin.h> +#include <upnp/ixml.h> + +#ifdef __cplusplus +extern "C" { +struct strCmp { bool operator()(const char* s1, const char* s2) const { return (strcmp(s1,s2) < 0); }}; +const sockaddr_in* getIPFromInterface(const char* Interface); +const char* getMACFromInterface(const char* Interface); +char** getNetworkInterfaces(int *count); +char* ixmlGetFirstDocumentItem( IN IXML_Document * doc, IN const char *item, int* error ); +int ixmlAddProperty(IN IXML_Document* document, IN IXML_Element* node, const char* upnpproperty, const char* value ); +char* substr(const char* str, unsigned int offset, unsigned int length); +} +#endif + +const char* escapeSQLite(const char* Data, char** Buf); +const char* escapeXMLCharacters(const char* Data, char** Buf); + +class cMenuEditIpItem: public cMenuEditItem { +private: + char *value; + int curNum; + int pos; + bool step; +protected: + virtual void Set(void); +public: + cMenuEditIpItem(const char *Name, char *Value); // Value must be 16 bytes + ~cMenuEditIpItem(); + virtual eOSState ProcessKey(eKeys Key); +}; + +#endif /* _UTIL_H */ + |