xmlrpc_int.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*============================================================================
  2. xmlrpc_client_int.h
  3. ==============================================================================
  4. This header file defines the interface between modules inside
  5. xmlrpc-c.
  6. Use this in addition to xmlrpc.h, which defines the external
  7. interface.
  8. Copyright information is at the end of the file.
  9. ============================================================================*/
  10. #ifndef _XMLRPC_INT_H_
  11. #define _XMLRPC_INT_H_ 1
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif /* __cplusplus */
  15. struct _xmlrpc_value {
  16. xmlrpc_type _type;
  17. int _refcount;
  18. /* Certain data types store their data directly in the xmlrpc_value. */
  19. union {
  20. xmlrpc_int32 i;
  21. xmlrpc_bool b;
  22. double d;
  23. /* time_t t */
  24. void *c_ptr;
  25. } _value;
  26. /* Other data types use a memory block. */
  27. xmlrpc_mem_block _block;
  28. #ifdef HAVE_UNICODE_WCHAR
  29. /* We may need to convert our string data to a wchar_t string. */
  30. xmlrpc_mem_block *_wcs_block;
  31. #endif
  32. };
  33. typedef struct {
  34. unsigned char key_hash;
  35. xmlrpc_value *key;
  36. xmlrpc_value *value;
  37. } _struct_member;
  38. struct _xmlrpc_registry {
  39. int _introspection_enabled;
  40. xmlrpc_value *_methods;
  41. xmlrpc_value *_default_method;
  42. xmlrpc_value *_preinvoke_method;
  43. };
  44. /* When we deallocate a pointer in a struct, we often replace it with
  45. ** this and throw in a few assertions here and there. */
  46. #define XMLRPC_BAD_POINTER ((void*) 0xDEADBEEF)
  47. void
  48. xmlrpc_traceXml(const char * const label,
  49. const char * const xml,
  50. unsigned int const xmlLength);
  51. void
  52. xmlrpc_destroyStruct(xmlrpc_value * const structP);
  53. void
  54. xmlrpc_destroyArrayContents(xmlrpc_value * const arrayP);
  55. const char *
  56. xmlrpc_makePrintable(const char * const input);
  57. const char *
  58. xmlrpc_makePrintableChar(char const input);
  59. /* Copyright (C) 2001 by First Peer, Inc. All rights reserved.
  60. **
  61. ** Redistribution and use in source and binary forms, with or without
  62. ** modification, are permitted provided that the following conditions
  63. ** are met:
  64. ** 1. Redistributions of source code must retain the above copyright
  65. ** notice, this list of conditions and the following disclaimer.
  66. ** 2. Redistributions in binary form must reproduce the above copyright
  67. ** notice, this list of conditions and the following disclaimer in the
  68. ** documentation and/or other materials provided with the distribution.
  69. ** 3. The name of the author may not be used to endorse or promote products
  70. ** derived from this software without specific prior written permission.
  71. **
  72. ** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  73. ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  74. ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  75. ** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  76. ** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  77. ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  78. ** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  79. ** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  80. ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  81. ** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  82. ** SUCH DAMAGE. */
  83. #ifdef __cplusplus
  84. }
  85. #endif /* __cplusplus */
  86. #endif