xmlrpc_introspection.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. This file is part of libXMLRPC - a C library for xml-encoded function calls.
  3. Author: Dan Libby (dan@libby.com)
  4. Epinions.com may be contacted at feedback@epinions-inc.com
  5. */
  6. /*
  7. Copyright 2000 Epinions, Inc.
  8. Subject to the following 3 conditions, Epinions, Inc. permits you, free
  9. of charge, to (a) use, copy, distribute, modify, perform and display this
  10. software and associated documentation files (the "Software"), and (b)
  11. permit others to whom the Software is furnished to do so as well.
  12. 1) The above copyright notice and this permission notice shall be included
  13. without modification in all copies or substantial portions of the
  14. Software.
  15. 2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF
  16. ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY
  17. IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR
  18. PURPOSE OR NONINFRINGEMENT.
  19. 3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
  20. SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
  21. OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING
  22. NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH
  23. DAMAGES.
  24. */
  25. /* IMPORTANT!
  26. *
  27. * only public (official API) things should be in this file. Anything else
  28. * should go in <group>_private.h, or in the appropriate .c file.
  29. */
  30. #ifndef __XI_INTROSPECTION_H
  31. /*
  32. * Avoid include redundancy.
  33. */
  34. #define __XI_INTROSPECTION_H
  35. /*----------------------------------------------------------------------------
  36. * xmlrpc_introspection.h
  37. *
  38. * Purpose:
  39. * define public introspection API
  40. * Comments:
  41. */
  42. /*----------------------------------------------------------------------------
  43. * Constants
  44. */
  45. #define xi_token_params "params"
  46. #define xi_token_returns "returns"
  47. #define xi_token_related "related"
  48. #define xi_token_sub "sub"
  49. /*----------------------------------------------------------------------------
  50. * Includes
  51. */
  52. /*----------------------------------------------------------------------------
  53. * Structures
  54. */
  55. /****d* VALUE/XMLRPC_IntrospectionCallback
  56. * NAME
  57. * XMLRPC_IntrospectionCallback
  58. * NOTES
  59. * Function prototype for lazy documentation generation (not generated until requested).
  60. * SOURCE
  61. */
  62. typedef void (*XMLRPC_IntrospectionCallback)(XMLRPC_SERVER server, void* userData);
  63. /******/
  64. /*----------------------------------------------------------------------------
  65. * Globals
  66. */
  67. /*----------------------------------------------------------------------------
  68. * Functions
  69. */
  70. XMLRPC_VALUE XMLRPC_IntrospectionCreateDescription(const char* xml, XMLRPC_ERROR error);
  71. int XMLRPC_ServerAddIntrospectionData(XMLRPC_SERVER server, XMLRPC_VALUE desc);
  72. int XMLRPC_ServerRegisterIntrospectionCallback(XMLRPC_SERVER server, XMLRPC_IntrospectionCallback cb);
  73. /*----------------------------------------------------------------------------
  74. * Macros
  75. */
  76. #endif /* __XI_INTROSPECTION_H */