Main Page | Modules | Data Structures | File List | Data Fields

/extra/work/state-dev/src/metrics/scd_server.h

00001 /* ----------------------------------------------------------------------------
00002  * $Id: scd_server.h,v 1.7 2004/04/05 20:58:05 jlewalle Exp $
00003  *
00004  * --------------------------------------------------------------------------*/
00005 #if !defined(_INCLUDED_SCD_SERVER_H_HEADER__)
00006 #define _INCLUDED_SCD_SERVER_H_HEADER__
00007 
00018 typedef struct scd_realm_hooks_t scd_realm_hooks_t;
00019 
00023 typedef struct scd_realm_server_t
00024 {
00025   apr_pool_t *pool;
00026   scd_tree_t *tree;
00027 } scd_realm_server_t;
00028 
00032 typedef struct scd_serve_data_t
00033 {
00034   apr_hash_t *properties;
00035   scd_realm_server_t *server; 
00036   scd_realm_hooks_t *hooks;
00037   scd_query_t *query;
00038   scd_reply_t *reply;
00039   apr_pool_t *pool;
00040 } scd_serve_data_t;
00041 
00046 typedef struct scd_reply_data_t
00047 {
00048   apr_hash_t *properties;
00049   scd_realm_server_t *server; 
00050   scd_realm_hooks_t *hooks;
00051   scd_query_t *query;
00052   apr_uri_t *uri;
00053   scd_reply_t *reply;
00054   apr_pool_t *pool;
00055   apr_int32_t status;
00056   sul_error_t *error;
00057 } scd_reply_data_t;
00058 
00062 typedef sul_error_t *(*scd_server_realm_create_fn_t)(scd_realm_server_t*, 
00063                                                       scd_realm_hooks_t*, 
00064                                                       apr_pool_t*);
00065 
00069 typedef sul_error_t *(*scd_server_realm_serve_fn_t)(scd_serve_data_t *sd, 
00070                                                      apr_pool_t *pool);
00071 
00075 typedef sul_error_t *(*scd_server_realm_reply_fn_t)(scd_reply_data_t *rd, 
00076                                                      sul_value_t *value,
00077                                                      apr_pool_t *pool);
00078 
00082 struct scd_realm_hooks_t
00083 {
00084   char *path;
00085   scd_server_realm_create_fn_t create;
00086   scd_server_realm_serve_fn_t serve;
00087   scd_server_realm_reply_fn_t reply;
00088 };
00089 
00099 SCD_DECLARE(sul_error_t *)
00100 scd_realm_server_hook_http(scd_realm_server_t *server, mini_httpd_t *httpd, 
00101                            apr_pool_t *pool);
00102 
00111 SCD_DECLARE(sul_error_t *)
00112 scd_realm_server_create(scd_realm_server_t **server, scd_tree_t *tree, 
00113                         apr_pool_t *pool);
00114 
00125 SCD_DECLARE(sul_error_t *)
00126 scd_realm_server_query(scd_realm_server_t *server, scd_query_t *query, 
00127                        scd_reply_t **reply, apr_pool_t *pool);
00128 
00135 SCD_DECLARE(scd_tree_t *)
00136 scd_realm_server_tree(scd_realm_server_t *server);
00137 
00147 SCD_DECLARE(sul_error_t *)
00148 scd_server_query_remote(scd_query_t *query, scd_reply_t **reply, apr_uri_t *uri,
00149                         apr_pool_t *pool);
00150 
00153 #endif
00154 

Generated on Wed Apr 28 09:38:33 2004 for State by doxygen 1.3.5