} addrbookent;
-
-
#define AJAX (1<<0)
#define ANONYMOUS (1<<1)
#define NEED_URL (1<<2)
typedef struct _WebcitHandler{
WebcitHandlerFunc F;
long Flags;
+ StrBuf *Name;
} WebcitHandler;
void WebcitAddUrlHandler(const char * UrlString, long UrlSLen, WebcitHandlerFunc F, long Flags);
-
-
-
-
-
-
typedef struct _headereval {
ExamineMsgHeaderFunc evaluator;
int Type;
};
const char *ReqStrs[eNONE];
-
+#define NO_AUTH 0
+#define AUTH_COOKIE 1
+#define AUTH_BASIC 2
typedef struct _ParsedHttpHdrs {
int http_sock; /**< HTTP server socket */
const WebcitHandler *Handler;
int DontNeedAuth;
- int got_cookie;
+ int got_auth;
long ContentLength;
time_t if_modified_since;
int gzip_ok; /**< Nonzero if Accept-encoding: gzip */
StrBuf *browser_host;
StrBuf *user_agent;
- StrBuf *UrlFragment1; /**< first urlfragment, if NEED_URL is specified by the handler*/
- StrBuf *UrlFragment2; /**< second urlfragment, if NEED_URL is specified by the handler*/
- StrBuf *UrlFragment3; /**< third urlfragment, if NEED_URL is specified by the handler*/
- StrBuf *UrlFragment4; /**< fourth urlfragment, if NEED_URL is specified by the handler*/
StrBuf *this_page; /**< URL of current page */
StrBuf *PlainArgs; /*TODO: freeme*/
HashList *urlstrings; /**< variables passed to webcit in a URL */
int HaveEvaluator;
} OneHttpHeader;
+void RegisterHeaderHandler(const char *Name, long Len, Header_Evaluator F);
/* values for WC->current_iconbar */
void output_custom_content_header(const char *ctype);
void wprintf(const char *format,...)__attribute__((__format__(__printf__,1,2)));
void hprintf(const char *format,...)__attribute__((__format__(__printf__,1,2)));
-void output_static(void);
+void output_static(const char* What);
void print_menu_box(char* Title, char *Class, int nLines, ...);
long stresc(char *target, long tSize, char *strbuf, int nbsp, int nolinebreaks);
long unescape_input(char *buf);
void do_selected_iconbar(void);
void spawn_another_worker_thread(void);
-void display_rss(const StrBuf *roomname);
void StrEndTab(StrBuf *Target, int tabnum, int num_tabs);
void StrBeginTab(StrBuf *Target, int tabnum, int num_tabs);
void StrTabbedDialog(StrBuf *Target, int num_tabs, StrBuf *tabnames[]);