Mercurial > ~mikael > mcabber > hg
annotate mcabber/mcabber/hooks.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/hooks.h@c3d0cb4dc9d4 |
children | b09f82f61745 |
rev | line source |
---|---|
1668
41c26b7d2890
Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1658
diff
changeset
|
1 #ifndef __MCABBER_HOOKS_H__ |
41c26b7d2890
Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1658
diff
changeset
|
2 #define __MCABBER_HOOKS_H__ 1 |
113 | 3 |
4 #include <time.h> | |
1598 | 5 #include <loudmouth/loudmouth.h> |
1668
41c26b7d2890
Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1658
diff
changeset
|
6 #include <mcabber/xmpp.h> |
113 | 7 |
1484
7b36b91a4388
New UI message flag (O) when OTR is used
Mikael Berthe <mikael@lilotux.net>
parents:
1425
diff
changeset
|
8 // These two defines are used by hk_message_{in,out} arguments |
7b36b91a4388
New UI message flag (O) when OTR is used
Mikael Berthe <mikael@lilotux.net>
parents:
1425
diff
changeset
|
9 #define ENCRYPTED_PGP 1 |
7b36b91a4388
New UI message flag (O) when OTR is used
Mikael Berthe <mikael@lilotux.net>
parents:
1425
diff
changeset
|
10 #define ENCRYPTED_OTR 2 |
113 | 11 |
1668
41c26b7d2890
Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1658
diff
changeset
|
12 #include <mcabber/config.h> |
1607 | 13 #ifdef MODULES_ENABLE |
14 #include <glib.h> | |
15 | |
1623
b008ac166b91
Flags for hook handlers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1607
diff
changeset
|
16 #define HOOK_MESSAGE_IN ( 0x00000001 ) |
b008ac166b91
Flags for hook handlers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1607
diff
changeset
|
17 #define HOOK_MESSAGE_OUT ( 0x00000002 ) |
b008ac166b91
Flags for hook handlers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1607
diff
changeset
|
18 #define HOOK_STATUS_CHANGE ( 0x00000004 ) |
b008ac166b91
Flags for hook handlers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1607
diff
changeset
|
19 #define HOOK_MY_STATUS_CHANGE ( 0x00000008 ) |
b008ac166b91
Flags for hook handlers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1607
diff
changeset
|
20 #define HOOK_INTERNAL ( 0x00000010 ) |
b008ac166b91
Flags for hook handlers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1607
diff
changeset
|
21 |
1607 | 22 typedef struct { |
23 const char *name; | |
24 const char *value; | |
25 } hk_arg_t; | |
26 | |
1623
b008ac166b91
Flags for hook handlers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1607
diff
changeset
|
27 typedef void (*hk_handler_t) (guint32 flags, hk_arg_t *args, gpointer userdata); |
1607 | 28 |
1623
b008ac166b91
Flags for hook handlers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1607
diff
changeset
|
29 void hk_add_handler (hk_handler_t handler, guint32 flags, gpointer userdata); |
1607 | 30 void hk_del_handler (hk_handler_t handler, gpointer userdata); |
31 #endif | |
32 | |
1398
f8321420ed7a
Remove useless inline's
Mikael Berthe <mikael@lilotux.net>
parents:
1352
diff
changeset
|
33 void hk_message_in(const char *bjid, const char *resname, |
1598 | 34 time_t timestamp, const char *msg, LmMessageSubType type, |
35 guint encrypted); | |
1398
f8321420ed7a
Remove useless inline's
Mikael Berthe <mikael@lilotux.net>
parents:
1352
diff
changeset
|
36 void hk_message_out(const char *bjid, const char *nickname, |
1602 | 37 time_t timestamp, const char *msg, |
38 guint encrypted, gpointer xep184); | |
1398
f8321420ed7a
Remove useless inline's
Mikael Berthe <mikael@lilotux.net>
parents:
1352
diff
changeset
|
39 void hk_statuschange(const char *bjid, const char *resname, gchar prio, |
1598 | 40 time_t timestamp, enum imstatus status, |
41 char const *status_msg); | |
1398
f8321420ed7a
Remove useless inline's
Mikael Berthe <mikael@lilotux.net>
parents:
1352
diff
changeset
|
42 void hk_mystatuschange(time_t timestamp, |
438
b44be19d6229
Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents:
393
diff
changeset
|
43 enum imstatus old_status, |
b44be19d6229
Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents:
393
diff
changeset
|
44 enum imstatus new_status, const char *msg); |
113 | 45 |
1352
61a54e172010
Add internal hooks support
Mikael Berthe <mikael@lilotux.net>
parents:
1058
diff
changeset
|
46 void hook_execute_internal(const char *hookname); |
61a54e172010
Add internal hooks support
Mikael Berthe <mikael@lilotux.net>
parents:
1058
diff
changeset
|
47 |
281
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
221
diff
changeset
|
48 void hk_ext_cmd_init(const char *command); |
1058 | 49 void hk_ext_cmd(const char *bjid, guchar type, guchar info, const char *data); |
160 | 50 |
1668
41c26b7d2890
Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1658
diff
changeset
|
51 #endif /* __MCABBER_HOOKS_H__ */ |
576 | 52 |
580 | 53 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |