summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/request.h11
-rw-r--r--include/types.h1
-rw-r--r--include/urweb.h2
3 files changed, 12 insertions, 2 deletions
diff --git a/include/request.h b/include/request.h
index 7a2dc517..e319e91a 100644
--- a/include/request.h
+++ b/include/request.h
@@ -7,7 +7,7 @@
typedef struct uw_rc *uw_request_context;
-void uw_request_init(void);
+void uw_request_init(void *logger_data, uw_logger log_error, uw_logger log_debug);
void uw_sign(const char *in, char *out);
uw_request_context uw_new_request_context(void);
@@ -16,9 +16,16 @@ void uw_free_request_context(uw_request_context);
request_result uw_request(uw_request_context, uw_context,
char *method, char *path, char *query_string,
char *body, size_t body_len,
+ void (*on_success)(uw_context), void (*on_failure)(uw_context),
+ void *logger_data, uw_logger log_error, uw_logger log_debug,
int sock);
-uw_context uw_request_new_context(void);
+uw_context uw_request_new_context(void *logger_data, uw_logger log_error, uw_logger log_debug);
+
+typedef struct {
+ void *logger_data;
+ uw_logger log_error, log_debug;
+} loggers;
void *client_pruner(void *data);
diff --git a/include/types.h b/include/types.h
index 4a28452b..062888af 100644
--- a/include/types.h
+++ b/include/types.h
@@ -49,5 +49,6 @@ typedef struct input *uw_input;
#define TIMES_MAX 100
typedef void (*uw_callback)(void *);
+typedef void (*uw_logger)(void*, const char *fmt, ...);
#endif
diff --git a/include/urweb.h b/include/urweb.h
index 55347030..93dbd0b7 100644
--- a/include/urweb.h
+++ b/include/urweb.h
@@ -24,6 +24,7 @@ void uw_reset_keep_request(uw_context);
void uw_reset_keep_error_message(uw_context);
failure_kind uw_begin_init(uw_context);
+void uw_set_on_success(char *);
void uw_set_headers(uw_context, char *(*get_header)(void *, const char *), void *get_header_data);
failure_kind uw_begin(uw_context, char *path);
void uw_login(uw_context);
@@ -41,6 +42,7 @@ void uw_end_region(uw_context);
void uw_memstats(uw_context);
int uw_send(uw_context, int sock);
+int uw_print(uw_context, int fd);
int uw_set_input(uw_context, const char *name, char *value);
int uw_set_file_input(uw_context, char *name, uw_Basis_file);