Fri, 21 Nov 2008 18:24:31 +0000
Remove JabberCapsIdentity and just use JabberIdentity everywhere
|
17816
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
1 | /* |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
2 | * purple - Jabber Protocol Plugin |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
3 | * |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
4 | * Copyright (C) 2007, Andreas Monitzer <andy@monitzer.com> |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
5 | * |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
6 | * This program is free software; you can redistribute it and/or modify |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
7 | * it under the terms of the GNU General Public License as published by |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
8 | * the Free Software Foundation; either version 2 of the License, or |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
9 | * (at your option) any later version. |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
10 | * |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
11 | * This program is distributed in the hope that it will be useful, |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
14 | * GNU General Public License for more details. |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
15 | * |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
16 | * You should have received a copy of the GNU General Public License |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
17 | * along with this program; if not, write to the Free Software |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
19 | * |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
20 | */ |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
21 | |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
22 | #ifndef _PURPLE_JABBER_CAPS_H_ |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
23 | #define _PURPLE_JABBER_CAPS_H_ |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
24 | |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
25 | typedef struct _JabberCapsClientInfo JabberCapsClientInfo; |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
26 | |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
27 | #include "jabber.h" |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
28 | |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
29 | /* Implementation of XEP-0115 */ |
|
23597
ec0bcdfa1da1
* adding IPC function 'contact_has_feature'
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23596
diff
changeset
|
30 | extern GHashTable *capstable; |
|
17816
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
31 | |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
32 | struct _JabberCapsClientInfo { |
|
24724
54e94c5f6978
Remove JabberCapsIdentity and just use JabberIdentity everywhere
Paul Aurich <darkrain42@pidgin.im>
parents:
24721
diff
changeset
|
33 | GList *identities; /* JabberIdentity */ |
|
17816
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
34 | GList *features; /* char * */ |
|
23587
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
35 | GList *forms; /* xmlnode * */ |
|
17816
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
36 | }; |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
37 | |
|
24721
227944e5d0d6
constify, ifdef out an old-caps remnant, and rewrite a little
Paul Aurich <darkrain42@pidgin.im>
parents:
24716
diff
changeset
|
38 | #if 0 |
|
23594
f80bec337aa7
* changed storage format for cache to mirror all needed features for XEP-0115v1.5
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23593
diff
changeset
|
39 | typedef struct _JabberCapsClientInfo JabberCapsValueExt; |
|
24721
227944e5d0d6
constify, ifdef out an old-caps remnant, and rewrite a little
Paul Aurich <darkrain42@pidgin.im>
parents:
24716
diff
changeset
|
40 | #endif |
|
23594
f80bec337aa7
* changed storage format for cache to mirror all needed features for XEP-0115v1.5
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23593
diff
changeset
|
41 | |
|
23590
2ccc80ff0134
* 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:
23589
diff
changeset
|
42 | typedef struct _JabberDataFormField { |
|
2ccc80ff0134
* 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:
23589
diff
changeset
|
43 | gchar *var; |
|
2ccc80ff0134
* 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:
23589
diff
changeset
|
44 | GList *values; |
|
2ccc80ff0134
* 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:
23589
diff
changeset
|
45 | } JabberDataFormField; |
|
2ccc80ff0134
* 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:
23589
diff
changeset
|
46 | |
|
23596
164fbee281c1
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23594
diff
changeset
|
47 | typedef struct _JabberCapsKey { |
|
164fbee281c1
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23594
diff
changeset
|
48 | char *node; |
|
164fbee281c1
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23594
diff
changeset
|
49 | char *ver; |
|
164fbee281c1
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23594
diff
changeset
|
50 | char *hash; |
|
164fbee281c1
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23594
diff
changeset
|
51 | } JabberCapsKey; |
|
164fbee281c1
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23594
diff
changeset
|
52 | |
|
17816
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
53 | typedef void (*jabber_caps_get_info_cb)(JabberCapsClientInfo *info, gpointer user_data); |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
54 | |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
55 | void jabber_caps_init(void); |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
56 | |
|
23596
164fbee281c1
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23594
diff
changeset
|
57 | void jabber_caps_destroy_key(gpointer value); |
|
164fbee281c1
* fixing a bug in jabber_caps_compare()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23594
diff
changeset
|
58 | |
|
23591
ba1e3ed78d40
* pass hash type to the caps handling functions
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23590
diff
changeset
|
59 | /** |
|
ba1e3ed78d40
* pass hash type to the caps handling functions
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23590
diff
changeset
|
60 | * Main entity capabilites function to get the capabilities of a contact. |
|
ba1e3ed78d40
* pass hash type to the caps handling functions
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23590
diff
changeset
|
61 | */ |
|
ba1e3ed78d40
* pass hash type to the caps handling functions
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23590
diff
changeset
|
62 | 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); |
|
17816
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
63 | void jabber_caps_free_clientinfo(JabberCapsClientInfo *clientinfo); |
|
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
64 | |
|
23587
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
65 | /** |
|
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
66 | * Processes a query-node and returns a JabberCapsClientInfo object with all relevant info. |
|
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
67 | * |
|
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
68 | * @param query A query object. |
|
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
69 | * @return A JabberCapsClientInfo object. |
|
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
70 | */ |
|
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
71 | JabberCapsClientInfo *jabber_caps_parse_client_info(xmlnode *query); |
|
23586
e495a4623f76
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17816
diff
changeset
|
72 | |
|
23587
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
73 | /** |
|
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
74 | * Takes a JabberCapsClientInfo pointer and returns the caps hash according to |
|
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
75 | * XEP-0115 Version 1.5. |
|
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
76 | * |
|
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
77 | * @param info A JabberCapsClientInfo pointer. |
|
23593
149bce500f4e
* support for calculating both hashes, sha-1 and md5
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23591
diff
changeset
|
78 | * @param hash Hash cipher to be used. Either sha-1 or md5. |
|
23587
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
79 | * @return The base64 encoded SHA-1 hash; needs to be freed if not needed |
|
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
80 | * any furthermore. |
|
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
81 | */ |
|
24715
69aaae59e205
Fix compilation errors and many warnings
Paul Aurich <darkrain42@pidgin.im>
parents:
23622
diff
changeset
|
82 | gchar *jabber_caps_calculate_hash(JabberCapsClientInfo *info, const char *hash); |
|
23587
1691c5361029
* changed name of jabber_caps_calculate_hash() to jabber_caps_calculate_own_hash()
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23586
diff
changeset
|
83 | |
|
23622
1cadf80e85ae
* adding some missing documentation
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23601
diff
changeset
|
84 | /** |
|
24715
69aaae59e205
Fix compilation errors and many warnings
Paul Aurich <darkrain42@pidgin.im>
parents:
23622
diff
changeset
|
85 | * Calculate SHA1 hash for own featureset. |
|
23622
1cadf80e85ae
* adding some missing documentation
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23601
diff
changeset
|
86 | */ |
|
24715
69aaae59e205
Fix compilation errors and many warnings
Paul Aurich <darkrain42@pidgin.im>
parents:
23622
diff
changeset
|
87 | void jabber_caps_calculate_own_hash(JabberStream *js); |
|
23586
e495a4623f76
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17816
diff
changeset
|
88 | |
|
e495a4623f76
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17816
diff
changeset
|
89 | /** Get the current caps hash. |
|
e495a4623f76
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17816
diff
changeset
|
90 | * @ret hash |
|
e495a4623f76
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17816
diff
changeset
|
91 | **/ |
|
24716
047f5075ca58
Entity Capabilities must be per-JabberStream
Paul Aurich <darkrain42@pidgin.im>
parents:
24715
diff
changeset
|
92 | const gchar* jabber_caps_get_own_hash(JabberStream *js); |
|
23586
e495a4623f76
Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents:
17816
diff
changeset
|
93 | |
|
23601
f7e44345f4b9
* implemented jabber_caps_broadcast_change() and finished jabber_ipc_add_feature() IPC function
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23597
diff
changeset
|
94 | /** |
|
23622
1cadf80e85ae
* adding some missing documentation
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23601
diff
changeset
|
95 | * Broadcast a new calculated hash using a <presence> stanza. |
|
23601
f7e44345f4b9
* implemented jabber_caps_broadcast_change() and finished jabber_ipc_add_feature() IPC function
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23597
diff
changeset
|
96 | */ |
|
24715
69aaae59e205
Fix compilation errors and many warnings
Paul Aurich <darkrain42@pidgin.im>
parents:
23622
diff
changeset
|
97 | void jabber_caps_broadcast_change(void); |
|
23601
f7e44345f4b9
* implemented jabber_caps_broadcast_change() and finished jabber_ipc_add_feature() IPC function
Tobias Markmann <tfar@soc.pidgin.im>
parents:
23597
diff
changeset
|
98 | |
|
17816
1b7362b4a7a2
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 <am@adiumx.com>
parents:
diff
changeset
|
99 | #endif /* _PURPLE_JABBER_CAPS_H_ */ |