Mercurial > urweb
comparison include/types.h @ 1349:87156c44824f
Periodic tasks
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 18 Dec 2010 15:17:09 -0500 |
parents | b106ca8200b1 |
children | b02cb9da5686 |
comparison
equal
deleted
inserted
replaced
1348:8a169fc0838b | 1349:87156c44824f |
---|---|
57 typedef void (*uw_callback)(void *); | 57 typedef void (*uw_callback)(void *); |
58 typedef void (*uw_callback_with_retry)(void *, int will_retry); | 58 typedef void (*uw_callback_with_retry)(void *, int will_retry); |
59 typedef void (*uw_logger)(void*, const char *fmt, ...); | 59 typedef void (*uw_logger)(void*, const char *fmt, ...); |
60 | 60 |
61 typedef struct { | 61 typedef struct { |
62 void (*callback)(uw_context); | |
63 unsigned int period; | |
64 } uw_periodic; | |
65 | |
66 typedef struct { | |
62 int inputs_len, timeout; | 67 int inputs_len, timeout; |
63 char *url_prefix; | 68 char *url_prefix; |
64 | 69 |
65 void (*client_init)(); | 70 void (*client_init)(); |
66 void (*initializer)(uw_context); | 71 void (*initializer)(uw_context); |
78 uw_Basis_string (*cookie_sig)(uw_context); | 83 uw_Basis_string (*cookie_sig)(uw_context); |
79 int (*check_url)(const char *); | 84 int (*check_url)(const char *); |
80 int (*check_mime)(const char *); | 85 int (*check_mime)(const char *); |
81 | 86 |
82 void (*on_error)(uw_context, char *); | 87 void (*on_error)(uw_context, char *); |
88 | |
89 uw_periodic *periodics; // 0-terminated array | |
83 } uw_app; | 90 } uw_app; |
84 | 91 |
85 #define ERROR_BUF_LEN 1024 | 92 #define ERROR_BUF_LEN 1024 |
86 | 93 |
87 #endif | 94 #endif |