comparison mcabber/mcabber/events.h @ 1668:41c26b7d2890

Install mcabber headers * Change mcabber headers naming scheme * Move 'src/' -> 'mcabber/' * Add missing include <mcabber/config.h>'s * Create and install clean config.h version in 'include/' * Move "dirty" config.h version to 'mcabber/' * Add $(top_srcdir) to compiler include path * Update modules HOWTO
author Myhailo Danylenko <isbear@ukrpost.net>
date Mon, 18 Jan 2010 15:36:19 +0200
parents mcabber/src/events.h@14690e624e9d
children 1342df44c814
comparison
equal deleted inserted replaced
1667:8af0e0ad20ad 1668:41c26b7d2890
1 #ifndef __MCABBER_EVENTS_H__
2 #define __MCABBER_EVENTS_H__ 1
3
4 #include <mcabber/config.h>
5
6 #define EVS_DEFAULT_TIMEOUT 90
7 #define EVS_MAX_TIMEOUT 432000
8
9 #define EVS_CONTEXT_TIMEOUT 0U
10 #define EVS_CONTEXT_CANCEL 1U
11 #define EVS_CONTEXT_USER 2U
12
13 typedef enum {
14 EVS_TYPE_SUBSCRIPTION = 1,
15 EVS_TYPE_INVITATION = 2,
16 #ifdef MODULES_ENABLE
17 EVS_TYPE_USER = 3,
18 #endif
19 } evs_type;
20
21 /* Common structure for events (evs) and IQ requests (iqs) */
22 typedef struct {
23 char *id;
24 time_t ts_create;
25 time_t ts_expire;
26 guint8 type;
27 gpointer data;
28 int (*callback)();
29 char *desc;
30 } eviqs;
31
32 typedef struct {
33 char* to;
34 char* from;
35 char* passwd;
36 char* reason;
37 } event_muc_invitation;
38
39 eviqs *evs_new(guint8 type, time_t timeout);
40 int evs_del(const char *evid);
41 int evs_callback(const char *evid, guint evcontext);
42 gboolean evs_check_timeout();
43 void evs_display_list(void);
44 GSList *evs_geteventslist(int forcompl);
45
46 #endif /* __MCABBER_EVENTS_H__ */
47
48 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */