Annotation of embedaddon/strongswan/src/libfast/fast_filter.h, revision 1.1.1.1
1.1 misho 1: /*
2: * Copyright (C) 2008 Martin Willi
3: * HSR Hochschule fuer Technik Rapperswil
4: *
5: * This program is free software; you can redistribute it and/or modify it
6: * under the terms of the GNU General Public License as published by the
7: * Free Software Foundation; either version 2 of the License, or (at your
8: * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9: *
10: * This program is distributed in the hope that it will be useful, but
11: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13: * for more details.
14: */
15:
16: /*
17: * @defgroup fast_filter fast_filter
18: * @{ @ingroup libfast
19: */
20:
21: #ifndef FAST_FILTER_H_
22: #define FAST_FILTER_H_
23:
24: #include "fast_request.h"
25: #include "fast_context.h"
26: #include "fast_controller.h"
27:
28: typedef struct fast_filter_t fast_filter_t;
29:
30: /**
31: * Constructor function for a filter
32: *
33: * @param context session specific context
34: * @param param user supplied param
35: */
36: typedef fast_filter_t *(*fast_filter_constructor_t)(fast_context_t* context,
37: void *param);
38:
39: /**
40: * Filter interface, to be implemented by users filters.
41: */
42: struct fast_filter_t {
43:
44: /**
45: * Called before the controller handles the request.
46: *
47: * @param request HTTP request
48: * @param p1 first parameter
49: * @param p2 second parameter
50: * @param p3 third parameter
51: * @param p4 forth parameter
52: * @param p5 fifth parameter
53: * @return TRUE to continue request handling
54: */
55: bool (*run)(fast_filter_t *this, fast_request_t *request,
56: char *p0, char *p1, char *p2, char *p3, char *p4, char *p5);
57:
58: /**
59: * Destroy the filter instance.
60: */
61: void (*destroy) (fast_filter_t *this);
62: };
63:
64: #endif /* FAST_FILTER_H_ @} */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>