comparison 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
comparison
equal deleted inserted replaced
1996:582ea3a4d622 1997:c93fbd139732
12 12
13 void uw_global_init(void); 13 void uw_global_init(void);
14 void uw_app_init(uw_app*); 14 void uw_app_init(uw_app*);
15 15
16 void uw_client_connect(unsigned id, int pass, int sock, 16 void uw_client_connect(unsigned id, int pass, int sock,
17 int (*send)(int sockfd, const void *buf, size_t len), 17 int (*send)(int sockfd, const void *buf, ssize_t len),
18 int (*close)(int fd), 18 int (*close)(int fd),
19 void *logger_data, uw_logger log_error); 19 void *logger_data, uw_logger log_error);
20 void uw_prune_clients(struct uw_context *); 20 void uw_prune_clients(struct uw_context *);
21 failure_kind uw_initialize(struct uw_context *); 21 failure_kind uw_initialize(struct uw_context *);
22 22
23 struct uw_context * uw_init(int id, void *logger_data, uw_logger log_debug); 23 struct uw_context * uw_init(int id, uw_loggers *lg);
24 void uw_close(struct uw_context *); 24 void uw_close(struct uw_context *);
25 int uw_set_app(struct uw_context *, uw_app*); 25 int uw_set_app(struct uw_context *, uw_app*);
26 uw_app *uw_get_app(struct uw_context *); 26 uw_app *uw_get_app(struct uw_context *);
27 void uw_set_db(struct uw_context *, void*); 27 void uw_set_db(struct uw_context *, void*);
28 void *uw_get_db(struct uw_context *); 28 void *uw_get_db(struct uw_context *);
34 34
35 failure_kind uw_begin_init(struct uw_context *); 35 failure_kind uw_begin_init(struct uw_context *);
36 void uw_set_on_success(char *); 36 void uw_set_on_success(char *);
37 void uw_set_headers(struct uw_context *, char *(*get_header)(void *, const char *), void *get_header_data); 37 void uw_set_headers(struct uw_context *, char *(*get_header)(void *, const char *), void *get_header_data);
38 void uw_set_env(struct uw_context *, char *(*get_env)(void *, const char *), void *get_env_data); 38 void uw_set_env(struct uw_context *, char *(*get_env)(void *, const char *), void *get_env_data);
39 uw_loggers* uw_get_loggers(struct uw_context *ctx);
40 uw_loggers* uw_get_loggers(struct uw_context *ctx);
39 failure_kind uw_begin(struct uw_context *, char *path); 41 failure_kind uw_begin(struct uw_context *, char *path);
40 void uw_ensure_transaction(struct uw_context *); 42 void uw_ensure_transaction(struct uw_context *);
41 failure_kind uw_begin_onError(struct uw_context *, char *msg); 43 failure_kind uw_begin_onError(struct uw_context *, char *msg);
42 void uw_login(struct uw_context *); 44 void uw_login(struct uw_context *);
43 int uw_commit(struct uw_context *); 45 int uw_commit(struct uw_context *);