ccdd95979ca5c58d42fb9f96a20382d41cffd264
[citadel.git] / citadel / serv_extensions.h
1 /* $Id$ */
2
3 #ifndef SERV_EXTENSIONS_H
4 #define SERV_EXTENSIONS_H
5
6 #include "server.h"
7
8 /*
9  * This is where we declare all of the server extensions we have.
10  * We'll probably start moving these to a more sane location in the near
11  * future.  For now, this just shuts up the compiler.
12  */
13 char *serv_bio_init(void);
14 char *serv_calendar_init(void);
15 void serv_calendar_destroy(void);
16 char *serv_notes_init(void);
17 char *serv_ldap_init(void);
18 char *serv_chat_init(void);
19 char *serv_expire_init(void);
20 char *serv_imap_init(void);
21 char *serv_inetcfg_init(void);
22 char *serv_listsub_init(void);
23 char *serv_mrtg_init(void);
24 char *serv_netfilter_init(void);
25 char *serv_network_init(void);
26 char *serv_newuser_init(void);
27 char *serv_pas2_init(void);
28 char *serv_pop3_init(void);
29 char *serv_rwho_init(void);
30 char *serv_smtp_init(void);
31 char *serv_spam_init(void);
32 char *serv_test_init(void);
33 char *serv_upgrade_init(void);
34 char *serv_vandelay_init(void);
35 char *serv_vcard_init(void);
36 char *serv_fulltext_init(void);
37 char *serv_autocompletion_init(void);
38 char *serv_postfix_tcpdict(void);
39 char *serv_managesieve_init(void);
40 char *serv_sieve_init(void);
41 char *serv_funambol_init(void);
42 /*
43  */
44
45 void initialize_server_extensions(void);
46 int DLoader_Exec_Cmd(char *cmdbuf);
47 char *Dynamic_Module_Init(void);
48
49 void CtdlRegisterSessionHook(void (*fcn_ptr)(void), int EventType);
50 void CtdlUnregisterSessionHook(void (*fcn_ptr)(void), int EventType);
51 void CtdlDestroySessionHooks(void);
52 void PerformSessionHooks(int EventType);
53
54 void CtdlRegisterUserHook(void (*fcn_ptr)(struct ctdluser *), int EventType);
55 void CtdlUnregisterUserHook(void (*fcn_ptr)(struct ctdluser *), int EventType);
56 void CtdlDestroyUserHooks(void);
57 void PerformUserHooks(struct ctdluser *usbuf, int EventType);
58
59 void CtdlRegisterXmsgHook(int (*fcn_ptr)(char *, char *, char *), int order);
60 void CtdlUnregisterXmsgHook(int (*fcn_ptr)(char *, char *, char *), int order);
61 int PerformXmsgHooks(char *, char *, char *);
62 void CtdlDestroyXmsgHooks(void);
63
64
65
66 void CtdlRegisterMessageHook(int (*handler)(struct CtdlMessage *),
67                                                         int EventType);
68 void CtdlUnregisterMessageHook(int (*handler)(struct CtdlMessage *),
69                                                         int EventType);
70 void CtdlDestroyMessageHook(void);
71 int PerformMessageHooks(struct CtdlMessage *, int EventType);
72
73
74 void CtdlRegisterNetprocHook(int (*handler)(struct CtdlMessage *, char *) );
75 void CtdlUnregisterNetprocHook(int (*handler)(struct CtdlMessage *, char *) );
76 void CtdlDestroyNetprocHooks(void);
77 int PerformNetprocHooks(struct CtdlMessage *, char *);
78
79 void CtdlRegisterRoomHook(int (*fcn_ptr)(struct ctdlroom *) );
80 void CtdlUnregisterRoomHook(int (*fnc_ptr)(struct ctdlroom *) );
81 void CtdlDestroyRoomHooks(void);
82 int PerformRoomHooks(struct ctdlroom *);
83
84
85 void CtdlRegisterDeleteHook(void (*handler)(char *, long) );
86 void CtdlUnregisterDeleteHook(void (*handler)(char *, long) );
87 void CtdlDestroyDeleteHooks(void);
88 void PerformDeleteHooks(char *, long);
89
90
91 void CtdlRegisterCleanupHook(void (*fcn_ptr)(void));
92 void CtdlUnregisterCleanupHook(void (*fcn_ptr)(void));
93 void CtdlDestroyCleanupHooks(void);
94 void CtdlRegisterProtoHook(void (*handler)(char *), char *cmd, char *desc);
95 void CtdlUnregisterProtoHook(void (*handler)(char *), char *cmd);
96 void CtdlDestroyProtoHooks(void);
97 void CtdlRegisterServiceHook(int tcp_port,
98                         char *sockpath,
99                         void (*h_greeting_function) (void),
100                         void (*h_command_function) (void),
101                         void (*h_async_function) (void)
102 );
103 void CtdlUnregisterServiceHook(int tcp_port,
104                         char *sockpath,
105                         void (*h_greeting_function) (void),
106                         void (*h_command_function) (void),
107                         void (*h_async_function) (void)
108 );
109 void CtdlDestroyServiceHook(void);
110
111 void CtdlRegisterFixedOutputHook(char *content_type,
112                         void (*output_function) (char *supplied_data, int len)
113 );
114 void CtdlUnRegisterFixedOutputHook(char *content_type);
115 void CtdlDestroyFixedOutputHooks(void);
116 int PerformFixedOutputHooks(char *, char *, int);
117
118 #endif /* SERV_EXTENSIONS_H */