/contrib/bind9/lib/isc/include/isc/httpd.h

https://bitbucket.org/freebsd/freebsd-head/ · C++ Header · 64 lines · 29 code · 14 blank · 21 comment · 0 complexity · 8b8456f31ef827f1c678fbd2d0bf0037 MD5 · raw file

  1. /*
  2. * Copyright (C) 2006-2008 Internet Systems Consortium, Inc. ("ISC")
  3. *
  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.
  7. *
  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.
  15. */
  16. /* $Id: httpd.h,v 1.9 2008/08/08 05:06:49 marka Exp $ */
  17. #ifndef ISC_HTTPD_H
  18. #define ISC_HTTPD_H 1
  19. /*! \file */
  20. #include <isc/event.h>
  21. #include <isc/eventclass.h>
  22. #include <isc/types.h>
  23. #include <isc/mutex.h>
  24. #include <isc/task.h>
  25. #define HTTPD_EVENTCLASS ISC_EVENTCLASS(4300)
  26. #define HTTPD_SHUTDOWN (HTTPD_EVENTCLASS + 0x0001)
  27. #define ISC_HTTPDMGR_FLAGSHUTTINGDOWN 0x00000001
  28. /*
  29. * Create a new http daemon which will send, once every time period,
  30. * a http-like header followed by HTTP data.
  31. */
  32. isc_result_t
  33. isc_httpdmgr_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
  34. isc_httpdclientok_t *client_ok,
  35. isc_httpdondestroy_t *ondestory, void *cb_arg,
  36. isc_timermgr_t *tmgr, isc_httpdmgr_t **httpdp);
  37. void
  38. isc_httpdmgr_shutdown(isc_httpdmgr_t **httpdp);
  39. isc_result_t
  40. isc_httpdmgr_addurl(isc_httpdmgr_t *httpdmgr, const char *url,
  41. isc_httpdaction_t *func, void *arg);
  42. isc_result_t
  43. isc_httpd_response(isc_httpd_t *httpd);
  44. isc_result_t
  45. isc_httpd_addheader(isc_httpd_t *httpd, const char *name,
  46. const char *val);
  47. isc_result_t
  48. isc_httpd_addheaderuint(isc_httpd_t *httpd, const char *name, int val);
  49. isc_result_t isc_httpd_endheaders(isc_httpd_t *httpd);
  50. #endif /* ISC_HTTPD_H */