Mercurial > pidgin
annotate libpurple/protocols/jabber/caps.h @ 29461:3370fc087d6c
Remove the #warning about not enought bits now that OscarCapability is matched
with a guint64 in aim_caps in family_locate.c
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Sun, 07 Feb 2010 21:51:17 +0000 |
parents | c585572e80dd |
children | 6362579b3d2e |
rev | line source |
---|---|
17882
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
1 /* |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
2 * purple - Jabber Protocol Plugin |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
3 * |
28048
c585572e80dd
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents:
28047
diff
changeset
|
4 * Purple is the legal property of its developers, whose names are too numerous |
c585572e80dd
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents:
28047
diff
changeset
|
5 * to list here. Please refer to the COPYRIGHT file distributed with this |
c585572e80dd
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents:
28047
diff
changeset
|
6 * source distribution. |
17882
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
7 * |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
8 * This program is free software; you can redistribute it and/or modify |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
10 * the Free Software Foundation; either version 2 of the License, or |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
11 * (at your option) any later version. |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
12 * |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
16 * GNU General Public License for more details. |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
17 * |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
19 * along with this program; if not, write to the Free Software |
28047
8c991e09efcb
Update various header copyrights thanks to licensecheck.
Paul Aurich <paul@darkrain42.org>
parents:
26846
diff
changeset
|
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
17882
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
21 * |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
22 */ |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
23 |
26481
5767b7698c73
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents:
17882
diff
changeset
|
24 #ifndef PURPLE_JABBER_CAPS_H_ |
5767b7698c73
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents:
17882
diff
changeset
|
25 #define PURPLE_JABBER_CAPS_H_ |
17882
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
26 |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
27 typedef struct _JabberCapsClientInfo JabberCapsClientInfo; |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
28 |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
29 #include "jabber.h" |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
30 |
25166
18fdbe507fdd
Make capstable caps.c-only and add a jabber_caps_uninit() function
Paul Aurich <paul@darkrain42.org>
parents:
25162
diff
changeset
|
31 /* Implementation of XEP-0115 - Entity Capabilities */ |
17882
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
32 |
25189
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
33 typedef struct _JabberCapsNodeExts JabberCapsNodeExts; |
17882
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
34 |
26845
70fdb6fc8aee
Make the JabberCapsTuple (nee Key) available to the rest of the prpl
Paul Aurich <paul@darkrain42.org>
parents:
26487
diff
changeset
|
35 typedef struct _JabberCapsTuple { |
70fdb6fc8aee
Make the JabberCapsTuple (nee Key) available to the rest of the prpl
Paul Aurich <paul@darkrain42.org>
parents:
26487
diff
changeset
|
36 const char *node; |
70fdb6fc8aee
Make the JabberCapsTuple (nee Key) available to the rest of the prpl
Paul Aurich <paul@darkrain42.org>
parents:
26487
diff
changeset
|
37 const char *ver; |
70fdb6fc8aee
Make the JabberCapsTuple (nee Key) available to the rest of the prpl
Paul Aurich <paul@darkrain42.org>
parents:
26487
diff
changeset
|
38 const char *hash; |
70fdb6fc8aee
Make the JabberCapsTuple (nee Key) available to the rest of the prpl
Paul Aurich <paul@darkrain42.org>
parents:
26487
diff
changeset
|
39 } JabberCapsTuple; |
70fdb6fc8aee
Make the JabberCapsTuple (nee Key) available to the rest of the prpl
Paul Aurich <paul@darkrain42.org>
parents:
26487
diff
changeset
|
40 |
17882
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
41 struct _JabberCapsClientInfo { |
25154
30a686c079d5
Remove JabberCapsIdentity and just use JabberIdentity everywhere
Paul Aurich <paul@darkrain42.org>
parents:
25151
diff
changeset
|
42 GList *identities; /* JabberIdentity */ |
17882
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
43 GList *features; /* char * */ |
25018
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
44 GList *forms; /* xmlnode * */ |
25189
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
45 JabberCapsNodeExts *exts; |
26845
70fdb6fc8aee
Make the JabberCapsTuple (nee Key) available to the rest of the prpl
Paul Aurich <paul@darkrain42.org>
parents:
26487
diff
changeset
|
46 |
70fdb6fc8aee
Make the JabberCapsTuple (nee Key) available to the rest of the prpl
Paul Aurich <paul@darkrain42.org>
parents:
26487
diff
changeset
|
47 const JabberCapsTuple tuple; |
17882
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
48 }; |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
49 |
25189
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
50 /* |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
51 * This stores a set of exts "known" for a specific node (which indicates |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
52 * a specific client -- for reference, Pidgin, Finch, Meebo, et al share one |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
53 * node.) In XEP-0115 v1.3, exts are used for features that may or may not be |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
54 * present at a given time (PEP things, buzz might be disabled, etc). |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
55 * |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
56 * This structure is shared among all JabberCapsClientInfo instances matching |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
57 * a specific node (if the capstable key->hash == NULL, which indicates that |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
58 * the ClientInfo is using v1.3 caps as opposed to v1.5 caps). |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
59 * |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
60 * It's only exposed so that jabber_resource_has_capability can use it. |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
61 * Everyone else, STAY AWAY! |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
62 */ |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
63 struct _JabberCapsNodeExts { |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
64 guint ref; |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
65 GHashTable *exts; /* char *ext_name -> GList *features */ |
17882
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
66 }; |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
67 |
25189
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
68 typedef void (*jabber_caps_get_info_cb)(JabberCapsClientInfo *info, GList *exts, gpointer user_data); |
17882
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
69 |
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
70 void jabber_caps_init(void); |
25166
18fdbe507fdd
Make capstable caps.c-only and add a jabber_caps_uninit() function
Paul Aurich <paul@darkrain42.org>
parents:
25162
diff
changeset
|
71 void jabber_caps_uninit(void); |
17882
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
72 |
26846
d0a049ede31e
Only call jabber_caps_get_info if we don't have all the information we want.
Paul Aurich <paul@darkrain42.org>
parents:
26845
diff
changeset
|
73 /** |
d0a049ede31e
Only call jabber_caps_get_info if we don't have all the information we want.
Paul Aurich <paul@darkrain42.org>
parents:
26845
diff
changeset
|
74 * Check whether all of the exts in a char* array are known to the given info. |
d0a049ede31e
Only call jabber_caps_get_info if we don't have all the information we want.
Paul Aurich <paul@darkrain42.org>
parents:
26845
diff
changeset
|
75 */ |
d0a049ede31e
Only call jabber_caps_get_info if we don't have all the information we want.
Paul Aurich <paul@darkrain42.org>
parents:
26845
diff
changeset
|
76 gboolean jabber_caps_exts_known(const JabberCapsClientInfo *info, char **exts); |
25027
45816181b7de
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25025
diff
changeset
|
77 |
25022
4c97156431b4
* pass hash type to the caps handling functions
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25021
diff
changeset
|
78 /** |
25187
6bdcdb77ce77
Reference-count JabberCapsClientInfo and fix bug.
Paul Aurich <paul@darkrain42.org>
parents:
25166
diff
changeset
|
79 * Main entity capabilites function to get the capabilities of a contact. |
6bdcdb77ce77
Reference-count JabberCapsClientInfo and fix bug.
Paul Aurich <paul@darkrain42.org>
parents:
25166
diff
changeset
|
80 * |
25189
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
81 * The callback will be called synchronously if we already have the |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
82 * capabilities for the specified (node,ver,hash) (and, if exts are specified, |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
83 * if we know what each means) |
26846
d0a049ede31e
Only call jabber_caps_get_info if we don't have all the information we want.
Paul Aurich <paul@darkrain42.org>
parents:
26845
diff
changeset
|
84 * |
d0a049ede31e
Only call jabber_caps_get_info if we don't have all the information we want.
Paul Aurich <paul@darkrain42.org>
parents:
26845
diff
changeset
|
85 * @param exts A g_strsplit'd (NULL-terminated) array of strings. This |
d0a049ede31e
Only call jabber_caps_get_info if we don't have all the information we want.
Paul Aurich <paul@darkrain42.org>
parents:
26845
diff
changeset
|
86 * function is responsible for freeing it. |
25022
4c97156431b4
* pass hash type to the caps handling functions
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25021
diff
changeset
|
87 */ |
25189
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
88 void jabber_caps_get_info(JabberStream *js, const char *who, const char *node, |
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
89 const char *ver, const char *hash, |
26846
d0a049ede31e
Only call jabber_caps_get_info if we don't have all the information we want.
Paul Aurich <paul@darkrain42.org>
parents:
26845
diff
changeset
|
90 char **exts, jabber_caps_get_info_cb cb, |
25189
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
91 gpointer user_data); |
25017
26eabe8e739b
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17882
diff
changeset
|
92 |
25018
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
93 /** |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
94 * Takes a JabberCapsClientInfo pointer and returns the caps hash according to |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
95 * XEP-0115 Version 1.5. |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
96 * |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
97 * @param info A JabberCapsClientInfo pointer. |
25024
fd19927e2b64
* support for calculating both hashes, sha-1 and md5
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25022
diff
changeset
|
98 * @param hash Hash cipher to be used. Either sha-1 or md5. |
25189
05693f6885a4
Support old (XEP v1.3) Entity Capabilities alongside the new ones.
Paul Aurich <paul@darkrain42.org>
parents:
25187
diff
changeset
|
99 * @return The base64 encoded SHA-1 hash; must be freed by caller |
25018
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
100 */ |
25145
1225f3dcf5ab
Fix compilation errors and many warnings
Paul Aurich <paul@darkrain42.org>
parents:
25053
diff
changeset
|
101 gchar *jabber_caps_calculate_hash(JabberCapsClientInfo *info, const char *hash); |
25018
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
102 |
25053
84ff003a7d33
* adding some missing documentation
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25032
diff
changeset
|
103 /** |
25145
1225f3dcf5ab
Fix compilation errors and many warnings
Paul Aurich <paul@darkrain42.org>
parents:
25053
diff
changeset
|
104 * Calculate SHA1 hash for own featureset. |
25053
84ff003a7d33
* adding some missing documentation
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25032
diff
changeset
|
105 */ |
25145
1225f3dcf5ab
Fix compilation errors and many warnings
Paul Aurich <paul@darkrain42.org>
parents:
25053
diff
changeset
|
106 void jabber_caps_calculate_own_hash(JabberStream *js); |
25017
26eabe8e739b
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17882
diff
changeset
|
107 |
26eabe8e739b
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17882
diff
changeset
|
108 /** Get the current caps hash. |
26eabe8e739b
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17882
diff
changeset
|
109 * @ret hash |
26eabe8e739b
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17882
diff
changeset
|
110 **/ |
25146
4040da08a733
Entity Capabilities must be per-JabberStream
Paul Aurich <paul@darkrain42.org>
parents:
25145
diff
changeset
|
111 const gchar* jabber_caps_get_own_hash(JabberStream *js); |
25017
26eabe8e739b
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17882
diff
changeset
|
112 |
25032
7f6558c7a0a3
* implemented jabber_caps_broadcast_change() and finished jabber_ipc_add_feature() IPC function
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25028
diff
changeset
|
113 /** |
25053
84ff003a7d33
* adding some missing documentation
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25032
diff
changeset
|
114 * Broadcast a new calculated hash using a <presence> stanza. |
25032
7f6558c7a0a3
* implemented jabber_caps_broadcast_change() and finished jabber_ipc_add_feature() IPC function
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25028
diff
changeset
|
115 */ |
25145
1225f3dcf5ab
Fix compilation errors and many warnings
Paul Aurich <paul@darkrain42.org>
parents:
25053
diff
changeset
|
116 void jabber_caps_broadcast_change(void); |
17882
f88b3a093cba
Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff
changeset
|
117 |
26481
5767b7698c73
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents:
17882
diff
changeset
|
118 #endif /* PURPLE_JABBER_CAPS_H_ */ |