Import bind 9.5.2 vendor sources.
[dragonfly.git] / contrib / bind-9.5.2 / lib / isc / include / isc / httpd.h
blobac088bac1a59489559448765aa1df795d4e0be97
1 /*
2 * Copyright (C) 2006-2008 Internet Systems Consortium, Inc. ("ISC")
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 * PERFORMANCE OF THIS SOFTWARE.
17 /* $Id: httpd.h,v 1.6.128.3 2008/08/08 05:10:34 marka Exp $ */
19 #ifndef ISC_HTTPD_H
20 #define ISC_HTTPD_H 1
22 /*! \file */
24 #include <isc/event.h>
25 #include <isc/eventclass.h>
26 #include <isc/types.h>
27 #include <isc/mutex.h>
28 #include <isc/task.h>
30 #define HTTPD_EVENTCLASS ISC_EVENTCLASS(4300)
31 #define HTTPD_SHUTDOWN (HTTPD_EVENTCLASS + 0x0001)
33 #define ISC_HTTPDMGR_FLAGSHUTTINGDOWN 0x00000001
36 * Create a new http daemon which will send, once every time period,
37 * a http-like header followed by HTTP data.
39 isc_result_t
40 isc_httpdmgr_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
41 isc_httpdclientok_t *client_ok,
42 isc_httpdondestroy_t *ondestory, void *cb_arg,
43 isc_timermgr_t *tmgr, isc_httpdmgr_t **httpdp);
45 void
46 isc_httpdmgr_shutdown(isc_httpdmgr_t **httpdp);
48 isc_result_t
49 isc_httpdmgr_addurl(isc_httpdmgr_t *httpdmgr, const char *url,
50 isc_httpdaction_t *func, void *arg);
52 isc_result_t
53 isc_httpd_response(isc_httpd_t *httpd);
55 isc_result_t
56 isc_httpd_addheader(isc_httpd_t *httpd, const char *name,
57 const char *val);
59 isc_result_t
60 isc_httpd_addheaderuint(isc_httpd_t *httpd, const char *name, int val);
62 isc_result_t isc_httpd_endheaders(isc_httpd_t *httpd);
64 #endif /* ISC_HTTPD_H */