xmlrpc_client_int.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*============================================================================
  2. xmlrpc_client_int.h
  3. ==============================================================================
  4. This header file defines the interface between client modules inside
  5. xmlrpc-c.
  6. Use this in addition to xmlrpc_client.h, which defines the external
  7. interface.
  8. Copyright information is at the end of the file.
  9. ============================================================================*/
  10. #ifndef _XMLRPC_CLIENT_INT_H_
  11. #define _XMLRPC_CLIENT_INT_H_ 1
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif /* __cplusplus */
  15. struct _xmlrpc_server_info {
  16. char *_server_url;
  17. char *_http_basic_auth;
  18. };
  19. /* Create a new server info record, with a copy of the old server. */
  20. extern xmlrpc_server_info *
  21. xmlrpc_server_info_copy(xmlrpc_env *env, xmlrpc_server_info *aserver);
  22. /*=========================================================================
  23. ** Transport Implementation functions.
  24. **=========================================================================
  25. */
  26. #include "xmlrpc_transport.h"
  27. /* The generalized event loop. This uses the above flags. For more details,
  28. ** see the wrapper functions below. If you're not using the timeout, the
  29. ** 'milliseconds' parameter will be ignored.
  30. ** Note that ANY event loop call will return immediately if there are
  31. ** no outstanding XML-RPC calls. */
  32. extern void
  33. xmlrpc_client_event_loop_run_general (int flags, timeout_t milliseconds);
  34. /* Run the event loop forever. The loop will exit if someone calls
  35. ** xmlrpc_client_event_loop_end. */
  36. extern void
  37. xmlrpc_client_event_loop_run (void);
  38. /* Run the event loop forever. The loop will exit if someone calls
  39. ** xmlrpc_client_event_loop_end or the timeout expires.
  40. ** (Note that ANY event loop call will return immediately if there are
  41. ** no outstanding XML-RPC calls.) */
  42. extern void
  43. xmlrpc_client_event_loop_run_timeout (timeout_t milliseconds);
  44. /* End the running event loop immediately. This can also be accomplished
  45. ** by calling the corresponding function in libwww.
  46. ** (Note that ANY event loop call will return immediately if there are
  47. ** no outstanding XML-RPC calls.) */
  48. extern void
  49. xmlrpc_client_event_loop_end (void);
  50. /* Return true if there are uncompleted asynchronous calls.
  51. ** The exact value of this during a response callback is undefined. */
  52. extern int
  53. xmlrpc_client_asynch_calls_are_unfinished (void);
  54. /* Copyright (C) 2001 by First Peer, Inc. All rights reserved.
  55. **
  56. ** Redistribution and use in source and binary forms, with or without
  57. ** modification, are permitted provided that the following conditions
  58. ** are met:
  59. ** 1. Redistributions of source code must retain the above copyright
  60. ** notice, this list of conditions and the following disclaimer.
  61. ** 2. Redistributions in binary form must reproduce the above copyright
  62. ** notice, this list of conditions and the following disclaimer in the
  63. ** documentation and/or other materials provided with the distribution.
  64. ** 3. The name of the author may not be used to endorse or promote products
  65. ** derived from this software without specific prior written permission.
  66. **
  67. ** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  68. ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  69. ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  70. ** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  71. ** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  72. ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  73. ** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  74. ** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  75. ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  76. ** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  77. ** SUCH DAMAGE. */
  78. #ifdef __cplusplus
  79. }
  80. #endif /* __cplusplus */
  81. #endif