1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
6 * Alvaro Lopez Ortega <alvaro@alobbs.com>
8 * Copyright (C) 2001-2008 Alvaro Lopez Ortega
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of version 2 of the GNU General Public
12 * License as published by the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
25 #ifndef CHEROKEE_HANDLER_SERVER_INFO_H
26 #define CHEROKEE_HANDLER_SERVER_INFO_H
28 #include "common-internal.h"
31 #include "connection.h"
32 #include "plugin_loader.h"
39 cherokee_module_props_t base
;
40 cherokee_boolean_t just_about
;
41 cherokee_boolean_t connection_details
;
42 } cherokee_handler_server_info_props_t
;
45 cherokee_handler_t handler
;
46 cherokee_buffer_t buffer
;
48 } cherokee_handler_server_info_t
;
50 #define HDL_SRV_INFO(x) ((cherokee_handler_server_info_t *)(x))
51 #define PROP_SRV_INFO(x) ((cherokee_handler_server_info_props_t *)(x))
52 #define HDL_SRV_INFO_PROPS(x) (PROP_SRV_INFO(MODULE(x)->props))
55 /* Library init function
57 void PLUGIN_INIT_NAME(server_info
) (cherokee_plugin_loader_t
*loader
);
58 ret_t
cherokee_handler_server_info_new (cherokee_handler_t
**hdl
, cherokee_connection_t
*cnt
, cherokee_module_props_t
*props
);
60 /* virtual methods implementation
62 ret_t
cherokee_handler_server_info_init (cherokee_handler_server_info_t
*hdl
);
63 ret_t
cherokee_handler_server_info_free (cherokee_handler_server_info_t
*hdl
);
64 ret_t
cherokee_handler_server_info_step (cherokee_handler_server_info_t
*hdl
, cherokee_buffer_t
*buffer
);
65 ret_t
cherokee_handler_server_info_add_headers (cherokee_handler_server_info_t
*hdl
, cherokee_buffer_t
*buffer
);
67 #endif /* CHEROKEE_HANDLER_SERVER_INFO_H */