00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __AWHANDLER_WEBSMCP__
00023 #define __AWHANDLER_WEBSMCP__
00024
00025 #include "monitor.h"
00026
00027 #include "model.h"
00028
00029 #include "hash.h"
00030
00031 #include "wwwhandler.h"
00032
00033 #include "pagelayout.h"
00034
00036
00037
00100 #define AW_WEBSMCP_MAX_CONNECTIONS_DEFAULT 256
00101 #define AW_WEBSMCP_SESSION_DEFAULT_TIMEOUT (30 *(60 * AW_TIMESTAMP_PER_SEC))
00102
00104 typedef struct {
00105
00106
00107 struct {
00108
00109 byte_t *docroot;
00110 byte_t *image ;
00111 byte_t *js ;
00112 byte_t *css;
00113 byte_t *html;
00115 byte_t *db;
00117 } paths;
00118
00119
00120 aw_websmcphandler_layout_t
00121 page_layout;
00122
00123
00124 aw_model_options_t
00125 model_options;
00126
00127 } aw_websmcphandler_config_t;
00128
00129
00131 typedef struct {
00132
00133
00134 aw_wwwhandler_t
00135 wwwhandler;
00136
00137
00138 aw_model_t
00139 sysmodel;
00140
00141
00142 struct {
00143
00144
00145 struct {
00146
00147
00148 u_int32_t single;
00149
00150 } auth;
00151
00152
00153 aw_timestamp_t
00154 timeout;
00155
00156
00157 aw_hash32_t
00158 *key2session;
00159
00160
00161 aw_hashString_t
00162 *loginid2session;
00163
00164 aw_address_t
00165 reaper_event_id;
00166
00167 } session;
00168
00169 aw_websmcphandler_config_t
00170 config;
00171
00172 } aw_websmcphandler_t;
00173
00174
00176 typedef struct {
00177
00178
00179 struct {
00180
00181
00182 struct {
00183
00184
00185 u_int32_t single;
00186
00187 } auth;
00188
00189
00190 aw_timestamp_t
00191 timeout;
00192
00193 } session ;
00194
00195
00196 aw_model_options_t
00197 model_options;
00198
00199
00200 aw_websmcphandler_layout_t
00201 page_layout;
00202
00203
00204 aw_wwwhandler_xtn_events_t
00205 events;
00206
00207
00208 aw_ip_addr_t
00209 bind;
00210
00211
00212 u_int32_t
00213 max_connections;
00214
00215 } aw_websmcphandler_options_t;
00216
00217
00218
00227 aw_websmcphandler_t *aw_create_websmcphandler( u_int32_t port,
00228 const byte_t *dir,
00229 aw_websmcphandler_options_t *options,
00230 aw_logger_t *logger
00231 );
00232
00237 void aw_free_websmcphandler(aw_websmcphandler_t *h);
00238
00239
00240
00241 #endif
00242