annotate mcabber/mcabber/events.h @ 2327:8ecc28068748 default tip

Silence another compiler warning (-Wimplicit-fallthrough)
author Mikael Berthe <mikael@lilotux.net>
date Fri, 28 Sep 2018 17:56:42 +0200
parents e6d355e50d7a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1668
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1607
diff changeset
1 #ifndef __MCABBER_EVENTS_H__
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1607
diff changeset
2 #define __MCABBER_EVENTS_H__ 1
745
413e95f3051a Introduce user "events" list
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
3
1668
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1607
diff changeset
4 #include <mcabber/config.h>
745
413e95f3051a Introduce user "events" list
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
5
413e95f3051a Introduce user "events" list
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
6 #define EVS_DEFAULT_TIMEOUT 90
747
9875bc774ddf Event maximum timeout could be higher... Set to 5 days.
Mikael Berthe <mikael@lilotux.net>
parents: 745
diff changeset
7 #define EVS_MAX_TIMEOUT 432000
745
413e95f3051a Introduce user "events" list
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
8
952
527d6f234924 Small code cleanup
Mikael Berthe <mikael@lilotux.net>
parents: 820
diff changeset
9 #define EVS_CONTEXT_TIMEOUT 0U
527d6f234924 Small code cleanup
Mikael Berthe <mikael@lilotux.net>
parents: 820
diff changeset
10 #define EVS_CONTEXT_CANCEL 1U
1685
1342df44c814 Improved events interface
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1668
diff changeset
11 #define EVS_CONTEXT_ACCEPT 2U
1342df44c814 Improved events interface
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1668
diff changeset
12 #define EVS_CONTEXT_REJECT 3U
1342df44c814 Improved events interface
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1668
diff changeset
13 /* There can be other user-defined contexts */
745
413e95f3051a Introduce user "events" list
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
14
1685
1342df44c814 Improved events interface
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1668
diff changeset
15 typedef gboolean (*evs_callback_t)(guint context, const char *arg, gpointer userdata);
749
6c633adaae10 Use events system for subscription requests
Mikael Berthe <mikael@lilotux.net>
parents: 748
diff changeset
16
1685
1342df44c814 Improved events interface
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1668
diff changeset
17 const char *evs_new(const char *description, const char *id, time_t timeout, evs_callback_t callback, gpointer userdata, GDestroyNotify notify);
1342df44c814 Improved events interface
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1668
diff changeset
18 int evs_del(const char *evid);
1342df44c814 Improved events interface
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1668
diff changeset
19 int evs_callback(const char *evid, guint evcontext, const char *arg);
1342df44c814 Improved events interface
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1668
diff changeset
20 void evs_display_list(void);
1342df44c814 Improved events interface
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1668
diff changeset
21 GSList *evs_geteventslist(void);
1342df44c814 Improved events interface
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1668
diff changeset
22 void evs_deinit(void);
745
413e95f3051a Introduce user "events" list
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
23
1668
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1607
diff changeset
24 #endif /* __MCABBER_EVENTS_H__ */
745
413e95f3051a Introduce user "events" list
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
25
1811
e6d355e50d7a Update Vim modelines
Mikael Berthe <mikael@lilotux.net>
parents: 1685
diff changeset
26 /* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2: For Vim users... */