summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--activitypub.c6
-rw-r--r--data.c2
-rw-r--r--html.c6
-rw-r--r--httpd.c2
-rw-r--r--snac.h14
5 files changed, 17 insertions, 13 deletions
diff --git a/activitypub.c b/activitypub.c
index 13b1ce2..86d33df 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1426,7 +1426,7 @@ int process_queue(void)
1426 1426
1427/** HTTP handlers */ 1427/** HTTP handlers */
1428 1428
1429int activitypub_get_handler(d_char *req, char *q_path, 1429int activitypub_get_handler(const xs_dict *req, const char *q_path,
1430 char **body, int *b_size, char **ctype) 1430 char **body, int *b_size, char **ctype)
1431{ 1431{
1432 int status = 200; 1432 int status = 200;
@@ -1519,8 +1519,8 @@ int activitypub_get_handler(d_char *req, char *q_path,
1519} 1519}
1520 1520
1521 1521
1522int activitypub_post_handler(d_char *req, char *q_path, 1522int activitypub_post_handler(const xs_dict *req, const char *q_path,
1523 d_char *payload, int p_size, 1523 char *payload, int p_size,
1524 char **body, int *b_size, char **ctype) 1524 char **body, int *b_size, char **ctype)
1525/* processes an input message */ 1525/* processes an input message */
1526{ 1526{
diff --git a/data.c b/data.c
index f03fd71..72b63f8 100644
--- a/data.c
+++ b/data.c
@@ -1814,7 +1814,7 @@ static xs_dict *_new_qmsg(const char *type, const xs_val *msg, int retries)
1814} 1814}
1815 1815
1816 1816
1817void enqueue_input(snac *snac, xs_dict *msg, xs_dict *req, int retries) 1817void enqueue_input(snac *snac, const xs_dict *msg, const xs_dict *req, int retries)
1818/* enqueues an input message */ 1818/* enqueues an input message */
1819{ 1819{
1820 xs *qmsg = _new_qmsg("input", msg, retries); 1820 xs *qmsg = _new_qmsg("input", msg, retries);
diff --git a/html.c b/html.c
index 2aa6514..3ba7930 100644
--- a/html.c
+++ b/html.c
@@ -1289,7 +1289,8 @@ xs_str *html_notifications(snac *snac)
1289} 1289}
1290 1290
1291 1291
1292int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char **ctype) 1292int html_get_handler(const xs_dict *req, const char *q_path,
1293 char **body, int *b_size, char **ctype)
1293{ 1294{
1294 char *accept = xs_dict_get(req, "accept"); 1295 char *accept = xs_dict_get(req, "accept");
1295 int status = 404; 1296 int status = 404;
@@ -1546,7 +1547,8 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
1546} 1547}
1547 1548
1548 1549
1549int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size, 1550int html_post_handler(const xs_dict *req, const char *q_path,
1551 char *payload, int p_size,
1550 char **body, int *b_size, char **ctype) 1552 char **body, int *b_size, char **ctype)
1551{ 1553{
1552 int status = 0; 1554 int status = 0;
diff --git a/httpd.c b/httpd.c
index 70083a1..5520457 100644
--- a/httpd.c
+++ b/httpd.c
@@ -43,7 +43,7 @@ d_char *nodeinfo_2_0(void)
43} 43}
44 44
45 45
46int server_get_handler(d_char *req, char *q_path, 46int server_get_handler(xs_dict *req, char *q_path,
47 char **body, int *b_size, char **ctype) 47 char **body, int *b_size, char **ctype)
48/* basic server services */ 48/* basic server services */
49{ 49{
diff --git a/snac.h b/snac.h
index 54c8e51..5279453 100644
--- a/snac.h
+++ b/snac.h
@@ -155,7 +155,7 @@ void inbox_add(const char *inbox);
155void inbox_add_by_actor(const xs_dict *actor); 155void inbox_add_by_actor(const xs_dict *actor);
156xs_list *inbox_list(void); 156xs_list *inbox_list(void);
157 157
158void enqueue_input(snac *snac, xs_dict *msg, xs_dict *req, int retries); 158void enqueue_input(snac *snac, const xs_dict *msg, const xs_dict *req, int retries);
159void enqueue_output_raw(const char *keyid, const char *seckey, 159void enqueue_output_raw(const char *keyid, const char *seckey,
160 xs_dict *msg, xs_str *inbox, int retries); 160 xs_dict *msg, xs_str *inbox, int retries);
161void enqueue_output(snac *snac, xs_dict *msg, xs_str *inbox, int retries); 161void enqueue_output(snac *snac, xs_dict *msg, xs_str *inbox, int retries);
@@ -187,7 +187,7 @@ int check_signature(snac *snac, xs_dict *req, xs_str **err);
187void httpd(void); 187void httpd(void);
188 188
189int webfinger_request(const char *qs, char **actor, char **user); 189int webfinger_request(const char *qs, char **actor, char **user);
190int webfinger_get_handler(d_char *req, char *q_path, 190int webfinger_get_handler(xs_dict *req, char *q_path,
191 char **body, int *b_size, char **ctype); 191 char **body, int *b_size, char **ctype);
192 192
193const char *default_avatar_base64(void); 193const char *default_avatar_base64(void);
@@ -220,17 +220,19 @@ int process_user_queue(snac *snac);
220void process_queue_item(xs_dict *q_item); 220void process_queue_item(xs_dict *q_item);
221int process_queue(void); 221int process_queue(void);
222 222
223int activitypub_get_handler(d_char *req, char *q_path, 223int activitypub_get_handler(const xs_dict *req, const char *q_path,
224 char **body, int *b_size, char **ctype); 224 char **body, int *b_size, char **ctype);
225int activitypub_post_handler(d_char *req, char *q_path, 225int activitypub_post_handler(const xs_dict *req, const char *q_path,
226 char *payload, int p_size, 226 char *payload, int p_size,
227 char **body, int *b_size, char **ctype); 227 char **body, int *b_size, char **ctype);
228 228
229d_char *not_really_markdown(const char *content); 229d_char *not_really_markdown(const char *content);
230d_char *sanitize(const char *str); 230d_char *sanitize(const char *str);
231 231
232int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char **ctype); 232int html_get_handler(const xs_dict *req, const char *q_path,
233int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size, 233 char **body, int *b_size, char **ctype);
234int html_post_handler(const xs_dict *req, const char *q_path,
235 char *payload, int p_size,
234 char **body, int *b_size, char **ctype); 236 char **body, int *b_size, char **ctype);
235 237
236int snac_init(const char *_basedir); 238int snac_init(const char *_basedir);