diff options
author | m0gg | 2006-11-21 20:58:59 +0000 |
---|---|---|
committer | m0gg | 2006-11-21 20:58:59 +0000 |
commit | c3fd98b25607d0f7f5977586d188f88ab226a9b8 (patch) | |
tree | cc4976a3be9d3984e4ae62c08afd1dcf9530dc5e /libcsoap/soap-server.h | |
parent | cd94b25993049a596b163f0ad8b3a2340e024cc3 (diff) | |
download | csoap-c3fd98b25607d0f7f5977586d188f88ab226a9b8.tar.gz csoap-c3fd98b25607d0f7f5977586d188f88ab226a9b8.tar.bz2 |
decoupling of nanohttp/libcsoap
Diffstat (limited to 'libcsoap/soap-server.h')
-rw-r--r-- | libcsoap/soap-server.h | 110 |
1 files changed, 60 insertions, 50 deletions
diff --git a/libcsoap/soap-server.h b/libcsoap/soap-server.h index 738db1a..70fc6aa 100644 --- a/libcsoap/soap-server.h +++ b/libcsoap/soap-server.h @@ -1,5 +1,5 @@ /****************************************************************** - * $Id: soap-server.h,v 1.11 2006/11/19 09:40:14 m0gg Exp $ + * $Id: soap-server.h,v 1.12 2006/11/21 20:59:02 m0gg Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -21,75 +21,85 @@ * * Email: ferhatayaz@yahoo.com ******************************************************************/ -#ifndef cSOAP_SERVER_H -#define cSOAP_SERVER_H - -#include <libcsoap/soap-env.h> -#include <libcsoap/soap-router.h> -#include <libcsoap/soap-ctx.h> - -typedef struct _SoapRouterNode -{ - char *context; - SoapRouter *router; - struct _SoapRouterNode *next; - -} SoapRouterNode; +#ifndef __csoap_server_h +#define __csoap_server_h #ifdef __cplusplus extern "C" { #endif /** - Initializes the soap server with commandline arguments. - - <TABLE border=1> - <TR><TH>Argument</TH><TH>Description</TH></TR> - <TR><TD>-NHTTPport [port]</TD><TD>Port to listen (default: 10000)</TD></TR> - <TR><TD>-NHTTPmaxconn [num]</TD><TD>Maximum thread connections</TD></TR> - <TR><TD>-NHTTPlog [logfilename]</TD><TD>logfile</TD></TR> - </TABLE> + * + * Initializes the soap server with commandline arguments. + * + * @param argc commandline arg count + * @param argv commandline arg vector + * + * @returns H_OK on success + * + * @see httpd_init_args + * @see udpd_init_args + * + */ +herror_t soap_server_init_args(int argc, char **argv); - @param argc commandline arg count - @param argv commandline arg vector - @returns 1 if success, 0 otherwise +/** + * + * Register a router to the soap server. + * + * <p><i>scheme</i>://<i>host</i>:<i>port</i>/<b>[context]</b> + * + * @param router The router to register + * @param context the url context + * + * @returns H_OK on success + * + * @see soap_router_new + * @see soap_router_register_service + * */ -herror_t soap_server_init_args(int argc, char *argv[]); +extern herror_t soap_server_register_router(SoapRouter * router, const char *context); +extern const char *soap_server_get_name(void); /** - Register a router to the soap server. - - <P>http://<I>host</I>:<I>port</I>/<B>[context]</B> + * + * Enters the server loop and starts to listen to incoming requests. + * + * @see httpd_run + * @see udpd_run + * + */ +extern herror_t soap_server_run(void); +/** + * + * Frees the soap server. + * + * @see httpd_destroy + * @see udpd_destroy + * + */ +extern void soap_server_destroy(void); - @param router The router to register - @param context the url context - @returns 1 if success, 0 otherwise - - @see soap_router_new - @see soap_router_register_service +#ifdef __CSOAP_INTERNAL - */ -int soap_server_register_router(SoapRouter * router, const char *context); +typedef struct _SoapRouterNode +{ + char *context; + SoapRouter *router; + struct _SoapRouterNode *next; -SoapRouter *soap_server_find_router(const char *context); +} SoapRouterNode; -SoapRouterNode * soap_server_get_routers(void); +extern SoapRouter *soap_server_find_router(const char *context); -/** - Enters the server loop and starts to listen to - http requests. - */ -herror_t soap_server_run(void); +extern SoapRouterNode * soap_server_get_routers(void); -int soap_server_get_port(void); +extern herror_t soap_server_process(SoapCtx *request, SoapCtx **response); -/** - Frees the soap server. - */ -void soap_server_destroy(void); +#endif #ifdef __cplusplus } |