summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-04-09 14:36:47 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2011-04-09 14:36:47 -0400
commita9d63c44fad31322477b51c11655adfb7002712e (patch)
tree129120a683d01c00c6deb50349c48d8975dfd573 /include
parentbb8cd3211735e282f6e61a5bc9136eec616379e4 (diff)
Each context gets its own non-repeating sequence of source numbers
Diffstat (limited to 'include')
-rw-r--r--include/request.h2
-rw-r--r--include/types.h5
-rw-r--r--include/urweb.h9
3 files changed, 12 insertions, 4 deletions
diff --git a/include/request.h b/include/request.h
index d2385af7..dd0359c9 100644
--- a/include/request.h
+++ b/include/request.h
@@ -22,7 +22,7 @@ request_result uw_request(uw_request_context, uw_context,
int (*send)(int sockfd, const void *buf, ssize_t len),
int (*close)(int fd));
-uw_context uw_request_new_context(uw_app*, void *logger_data, uw_logger log_error, uw_logger log_debug);
+uw_context uw_request_new_context(int id, uw_app*, void *logger_data, uw_logger log_error, uw_logger log_debug);
typedef struct {
uw_app *app;
diff --git a/include/types.h b/include/types.h
index 28658862..1e479398 100644
--- a/include/types.h
+++ b/include/types.h
@@ -35,6 +35,11 @@ typedef struct {
unsigned cli, chn;
} uw_Basis_channel;
+typedef struct {
+ int context;
+ unsigned long long source;
+} uw_Basis_source;
+
typedef struct uw_Basis_file {
uw_Basis_string name, type;
uw_Basis_blob data;
diff --git a/include/urweb.h b/include/urweb.h
index 30db875b..15ef33e5 100644
--- a/include/urweb.h
+++ b/include/urweb.h
@@ -20,7 +20,7 @@ void uw_client_connect(unsigned id, int pass, int sock,
void uw_prune_clients(uw_context);
failure_kind uw_initialize(uw_context);
-uw_context uw_init(void *logger_data, uw_logger log_debug);
+uw_context uw_init(int id, void *logger_data, uw_logger log_debug);
void uw_close(uw_context);
int uw_set_app(uw_context, uw_app*);
uw_app *uw_get_app(uw_context);
@@ -71,12 +71,13 @@ int uw_next_entry(uw_context);
void uw_write(uw_context, const char*);
-uw_Basis_int uw_Basis_new_client_source(uw_context, uw_Basis_string);
-uw_unit uw_Basis_set_client_source(uw_context, uw_Basis_int, uw_Basis_string);
+uw_Basis_source uw_Basis_new_client_source(uw_context, uw_Basis_string);
+uw_unit uw_Basis_set_client_source(uw_context, uw_Basis_source, uw_Basis_string);
void uw_set_script_header(uw_context, const char*);
const char *uw_Basis_get_settings(uw_context, uw_unit);
const char *uw_Basis_get_script(uw_context, uw_unit);
+const char *uw_get_real_script(uw_context);
uw_Basis_string uw_Basis_maybe_onload(uw_context, uw_Basis_string);
uw_Basis_string uw_Basis_maybe_onunload(uw_context, uw_Basis_string);
@@ -90,6 +91,7 @@ char *uw_Basis_htmlifyString(uw_context, uw_Basis_string);
char *uw_Basis_htmlifyBool(uw_context, uw_Basis_bool);
char *uw_Basis_htmlifyTime(uw_context, uw_Basis_time);
char *uw_Basis_htmlifySpecialChar(uw_context, unsigned char);
+char *uw_Basis_htmlifySource(uw_context, uw_Basis_source);
uw_unit uw_Basis_htmlifyInt_w(uw_context, uw_Basis_int);
uw_unit uw_Basis_htmlifyFloat_w(uw_context, uw_Basis_float);
@@ -97,6 +99,7 @@ uw_unit uw_Basis_htmlifyString_w(uw_context, uw_Basis_string);
uw_unit uw_Basis_htmlifyBool_w(uw_context, uw_Basis_bool);
uw_unit uw_Basis_htmlifyTime_w(uw_context, uw_Basis_time);
uw_unit uw_Basis_htmlifySpecialChar_w(uw_context, unsigned char);
+uw_unit uw_Basis_htmlifySource_w(uw_context, uw_Basis_source);
char *uw_Basis_attrifyInt(uw_context, uw_Basis_int);
char *uw_Basis_attrifyFloat(uw_context, uw_Basis_float);