1 /* Copyright and license information is at the end of the file */
3 #ifndef XMLRPC_SERVER_H_INCLUDED
4 #define XMLRPC_SERVER_H_INCLUDED
6 #include <xmlrpc-c/base.h>
12 typedef struct _xmlrpc_registry xmlrpc_registry;
15 (*xmlrpc_preinvoke_method)(xmlrpc_env * const envP,
16 const char * const methodName,
17 xmlrpc_value * const paramArrayP,
18 void * const userData);
20 typedef xmlrpc_value *
21 (*xmlrpc_method)(xmlrpc_env * const envP,
22 xmlrpc_value * const paramArrayP,
23 void * const userData);
25 typedef xmlrpc_value *
26 (*xmlrpc_default_method)(xmlrpc_env * const envP,
27 const char * const host,
28 const char * const methodName,
29 xmlrpc_value * const paramArrayP,
30 void * const userData);
33 xmlrpc_registry_new(xmlrpc_env * const envP);
36 xmlrpc_registry_free(xmlrpc_registry * const registryP);
39 xmlrpc_registry_disable_introspection(xmlrpc_registry * const registryP);
42 xmlrpc_registry_add_method(xmlrpc_env * const envP,
43 xmlrpc_registry * const registryP,
44 const char * const host,
45 const char * const methodName,
46 xmlrpc_method const method,
47 void * const userData);
50 xmlrpc_registry_add_method_w_doc(xmlrpc_env * const envP,
51 xmlrpc_registry * const registryP,
52 const char * const host,
53 const char * const methodName,
54 xmlrpc_method const method,
55 void * const userData,
56 const char * const signature,
57 const char * const help);
60 xmlrpc_registry_set_default_method(xmlrpc_env * const envP,
61 xmlrpc_registry * const registryP,
62 xmlrpc_default_method const handler,
63 void * const userData);
66 xmlrpc_registry_set_preinvoke_method(xmlrpc_env * const envP,
67 xmlrpc_registry * const registryP,
68 xmlrpc_preinvoke_method const method,
69 void * const userData);
72 typedef void xmlrpc_server_shutdown_fn(xmlrpc_env *, void *, const char *);
73 /* A function that shuts down a server that uses a registry.
74 Second argument is context specific to that function; third
75 argument is a comment to describe the shutdown.
79 xmlrpc_registry_set_shutdown(xmlrpc_registry * const registryP,
80 xmlrpc_server_shutdown_fn * const shutdownFn,
81 void * const context);
83 /*----------------------------------------------------------------------------
84 Lower interface -- services to be used by an HTTP request handler
85 -----------------------------------------------------------------------------*/
88 xmlrpc_registry_process_call(xmlrpc_env * const envP,
89 xmlrpc_registry * const registryP,
90 const char * const host,
91 const char * const xmlData,
98 /* Copyright (C) 2001 by First Peer, Inc. All rights reserved.
100 ** Redistribution and use in source and binary forms, with or without
101 ** modification, are permitted provided that the following conditions
103 ** 1. Redistributions of source code must retain the above copyright
104 ** notice, this list of conditions and the following disclaimer.
105 ** 2. Redistributions in binary form must reproduce the above copyright
106 ** notice, this list of conditions and the following disclaimer in the
107 ** documentation and/or other materials provided with the distribution.
108 ** 3. The name of the author may not be used to endorse or promote products
109 ** derived from this software without specific prior written permission.
111 ** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
112 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
113 ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
114 ** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
115 ** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
116 ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
117 ** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
118 ** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
119 ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
120 ** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF