Mercurial > pidgin
comparison libpurple/protocols/jabber/jabber.h @ 25017:26eabe8e739b
Removing short-names for features and calculating own caps hash.
author | Tobias Markmann <tfar@soc.pidgin.im> |
---|---|
date | Mon, 16 Jun 2008 13:52:45 +0000 |
parents | 23fe481afccf |
children | 9867a406707e |
comparison
equal
deleted
inserted
replaced
23351:adda955a8db6 | 25017:26eabe8e739b |
---|---|
201 | 201 |
202 /* A purple timeout tag for the keepalive */ | 202 /* A purple timeout tag for the keepalive */ |
203 int keepalive_timeout; | 203 int keepalive_timeout; |
204 }; | 204 }; |
205 | 205 |
206 typedef gboolean (JabberFeatureEnabled)(JabberStream *js, const gchar *shortname, const gchar *namespace); | 206 typedef gboolean (JabberFeatureEnabled)(JabberStream *js, const gchar *namespace); |
207 | 207 |
208 typedef struct _JabberFeature | 208 typedef struct _JabberFeature |
209 { | 209 { |
210 gchar *shortname; | |
211 gchar *namespace; | 210 gchar *namespace; |
212 JabberFeatureEnabled *is_enabled; | 211 JabberFeatureEnabled *is_enabled; |
213 } JabberFeature; | 212 } JabberFeature; |
213 | |
214 typedef struct _JabberIdentity | |
215 { | |
216 gchar *category; | |
217 gchar *type; | |
218 gchar *name; | |
219 } JabberIdentity; | |
214 | 220 |
215 typedef struct _JabberBytestreamsStreamhost { | 221 typedef struct _JabberBytestreamsStreamhost { |
216 char *jid; | 222 char *jid; |
217 char *host; | 223 char *host; |
218 int port; | 224 int port; |
219 char *zeroconf; | 225 char *zeroconf; |
220 } JabberBytestreamsStreamhost; | 226 } JabberBytestreamsStreamhost; |
221 | 227 |
222 /* what kind of additional features as returned from disco#info are supported? */ | 228 /* what kind of additional features as returned from disco#info are supported? */ |
223 extern GList *jabber_features; | 229 extern GList *jabber_features; |
230 extern GList *jabber_identities; | |
224 | 231 |
225 void jabber_process_packet(JabberStream *js, xmlnode **packet); | 232 void jabber_process_packet(JabberStream *js, xmlnode **packet); |
226 void jabber_send(JabberStream *js, xmlnode *data); | 233 void jabber_send(JabberStream *js, xmlnode *data); |
227 void jabber_send_raw(JabberStream *js, const char *data, int len); | 234 void jabber_send_raw(JabberStream *js, const char *data, int len); |
228 | 235 |
240 * @param reason where to store the disconnection reason, or @c NULL if you | 247 * @param reason where to store the disconnection reason, or @c NULL if you |
241 * don't care or you don't intend to close the connection. | 248 * don't care or you don't intend to close the connection. |
242 */ | 249 */ |
243 char *jabber_parse_error(JabberStream *js, xmlnode *packet, PurpleConnectionError *reason); | 250 char *jabber_parse_error(JabberStream *js, xmlnode *packet, PurpleConnectionError *reason); |
244 | 251 |
245 void jabber_add_feature(const gchar *shortname, const gchar *namespace, JabberFeatureEnabled cb); /* cb may be NULL */ | 252 void jabber_add_feature(const gchar *namespace, JabberFeatureEnabled cb); /* cb may be NULL */ |
246 void jabber_remove_feature(const gchar *shortname); | 253 void jabber_remove_feature(const gchar *namespace); |
254 | |
255 /** Adds an identitiy to this jabber library instance. For list of valid values vistit the | |
256 * webiste of the XMPP Registrar ( http://www.xmpp.org/registrar/disco-categories.html#client ). | |
257 * @param category the category of the identity. | |
258 * @param type the type of the identity. | |
259 * @param name the name of the identity. | |
260 */ | |
261 void jabber_add_identity(const gchar *category, const gchar *type, const gchar *name); | |
247 | 262 |
248 /** PRPL functions */ | 263 /** PRPL functions */ |
249 const char *jabber_list_icon(PurpleAccount *a, PurpleBuddy *b); | 264 const char *jabber_list_icon(PurpleAccount *a, PurpleBuddy *b); |
250 const char* jabber_list_emblem(PurpleBuddy *b); | 265 const char* jabber_list_emblem(PurpleBuddy *b); |
251 char *jabber_status_text(PurpleBuddy *b); | 266 char *jabber_status_text(PurpleBuddy *b); |