Mercurial > ~mikael > mcabber > hg
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mcabber/mcabber/events.h Mon Jan 18 15:36:19 2010 +0200 @@ -0,0 +1,48 @@ +#ifndef __MCABBER_EVENTS_H__ +#define __MCABBER_EVENTS_H__ 1 + +#include <mcabber/config.h> + +#define EVS_DEFAULT_TIMEOUT 90 +#define EVS_MAX_TIMEOUT 432000 + +#define EVS_CONTEXT_TIMEOUT 0U +#define EVS_CONTEXT_CANCEL 1U +#define EVS_CONTEXT_USER 2U + +typedef enum { + EVS_TYPE_SUBSCRIPTION = 1, + EVS_TYPE_INVITATION = 2, +#ifdef MODULES_ENABLE + EVS_TYPE_USER = 3, +#endif +} evs_type; + +/* Common structure for events (evs) and IQ requests (iqs) */ +typedef struct { + char *id; + time_t ts_create; + time_t ts_expire; + guint8 type; + gpointer data; + int (*callback)(); + char *desc; +} eviqs; + +typedef struct { + char* to; + char* from; + char* passwd; + char* reason; +} event_muc_invitation; + +eviqs *evs_new(guint8 type, time_t timeout); +int evs_del(const char *evid); +int evs_callback(const char *evid, guint evcontext); +gboolean evs_check_timeout(); +void evs_display_list(void); +GSList *evs_geteventslist(int forcompl); + +#endif /* __MCABBER_EVENTS_H__ */ + +/* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */