Mercurial > urweb
diff include/urweb/urweb_cpp.h @ 1997:c93fbd139732
Define uw_loggers structure, allow FFI code to access it
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Wed, 26 Feb 2014 08:21:52 +0000 |
parents | 81bc76aa4acd |
children | 16f5f136a807 |
line wrap: on
line diff
--- a/include/urweb/urweb_cpp.h Sun Apr 13 21:36:44 2014 -0400 +++ b/include/urweb/urweb_cpp.h Wed Feb 26 08:21:52 2014 +0000 @@ -14,13 +14,13 @@ void uw_app_init(uw_app*); void uw_client_connect(unsigned id, int pass, int sock, - int (*send)(int sockfd, const void *buf, size_t len), + int (*send)(int sockfd, const void *buf, ssize_t len), int (*close)(int fd), void *logger_data, uw_logger log_error); void uw_prune_clients(struct uw_context *); failure_kind uw_initialize(struct uw_context *); -struct uw_context * uw_init(int id, void *logger_data, uw_logger log_debug); +struct uw_context * uw_init(int id, uw_loggers *lg); void uw_close(struct uw_context *); int uw_set_app(struct uw_context *, uw_app*); uw_app *uw_get_app(struct uw_context *); @@ -36,6 +36,8 @@ void uw_set_on_success(char *); void uw_set_headers(struct uw_context *, char *(*get_header)(void *, const char *), void *get_header_data); void uw_set_env(struct uw_context *, char *(*get_env)(void *, const char *), void *get_env_data); +uw_loggers* uw_get_loggers(struct uw_context *ctx); +uw_loggers* uw_get_loggers(struct uw_context *ctx); failure_kind uw_begin(struct uw_context *, char *path); void uw_ensure_transaction(struct uw_context *); failure_kind uw_begin_onError(struct uw_context *, char *msg);