Mon, 25 May 2009 19:24:17 +0000
propagate from branch 'im.pidgin.pidgin' (head f4f758e01704ac91ee9506cf0b2c7fec684293d9)
to branch 'im.pidgin.cpw.malu.client_type' (head 270edbb2d303e744e3df600edd8f3647493cebdf)
| 7014 | 1 | /** |
| 2 | * @file jutil.h utility functions | |
| 3 | * | |
| 15884 | 4 | * purple |
| 7014 | 5 | * |
| 6 | * Copyright (C) 2003 Nathan Walp <faceprint@faceprint.com> | |
| 7 | * | |
| 8 | * This program is free software; you can redistribute it and/or modify | |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation; either version 2 of the License, or | |
| 11 | * (at your option) any later version. | |
| 12 | * | |
| 13 | * This program is distributed in the hope that it will be useful, | |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | * GNU General Public License for more details. | |
| 17 | * | |
| 18 | * You should have received a copy of the GNU General Public License | |
| 19 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
15952
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 7014 | 21 | */ |
|
26703
17f9a4bef2a3
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <darkrain42@pidgin.im>
parents:
25110
diff
changeset
|
22 | #ifndef PURPLE_JABBER_JUTIL_H_ |
|
17f9a4bef2a3
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <darkrain42@pidgin.im>
parents:
25110
diff
changeset
|
23 | #define PURPLE_JABBER_JUTIL_H_ |
| 7014 | 24 | |
| 25 | typedef struct _JabberID { | |
| 26 | char *node; | |
| 27 | char *domain; | |
| 28 | char *resource; | |
| 29 | } JabberID; | |
| 30 | ||
| 31 | JabberID* jabber_id_new(const char *str); | |
| 32 | void jabber_id_free(JabberID *jid); | |
| 33 | ||
| 7306 | 34 | char *jabber_get_resource(const char *jid); |
| 7014 | 35 | char *jabber_get_bare_jid(const char *jid); |
| 36 | ||
| 15884 | 37 | const char *jabber_normalize(const PurpleAccount *account, const char *in); |
| 7261 | 38 | |
|
27163
398d47149e2f
Add two helper functions useful for matching the 'from' attribute on packets to either our server or our account.
Paul Aurich <darkrain42@pidgin.im>
parents:
26703
diff
changeset
|
39 | /* Returns true if JID is the bare JID of our server. */ |
|
398d47149e2f
Add two helper functions useful for matching the 'from' attribute on packets to either our server or our account.
Paul Aurich <darkrain42@pidgin.im>
parents:
26703
diff
changeset
|
40 | gboolean jabber_is_own_server(JabberStream *js, const char *jid); |
|
398d47149e2f
Add two helper functions useful for matching the 'from' attribute on packets to either our server or our account.
Paul Aurich <darkrain42@pidgin.im>
parents:
26703
diff
changeset
|
41 | |
|
398d47149e2f
Add two helper functions useful for matching the 'from' attribute on packets to either our server or our account.
Paul Aurich <darkrain42@pidgin.im>
parents:
26703
diff
changeset
|
42 | /* Returns true if JID is the bare JID of our account. */ |
|
398d47149e2f
Add two helper functions useful for matching the 'from' attribute on packets to either our server or our account.
Paul Aurich <darkrain42@pidgin.im>
parents:
26703
diff
changeset
|
43 | gboolean jabber_is_own_account(JabberStream *js, const char *jid); |
|
398d47149e2f
Add two helper functions useful for matching the 'from' attribute on packets to either our server or our account.
Paul Aurich <darkrain42@pidgin.im>
parents:
26703
diff
changeset
|
44 | |
| 7310 | 45 | gboolean jabber_nodeprep_validate(const char *); |
| 46 | gboolean jabber_nameprep_validate(const char *); | |
| 47 | gboolean jabber_resourceprep_validate(const char *); | |
| 48 | ||
| 15884 | 49 | PurpleConversation *jabber_find_unnormalized_conv(const char *name, PurpleAccount *account); |
| 8043 | 50 | |
|
25110
40b3fffdb00b
Fix up the XMPP User Avatar SHA1 hashing so that we don't mess up the checksum
Paul Aurich <darkrain42@pidgin.im>
parents:
20179
diff
changeset
|
51 | char *jabber_calculate_data_sha1sum(gconstpointer data, size_t len); |
|
26703
17f9a4bef2a3
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <darkrain42@pidgin.im>
parents:
25110
diff
changeset
|
52 | #endif /* PURPLE_JABBER_JUTIL_H_ */ |