Vidalia
0.2.15
|
00001 /* $Id: upnpreplyparse.h,v 1.10 2009/07/09 16:01:50 nanard Exp $ */ 00002 /* MiniUPnP project 00003 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ 00004 * (c) 2006-2009 Thomas Bernard 00005 * This software is subject to the conditions detailed 00006 * in the LICENCE file provided within the distribution */ 00007 00008 #ifndef __UPNPREPLYPARSE_H__ 00009 #define __UPNPREPLYPARSE_H__ 00010 00011 #if defined(NO_SYS_QUEUE_H) || defined(WIN32) || defined(__HAIKU__) 00012 #include "bsdqueue.h" 00013 #else 00014 #include <sys/queue.h> 00015 #endif 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00021 struct NameValue { 00022 LIST_ENTRY(NameValue) entries; 00023 char name[64]; 00024 char value[64]; 00025 }; 00026 00027 struct NameValueParserData { 00028 LIST_HEAD(listhead, NameValue) head; 00029 char curelt[64]; 00030 }; 00031 00032 /* ParseNameValue() */ 00033 void 00034 ParseNameValue(const char * buffer, int bufsize, 00035 struct NameValueParserData * data); 00036 00037 /* ClearNameValueList() */ 00038 void 00039 ClearNameValueList(struct NameValueParserData * pdata); 00040 00041 /* GetValueFromNameValueList() */ 00042 char * 00043 GetValueFromNameValueList(struct NameValueParserData * pdata, 00044 const char * Name); 00045 00046 /* GetValueFromNameValueListIgnoreNS() */ 00047 char * 00048 GetValueFromNameValueListIgnoreNS(struct NameValueParserData * pdata, 00049 const char * Name); 00050 00051 /* DisplayNameValueList() */ 00052 #ifdef DEBUG 00053 void 00054 DisplayNameValueList(char * buffer, int bufsize); 00055 #endif 00056 00057 #ifdef __cplusplus 00058 } 00059 #endif 00060 00061 #endif 00062