]> code.citadel.org Git - citadel.git/blobdiff - webcit/webcit.h
* Store the language setting in the session cookie instead of as a preference. Resol...
[citadel.git] / webcit / webcit.h
index c4bc03e700b8f8072eae7846d4f8b44598e3e238..7cbc14e458f6a09e3409a94eba87f085e9e4bb99 100644 (file)
@@ -412,6 +412,7 @@ typedef struct _ParsedHttpHdrs {
        
        int DontNeedAuth;
        int got_auth;
+       int SessionKey;
        long ContentLength;
        time_t if_modified_since;
        int gzip_ok;                            /**< Nonzero if Accept-encoding: gzip */
@@ -419,6 +420,7 @@ typedef struct _ParsedHttpHdrs {
        StrBuf *c_username;
        StrBuf *c_password;
        StrBuf *c_roomname;
+       StrBuf *c_language;
        StrBuf *RawCookie;
        int desired_session;
 
@@ -429,6 +431,7 @@ typedef struct _ParsedHttpHdrs {
        StrBuf *http_host;                      /**< HTTP Host: header */
        StrBuf *browser_host;
        StrBuf *user_agent;
+       StrBuf *plainauth;
 
        StrBuf *this_page;                      /**< URL of current page */
        StrBuf *PlainArgs; /*TODO: freeme*/
@@ -452,6 +455,7 @@ struct wcsession {
        int is_mobile;                          /**< Client is a handheld browser */
        int ctdl_pid;                           /**< Session ID on the Citadel server */
        int nonce;                              /**< session nonce (to prevent session riding) */
+       int SessionKey;
 
 /* Session local Members */
        int serv_sock;                          /**< Client socket to Citadel server */
@@ -477,7 +481,6 @@ struct wcsession {
 
 /* accounting */
        StrBuf *wc_username;                    /**< login name of current user */
-       StrBuf *httpauth_user;                  /**< only for GroupDAV sessions */
        StrBuf *wc_fullname;                    /**< Screen name of current user */
        StrBuf *wc_password;                    /**< Password of current user */
        StrBuf *httpauth_pass;                  /**< only for GroupDAV sessions */
@@ -628,13 +631,20 @@ void InitialiseSemaphores(void);
 void begin_critical_section(int which_one);
 void end_critical_section(int which_one);
 
-
-void stuff_to_cookie(char *cookie, size_t clen, int session,
-                       StrBuf *user, StrBuf *pass, StrBuf *room);
-void cookie_to_stuff(StrBuf *cookie, int *session,
-                    StrBuf *user,
-                    StrBuf *pass,
-                    StrBuf *room);
+void stuff_to_cookie(char *cookie, size_t clen,
+               int session,
+               StrBuf *user,
+               StrBuf *pass,
+               StrBuf *room,
+               char *language
+);
+void cookie_to_stuff(StrBuf *cookie,
+               int *session,
+               StrBuf *user,
+               StrBuf *pass,
+               StrBuf *room,
+               StrBuf *language
+);
 void locate_host(StrBuf *TBuf, int);
 void become_logged_in(const StrBuf *user, const StrBuf *pass, StrBuf *serv_response);
 void openid_manual_create(void);
@@ -713,8 +723,8 @@ void text_to_server_qp(char *ptr);
 void confirm_delete_msg(void);
 void display_success(char *);
 void authorization_required(const char *message);
-int ReEstablish_Session(void);
-
+void CheckAuthBasic(ParsedHttpHdrs *hdr);
+void GetAuthBasic(ParsedHttpHdrs *hdr);
 void server_to_text(void);
 void save_edit(char *description, char *enter_cmd, int regoto);
 void display_edit(char *description, char *check_cmd,