Rename is_wap to is_mobile
[citadel.git] / webcit / webcit.h
index 40bbaa1a3ba6a6e5d0e215686955c06d8e73f7b7..21cf11f844c4bf2677f9b59450c9a52fd87bf481 100644 (file)
@@ -124,9 +124,9 @@ extern locale_t wc_locales[];
 #define PORT_NUM               2000            /* port number to listen on */
 #define DEVELOPER_ID           0
 #define CLIENT_ID              4
-#define CLIENT_VERSION         735             /* This version of WebCit */
-#define MINIMUM_CIT_VERSION    730             /* min required Citadel ver */
-#define        LIBCITADEL_MIN          111             /* min required libcitadel ver */
+#define CLIENT_VERSION         737             /* This version of WebCit */
+#define MINIMUM_CIT_VERSION    737             /* min required Citadel ver */
+#define        LIBCITADEL_MIN          737             /* min required libcitadel ver */
 #define DEFAULT_HOST           "localhost"     /* Default Citadel server */
 #define DEFAULT_PORT           "504"
 #define LB                     (1)             /* Internal escape chars */
@@ -252,6 +252,7 @@ struct serv_info {
        int serv_supports_sieve;        /* Does the server support Sieve mail filtering? */
        int serv_fulltext_enabled;      /* Does the server have the full text index enabled? */
        char serv_svn_revision[256];    /* SVN revision of the server */
+       int serv_supports_openid;       /* Does the server support authentication via OpenID? */
 };
 
 
@@ -396,7 +397,7 @@ struct wcsession {
        long msgarr[10000];                     /**< for read operations */
        int num_summ;                           /**< number of messages in mailbox summary view */
        struct message_summary *summ;           /**< array of messages for mailbox summary view */
-       int is_wap;                             /**< Client is a WAP gateway */
+       int is_mobile;                  /**< Client is a handheld browser */
        HashList *urlstrings;                   /**< variables passed to webcit in a URL */
        HashList *vars;                         /**< HTTP variable substitutions for this page */
        char this_page[512];                    /**< URL of current page */
@@ -484,7 +485,14 @@ void cookie_to_stuff(char *cookie, int *session,
 void locate_host(char *, int);
 void become_logged_in(char *, char *, char *);
 void do_login(void);
+void do_openid_login(void);
+void finalize_openid_login(void);
+void openid_manual_create(void);
 void display_login(char *mesg);
+void display_openid_login(char *mesg);
+void display_openids(void);
+void openid_attach(void);
+void openid_detach(void);
 void do_welcome(void);
 void do_logout(void);
 void display_main_menu(void);
@@ -805,7 +813,9 @@ void display_wiki_page(void);
 int get_time_format_cached (void);
 int xtoi(char *in, size_t len);
 void webcit_fmt_date(char *buf, time_t thetime, int brief);
+int fetch_http(char *url, char *target_buf, int maxbytes);
 
+int is_mobile_ua(char *user_agent);
 
 #ifdef HAVE_ICONV
 iconv_t ctdl_iconv_open(const char *tocode, const char *fromcode);