2
0

upnpreplyparse.h 1.3 KB

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