1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/Frameworks/libpurple.framework/Versions/0.6.2/Headers/jutil.h Fri Aug 21 13:25:11 2009 -0700
1.3 @@ -0,0 +1,54 @@
1.4 +/**
1.5 + * @file jutil.h utility functions
1.6 + *
1.7 + * purple
1.8 + *
1.9 + * Copyright (C) 2003 Nathan Walp <faceprint@faceprint.com>
1.10 + *
1.11 + * This program is free software; you can redistribute it and/or modify
1.12 + * it under the terms of the GNU General Public License as published by
1.13 + * the Free Software Foundation; either version 2 of the License, or
1.14 + * (at your option) any later version.
1.15 + *
1.16 + * This program is distributed in the hope that it will be useful,
1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.19 + * GNU General Public License for more details.
1.20 + *
1.21 + * You should have received a copy of the GNU General Public License
1.22 + * along with this program; if not, write to the Free Software
1.23 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
1.24 + */
1.25 +#ifndef PURPLE_JABBER_JUTIL_H_
1.26 +#define PURPLE_JABBER_JUTIL_H_
1.27 +
1.28 +typedef struct _JabberID {
1.29 + char *node;
1.30 + char *domain;
1.31 + char *resource;
1.32 +} JabberID;
1.33 +
1.34 +#include "jabber.h"
1.35 +
1.36 +JabberID* jabber_id_new(const char *str);
1.37 +void jabber_id_free(JabberID *jid);
1.38 +
1.39 +char *jabber_get_resource(const char *jid);
1.40 +char *jabber_get_bare_jid(const char *jid);
1.41 +
1.42 +const char *jabber_normalize(const PurpleAccount *account, const char *in);
1.43 +
1.44 +/* Returns true if JID is the bare JID of our server. */
1.45 +gboolean jabber_is_own_server(JabberStream *js, const char *jid);
1.46 +
1.47 +/* Returns true if JID is the bare JID of our account. */
1.48 +gboolean jabber_is_own_account(JabberStream *js, const char *jid);
1.49 +
1.50 +gboolean jabber_nodeprep_validate(const char *);
1.51 +gboolean jabber_domain_validate(const char *);
1.52 +gboolean jabber_resourceprep_validate(const char *);
1.53 +
1.54 +PurpleConversation *jabber_find_unnormalized_conv(const char *name, PurpleAccount *account);
1.55 +
1.56 +char *jabber_calculate_data_sha1sum(gconstpointer data, size_t len);
1.57 +#endif /* PURPLE_JABBER_JUTIL_H_ */