xmlrpc_cgi.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* Copyright (C) 2001 by Eric Kidd. All rights reserved.
  2. **
  3. ** Redistribution and use in source and binary forms, with or without
  4. ** modification, are permitted provided that the following conditions
  5. ** are met:
  6. ** 1. Redistributions of source code must retain the above copyright
  7. ** notice, this list of conditions and the following disclaimer.
  8. ** 2. Redistributions in binary form must reproduce the above copyright
  9. ** notice, this list of conditions and the following disclaimer in the
  10. ** documentation and/or other materials provided with the distribution.
  11. ** 3. The name of the author may not be used to endorse or promote products
  12. ** derived from this software without specific prior written permission.
  13. **
  14. ** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  15. ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  16. ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  17. ** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  18. ** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  19. ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  20. ** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  21. ** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  22. ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  23. ** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  24. ** SUCH DAMAGE. */
  25. #ifndef _XMLRPC_CGI_H_
  26. #define _XMLRPC_CGI_H_ 1
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif /* __cplusplus */
  30. /*=========================================================================
  31. ** XML-RPC CGI Server
  32. **=========================================================================
  33. ** A simple XML-RPC server based on the Common Gateway Interface.
  34. */
  35. #define XMLRPC_CGI_NO_FLAGS (0)
  36. /* Initialize the CGI server library. */
  37. extern void
  38. xmlrpc_cgi_init (int flags);
  39. /* Fetch the internal registry, if you happen to need it. */
  40. extern xmlrpc_registry *
  41. xmlrpc_cgi_registry (void);
  42. /* Register a new method. */
  43. extern void
  44. xmlrpc_cgi_add_method (char *method_name,
  45. xmlrpc_method method,
  46. void *user_data);
  47. /* As above, but provide documentation (see xmlrpc_registry_add_method_w_doc
  48. ** for more information). You should really use this one. */
  49. extern void
  50. xmlrpc_cgi_add_method_w_doc (char *method_name,
  51. xmlrpc_method method,
  52. void *user_data,
  53. char *signature,
  54. char *help);
  55. /* Parse the XML-RPC call, invoke the appropriate method, and send the
  56. ** response over the network. In future releases, we reserve the right to
  57. ** time out when reading data. For now, we rely on the webserver to blow us
  58. ** away. */
  59. extern void
  60. xmlrpc_cgi_process_call (void);
  61. /* Clean up any internal data structures before exiting. */
  62. extern void
  63. xmlrpc_cgi_cleanup (void);
  64. #ifdef __cplusplus
  65. }
  66. #endif /* __cplusplus */
  67. #endif /* _XMLRPC_CGI_H_ */