870619601792efaf0bebc169e6332d8cf08c7375
[citadel.git] / citadel / modules / extnotify / extnotify.h
1 /* 
2  * File:   extnotify.h
3  * Author: Mathew McBride <matt@mcbridematt.dhs.org> / <matt@comalies>
4  *
5  * Created on January 13, 2008, 9:34 PM
6  */
7
8 #ifdef  __cplusplus
9 extern "C" {
10 #endif
11
12 #define FUNAMBOL_CONFIG_TEXT "funambol"
13 #define PAGER_CONFIG_MESSAGE "__ Push email settings __"
14 #define PAGER_CONFIG_SYSTEM  "textmessage"    
15 #define PAGER_CONFIG_HTTP  "httpmessage"    
16
17 #define FUNAMBOL_WS "/funambol/services/admin"
18
19 typedef struct _NotifyContext {
20         StrBuf **NotifyHostList;
21         HashList *NotifyErrors;
22 } NotifyContext;
23
24 int notify_http_server(char *remoteurl, 
25                        const char* template, 
26                        long tlen, 
27                        char *user,
28                        char *msgid, 
29                        long MsgNum, 
30                        NotifyContext *Ctx);
31
32 void ExtNotify_PutErrorMessage(NotifyContext *Ctx, StrBuf *ErrMsg);
33
34 void extNotify_getPrefs(long configMsgNum, char *configMsg);
35 long extNotify_getConfigMessage(char *username);
36 void process_notify(long msgnum, void *usrdata);
37
38 #ifdef  __cplusplus
39 }
40 #endif
41
42