nanohttp.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * Summary: minimal HTTP implementation
  3. * Description: minimal HTTP implementation allowing to fetch resources
  4. * like external subset.
  5. *
  6. * Copy: See Copyright for the status of this software.
  7. *
  8. * Author: Daniel Veillard
  9. */
  10. #ifndef __NANO_HTTP_H__
  11. #define __NANO_HTTP_H__
  12. #include <libxml/xmlversion.h>
  13. #ifdef LIBXML_HTTP_ENABLED
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. XMLPUBFUN void XMLCALL
  18. xmlNanoHTTPInit (void);
  19. XMLPUBFUN void XMLCALL
  20. xmlNanoHTTPCleanup (void);
  21. XMLPUBFUN void XMLCALL
  22. xmlNanoHTTPScanProxy (const char *URL);
  23. XMLPUBFUN int XMLCALL
  24. xmlNanoHTTPFetch (const char *URL,
  25. const char *filename,
  26. char **contentType);
  27. XMLPUBFUN void * XMLCALL
  28. xmlNanoHTTPMethod (const char *URL,
  29. const char *method,
  30. const char *input,
  31. char **contentType,
  32. const char *headers,
  33. int ilen);
  34. XMLPUBFUN void * XMLCALL
  35. xmlNanoHTTPMethodRedir (const char *URL,
  36. const char *method,
  37. const char *input,
  38. char **contentType,
  39. char **redir,
  40. const char *headers,
  41. int ilen);
  42. XMLPUBFUN void * XMLCALL
  43. xmlNanoHTTPOpen (const char *URL,
  44. char **contentType);
  45. XMLPUBFUN void * XMLCALL
  46. xmlNanoHTTPOpenRedir (const char *URL,
  47. char **contentType,
  48. char **redir);
  49. XMLPUBFUN int XMLCALL
  50. xmlNanoHTTPReturnCode (void *ctx);
  51. XMLPUBFUN const char * XMLCALL
  52. xmlNanoHTTPAuthHeader (void *ctx);
  53. XMLPUBFUN const char * XMLCALL
  54. xmlNanoHTTPRedir (void *ctx);
  55. XMLPUBFUN int XMLCALL
  56. xmlNanoHTTPContentLength( void * ctx );
  57. XMLPUBFUN const char * XMLCALL
  58. xmlNanoHTTPEncoding (void *ctx);
  59. XMLPUBFUN const char * XMLCALL
  60. xmlNanoHTTPMimeType (void *ctx);
  61. XMLPUBFUN int XMLCALL
  62. xmlNanoHTTPRead (void *ctx,
  63. void *dest,
  64. int len);
  65. #ifdef LIBXML_OUTPUT_ENABLED
  66. XMLPUBFUN int XMLCALL
  67. xmlNanoHTTPSave (void *ctxt,
  68. const char *filename);
  69. #endif /* LIBXML_OUTPUT_ENABLED */
  70. XMLPUBFUN void XMLCALL
  71. xmlNanoHTTPClose (void *ctx);
  72. #ifdef __cplusplus
  73. }
  74. #endif
  75. #endif /* LIBXML_HTTP_ENABLED */
  76. #endif /* __NANO_HTTP_H__ */