1/* MiniUPnP project
2 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
3 * (c) 2006 Thomas Bernard
4 * This software is subject to the conditions detailed
5 * in the LICENCE file provided within the distribution */
6
7#ifndef __UPNPREPLYPARSE_H__
8#define __UPNPREPLYPARSE_H__
9
10#include <sys/queue.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16struct NameValue {
17    LIST_ENTRY(NameValue) entries;
18    char name[64];
19    char value[512];
20};
21
22struct NameValueParserData {
23    LIST_HEAD(listhead, NameValue) head;
24    char curelt[64];
25};
26
27/* ParseNameValue() */
28void
29ParseNameValue(const char * buffer, int bufsize,
30               struct NameValueParserData * data);
31
32/* ClearNameValueList() */
33void
34ClearNameValueList(struct NameValueParserData * pdata);
35
36/* GetValueFromNameValueList() */
37char *
38GetValueFromNameValueList(struct NameValueParserData * pdata,
39                          const char * Name);
40
41/* GetValueFromNameValueListIgnoreNS() */
42char *
43GetValueFromNameValueListIgnoreNS(struct NameValueParserData * pdata,
44                                  const char * Name);
45
46/* DisplayNameValueList() */
47#ifdef DEBUG
48void
49DisplayNameValueList(char * buffer, int bufsize);
50#endif
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif
57
58