You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.0 KiB

4 years ago
  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__ */