]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/server/webcit.h
calendar_functions.c: added skeleton
[citadel.git] / webcit-ng / server / webcit.h
index 7cc853a4de93a013f8a8aba908c59ac2cad5dcc2..11681a5969f6056f0e100412cded5c6383cfce19 100644 (file)
@@ -64,7 +64,8 @@ struct http_transaction {                     // The lifetime of an HTTP request goes through this
        char *http_version;                     // stack and sent back down to the web server, which transmits it to
        char *site_prefix;                      // the client.
        Array *request_headers;
-       char *request_body;
+       char *request_body_with_synth_headers;  // This is the request body with some synthetic headers prepended into it.
+       char *request_body;                     // this is just going to be a pointer into request_body_with_synth_headers
        long request_body_length;
        Array *request_parms;                   // anything after the "?" in the URL
        int response_code;
@@ -95,6 +96,14 @@ struct ctdlsession {
        time_t room_mtime;                      // Timestampt of the most recent write activity in this room
 };
 
+struct uploaded_file {                         // things that have been uploaded to the server (such as email attachments)
+       char id[10];
+       char filename[256];
+       char content_type[256];
+       long length;
+       FILE *fp;
+};
+
 extern char *ssl_cipher_list;
 extern int is_https;                           // nonzero if we are an HTTPS server today
 extern char *ctdl_dir;                         // directory where Citadel Server is running
@@ -130,6 +139,7 @@ void add_response_header(struct http_transaction *h, char *key, char *val);
 void perform_request(struct http_transaction *);
 void do_204(struct http_transaction *);
 void do_404(struct http_transaction *);
+void do_405(struct http_transaction *);
 void do_412(struct http_transaction *);
 void do_502(struct http_transaction *);
 void output_static(struct http_transaction *);
@@ -146,7 +156,6 @@ char *get_url_param(struct http_transaction *h, char *requested_param);
 int unescape_input(char *);
 void http_redirect(struct http_transaction *h, char *to_where);
 char *http_datestring(time_t xtime);
-long *get_msglist(struct ctdlsession *c, char *which_msgs);
 void caldav_report(struct http_transaction *h, struct ctdlsession *c);
 long locate_message_by_uid(struct ctdlsession *c, char *uid);
 void ctdl_delete_msgs(struct ctdlsession *c, long *msgnums, int num_msgs);
@@ -170,3 +179,5 @@ int webcit_tcp_server(const char *ip_addr, int port_number, int queue_len);
 void UrlizeText(StrBuf* Target, StrBuf *Source, StrBuf *WrkBuf);
 void json_render_one_message(struct http_transaction *h, struct ctdlsession *c, long msgnum);
 void upload_files(struct http_transaction *h, struct ctdlsession *c);
+struct uploaded_file pop_upload(char *id);
+void json_msglist(struct http_transaction *h, struct ctdlsession *c, char *range);