comparison libpurple/protocols/jabber/jabber.h @ 26485:242a8c97270b

propagate from branch 'im.pidgin.pidgin' (head f144c6bda9daf701aa891c875fce7a4dedd611ae) to branch 'im.pidgin.cpw.darkrain42.xmpp.avatars' (head 94d20f2f1d6e10ad1543c226dc01fb5c518bcea0)
author Paul Aurich <paul@darkrain42.org>
date Sun, 05 Apr 2009 21:49:01 +0000
parents 7e020fbe2cdb 5767b7698c73
children d6a863df7884
comparison
equal deleted inserted replaced
26278:14e1f9af369f 26485:242a8c97270b
17 * 17 *
18 * You should have received a copy of the GNU General Public License 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 19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
21 */ 21 */
22 #ifndef _PURPLE_JABBER_H_ 22 #ifndef PURPLE_JABBER_H_
23 #define _PURPLE_JABBER_H_ 23 #define PURPLE_JABBER_H_
24 24
25 typedef enum { 25 typedef enum {
26 JABBER_CAP_NONE = 0, 26 JABBER_CAP_NONE = 0,
27 JABBER_CAP_XHTML = 1 << 0, 27 JABBER_CAP_XHTML = 1 << 0,
28 JABBER_CAP_COMPOSING = 1 << 1, 28 JABBER_CAP_COMPOSING = 1 << 1,
52 #include <libxml/parser.h> 52 #include <libxml/parser.h>
53 #include <glib.h> 53 #include <glib.h>
54 #include "circbuffer.h" 54 #include "circbuffer.h"
55 #include "connection.h" 55 #include "connection.h"
56 #include "dnssrv.h" 56 #include "dnssrv.h"
57 #include "media.h"
58 #include "mediamanager.h"
57 #include "roomlist.h" 59 #include "roomlist.h"
58 #include "sslconn.h" 60 #include "sslconn.h"
59 61 #include "dnsquery.h"
62
63 #include "iq.h"
60 #include "jutil.h" 64 #include "jutil.h"
61 #include "xmlnode.h" 65 #include "xmlnode.h"
62 #include "buddy.h" 66 #include "buddy.h"
63 67
64 #ifdef HAVE_CYRUS_SASL 68 #ifdef HAVE_CYRUS_SASL
241 /** 245 /**
242 * This linked list contains PurpleUtilFetchUrlData structs 246 * This linked list contains PurpleUtilFetchUrlData structs
243 * for when we lookup buddy icons from a url 247 * for when we lookup buddy icons from a url
244 */ 248 */
245 GSList *url_datas; 249 GSList *url_datas;
250
251 /* keep a hash table of JingleSessions */
252 GHashTable *sessions;
253
254 /* maybe this should only be present when USE_VV? */
255 gchar *stun_ip;
256 int stun_port;
257 PurpleDnsQueryData *stun_query;
258 /* later add stuff to handle TURN relays... */
246 }; 259 };
247 260
248 typedef gboolean (JabberFeatureEnabled)(JabberStream *js, const gchar *shortname, const gchar *namespace); 261 typedef gboolean (JabberFeatureEnabled)(JabberStream *js, const gchar *shortname, const gchar *namespace);
249 262
250 typedef struct _JabberFeature 263 typedef struct _JabberFeature
268 void jabber_send(JabberStream *js, xmlnode *data); 281 void jabber_send(JabberStream *js, xmlnode *data);
269 void jabber_send_raw(JabberStream *js, const char *data, int len); 282 void jabber_send_raw(JabberStream *js, const char *data, int len);
270 283
271 void jabber_stream_set_state(JabberStream *js, JabberStreamState state); 284 void jabber_stream_set_state(JabberStream *js, JabberStreamState state);
272 285
273 void jabber_register_parse(JabberStream *js, xmlnode *packet); 286 void jabber_register_parse(JabberStream *js, const char *from,
287 JabberIqType type, const char *id, xmlnode *query);
274 void jabber_register_start(JabberStream *js); 288 void jabber_register_start(JabberStream *js);
275 289
276 char *jabber_get_next_id(JabberStream *js); 290 char *jabber_get_next_id(JabberStream *js);
277 291
278 /** Parse an error into a human-readable string and optionally a disconnect 292 /** Parse an error into a human-readable string and optionally a disconnect
308 void jabber_convo_closed(PurpleConnection *gc, const char *who); 322 void jabber_convo_closed(PurpleConnection *gc, const char *who);
309 PurpleChat *jabber_find_blist_chat(PurpleAccount *account, const char *name); 323 PurpleChat *jabber_find_blist_chat(PurpleAccount *account, const char *name);
310 gboolean jabber_offline_message(const PurpleBuddy *buddy); 324 gboolean jabber_offline_message(const PurpleBuddy *buddy);
311 int jabber_prpl_send_raw(PurpleConnection *gc, const char *buf, int len); 325 int jabber_prpl_send_raw(PurpleConnection *gc, const char *buf, int len);
312 GList *jabber_actions(PurplePlugin *plugin, gpointer context); 326 GList *jabber_actions(PurplePlugin *plugin, gpointer context);
327 gboolean jabber_initiate_media(PurpleConnection *gc, const char *who,
328 PurpleMediaSessionType type);
329 PurpleMediaCaps jabber_get_media_caps(PurpleConnection *gc, const char *who);
313 void jabber_register_commands(void); 330 void jabber_register_commands(void);
314 void jabber_init_plugin(PurplePlugin *plugin); 331 void jabber_init_plugin(PurplePlugin *plugin);
315 332
316 #endif /* _PURPLE_JABBER_H_ */ 333 #endif /* PURPLE_JABBER_H_ */