Mercurial > pidgin
annotate libpurple/protocols/jabber/caps.h @ 25152:8789b9202c06
Use strcmp instead of a wrapper
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Fri, 21 Nov 2008 17:47:12 +0000 |
parents | 504c98a90ef5 |
children | 30a686c079d5 |
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 * |
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
|
4 * Copyright (C) 2007, Andreas Monitzer <andy@monitzer.com> |
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
|
5 * |
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
|
6 * 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
|
7 * 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
|
8 * 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
|
9 * (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
|
10 * |
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 * 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
|
12 * 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
|
13 * 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
|
14 * 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
|
15 * |
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 * 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
|
17 * along with this program; if not, write to the Free Software |
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 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
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 * |
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
|
20 */ |
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 #ifndef _PURPLE_JABBER_CAPS_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
|
23 #define _PURPLE_JABBER_CAPS_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
|
24 |
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
|
25 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
|
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 #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
|
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 /* Implementation of XEP-0115 */ |
25028
e6f92c0f9770
* adding IPC function 'contact_has_feature'
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25027
diff
changeset
|
30 extern GHashTable *capstable; |
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
|
31 |
25020
9867a406707e
* defined JabberCapsIdentity as struct _JabberIdentity
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25018
diff
changeset
|
32 typedef struct _JabberIdentity JabberCapsIdentity; |
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
|
33 |
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 struct _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
|
35 GList *identities; /* JabberCapsIdentity */ |
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
|
36 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
|
37 GList *forms; /* xmlnode * */ |
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
|
38 }; |
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
|
39 |
25151
504c98a90ef5
constify, ifdef out an old-caps remnant, and rewrite a little
Paul Aurich <paul@darkrain42.org>
parents:
25146
diff
changeset
|
40 #if 0 |
25025
a85f9b85a7fb
* changed storage format for cache to mirror all needed features for XEP-0115v1.5
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25024
diff
changeset
|
41 typedef struct _JabberCapsClientInfo JabberCapsValueExt; |
25151
504c98a90ef5
constify, ifdef out an old-caps remnant, and rewrite a little
Paul Aurich <paul@darkrain42.org>
parents:
25146
diff
changeset
|
42 #endif |
25025
a85f9b85a7fb
* changed storage format for cache to mirror all needed features for XEP-0115v1.5
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25024
diff
changeset
|
43 |
25021
a5e437b7f915
* implemented jabber_caps_calcualte_hash() which calculates the SHA-1 hash for someones disco response according to XEP-0115
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25020
diff
changeset
|
44 typedef struct _JabberDataFormField { |
a5e437b7f915
* implemented jabber_caps_calcualte_hash() which calculates the SHA-1 hash for someones disco response according to XEP-0115
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25020
diff
changeset
|
45 gchar *var; |
a5e437b7f915
* implemented jabber_caps_calcualte_hash() which calculates the SHA-1 hash for someones disco response according to XEP-0115
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25020
diff
changeset
|
46 GList *values; |
a5e437b7f915
* implemented jabber_caps_calcualte_hash() which calculates the SHA-1 hash for someones disco response according to XEP-0115
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25020
diff
changeset
|
47 } JabberDataFormField; |
a5e437b7f915
* implemented jabber_caps_calcualte_hash() which calculates the SHA-1 hash for someones disco response according to XEP-0115
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25020
diff
changeset
|
48 |
25027
45816181b7de
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25025
diff
changeset
|
49 typedef struct _JabberCapsKey { |
45816181b7de
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25025
diff
changeset
|
50 char *node; |
45816181b7de
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25025
diff
changeset
|
51 char *ver; |
45816181b7de
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25025
diff
changeset
|
52 char *hash; |
45816181b7de
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25025
diff
changeset
|
53 } JabberCapsKey; |
45816181b7de
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25025
diff
changeset
|
54 |
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
|
55 typedef void (*jabber_caps_get_info_cb)(JabberCapsClientInfo *info, gpointer user_data); |
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
|
56 |
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
|
57 void jabber_caps_init(void); |
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
|
58 |
25027
45816181b7de
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25025
diff
changeset
|
59 void jabber_caps_destroy_key(gpointer value); |
45816181b7de
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25025
diff
changeset
|
60 |
25022
4c97156431b4
* pass hash type to the caps handling functions
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25021
diff
changeset
|
61 /** |
4c97156431b4
* pass hash type to the caps handling functions
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25021
diff
changeset
|
62 * Main entity capabilites function to get the capabilities of a contact. |
4c97156431b4
* pass hash type to the caps handling functions
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25021
diff
changeset
|
63 */ |
4c97156431b4
* pass hash type to the caps handling functions
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25021
diff
changeset
|
64 void jabber_caps_get_info(JabberStream *js, const char *who, const char *node, const char *ver, const char *hash, jabber_caps_get_info_cb cb, 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
|
65 void jabber_caps_free_clientinfo(JabberCapsClientInfo *clientinfo); |
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 |
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
|
67 /** |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
68 * Processes a query-node and returns a JabberCapsClientInfo object with all relevant info. |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
69 * |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
70 * @param query A query object. |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
71 * @return A JabberCapsClientInfo object. |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
72 */ |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
73 JabberCapsClientInfo *jabber_caps_parse_client_info(xmlnode *query); |
25017
26eabe8e739b
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17882
diff
changeset
|
74 |
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
|
75 /** |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
76 * 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
|
77 * 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
|
78 * |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
79 * @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
|
80 * @param hash Hash cipher to be used. Either sha-1 or md5. |
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
|
81 * @return The base64 encoded SHA-1 hash; needs to be freed if not needed |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
82 * any furthermore. |
2a6a37c7970b
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25017
diff
changeset
|
83 */ |
25145
1225f3dcf5ab
Fix compilation errors and many warnings
Paul Aurich <paul@darkrain42.org>
parents:
25053
diff
changeset
|
84 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
|
85 |
25053
84ff003a7d33
* adding some missing documentation
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25032
diff
changeset
|
86 /** |
25145
1225f3dcf5ab
Fix compilation errors and many warnings
Paul Aurich <paul@darkrain42.org>
parents:
25053
diff
changeset
|
87 * Calculate SHA1 hash for own featureset. |
25053
84ff003a7d33
* adding some missing documentation
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25032
diff
changeset
|
88 */ |
25145
1225f3dcf5ab
Fix compilation errors and many warnings
Paul Aurich <paul@darkrain42.org>
parents:
25053
diff
changeset
|
89 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
|
90 |
26eabe8e739b
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17882
diff
changeset
|
91 /** 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
|
92 * @ret hash |
26eabe8e739b
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17882
diff
changeset
|
93 **/ |
25146
4040da08a733
Entity Capabilities must be per-JabberStream
Paul Aurich <paul@darkrain42.org>
parents:
25145
diff
changeset
|
94 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
|
95 |
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
|
96 /** |
25053
84ff003a7d33
* adding some missing documentation
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25032
diff
changeset
|
97 * 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
|
98 */ |
25145
1225f3dcf5ab
Fix compilation errors and many warnings
Paul Aurich <paul@darkrain42.org>
parents:
25053
diff
changeset
|
99 void jabber_caps_broadcast_change(void); |
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
|
100 |
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
|
101 #endif /* _PURPLE_JABBER_CAPS_H_ */ |