00001
00002
00003
00004
00005
00006
00007
00008 #ifndef _UTIL_H
00009 #define _UTIL_H
00010
00011 #include <vdr/tools.h>
00012 #include <vdr/plugin.h>
00013 #include <upnp/ixml.h>
00014
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #if 0
00018 }
00019 #endif
00020
00026 struct strCmp {
00035 bool operator()(const char* s1, const char* s2) const { return (strcmp(s1,s2) < 0); }
00036 };
00046 const sockaddr_in* getIPFromInterface(const char* Interface);
00058 const char* getMACFromInterface(const char* Interface);
00068 char** getNetworkInterfaces(int *count);
00080 char* ixmlGetFirstDocumentItem( IN IXML_Document * doc, IN const char *item, int* error );
00095 int ixmlAddProperty(IN IXML_Document* document, IN IXML_Element* node, const char* upnpproperty, const char* value );
00107 char* substr(const char* str, unsigned int offset, unsigned int length);
00108 #if 0
00109 {
00110 #endif
00111 }
00112 #endif
00113
00124 const char* escapeXMLCharacters(const char* Data, char** Buf);
00125
00127 class cMenuEditIpItem: public cMenuEditItem {
00128 private:
00129 char *value;
00130 int curNum;
00131 int pos;
00132 bool step;
00133 protected:
00134 virtual void Set(void);
00135 public:
00136 cMenuEditIpItem(const char *Name, char *Value);
00137 ~cMenuEditIpItem();
00138 virtual eOSState ProcessKey(eKeys Key);
00139 };
00140
00141 #endif
00142