| 78 #ifdef HAVE_CYRUS_SASL |
79 #ifdef HAVE_CYRUS_SASL |
| 79 #include <sasl/sasl.h> |
80 #include <sasl/sasl.h> |
| 80 #endif |
81 #endif |
| 81 |
82 |
| 82 #define CAPS0115_NODE "https://pidgin.im/" |
83 #define CAPS0115_NODE "https://pidgin.im/" |
| |
84 |
| |
85 #define JABBER_TYPE_PROTOCOL (jabber_protocol_get_type()) |
| |
86 #define JABBER_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), JABBER_TYPE_PROTOCOL, JabberProtocol)) |
| |
87 #define JABBER_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), JABBER_TYPE_PROTOCOL, JabberProtocolClass)) |
| |
88 #define JABBER_IS_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), JABBER_TYPE_PROTOCOL)) |
| |
89 #define JABBER_IS_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), JABBER_TYPE_PROTOCOL)) |
| |
90 #define JABBER_PROTOCOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), JABBER_TYPE_PROTOCOL, JabberProtocolClass)) |
| 83 |
91 |
| 84 #define JABBER_DEFAULT_REQUIRE_TLS "require_starttls" |
92 #define JABBER_DEFAULT_REQUIRE_TLS "require_starttls" |
| 85 #define JABBER_DEFAULT_FT_PROXIES "proxy.eu.jabber.org" |
93 #define JABBER_DEFAULT_FT_PROXIES "proxy.eu.jabber.org" |
| 86 |
94 |
| 87 /* Index into attention_types list */ |
95 /* Index into attention_types list */ |
| 94 JABBER_STREAM_INITIALIZING_ENCRYPTION, |
102 JABBER_STREAM_INITIALIZING_ENCRYPTION, |
| 95 JABBER_STREAM_AUTHENTICATING, |
103 JABBER_STREAM_AUTHENTICATING, |
| 96 JABBER_STREAM_POST_AUTH, |
104 JABBER_STREAM_POST_AUTH, |
| 97 JABBER_STREAM_CONNECTED |
105 JABBER_STREAM_CONNECTED |
| 98 } JabberStreamState; |
106 } JabberStreamState; |
| |
107 |
| |
108 typedef struct _JabberProtocol |
| |
109 { |
| |
110 PurpleProtocol parent; |
| |
111 } JabberProtocol; |
| |
112 |
| |
113 typedef struct _JabberProtocolClass |
| |
114 { |
| |
115 PurpleProtocolClass parent_class; |
| |
116 } JabberProtocolClass; |
| 99 |
117 |
| 100 struct _JabberStream |
118 struct _JabberStream |
| 101 { |
119 { |
| 102 int fd; |
120 int fd; |
| 103 guint inpa; |
121 guint inpa; |
| 307 /* A sorted list of identities advertised. Use jabber_add_identity to add |
325 /* A sorted list of identities advertised. Use jabber_add_identity to add |
| 308 * so it remains sorted. |
326 * so it remains sorted. |
| 309 */ |
327 */ |
| 310 extern GList *jabber_identities; |
328 extern GList *jabber_identities; |
| 311 |
329 |
| |
330 /** |
| |
331 * Returns the GType for the JabberProtocol object. |
| |
332 */ |
| |
333 GType jabber_protocol_get_type(void); |
| |
334 |
| 312 void jabber_stream_features_parse(JabberStream *js, xmlnode *packet); |
335 void jabber_stream_features_parse(JabberStream *js, xmlnode *packet); |
| 313 void jabber_process_packet(JabberStream *js, xmlnode **packet); |
336 void jabber_process_packet(JabberStream *js, xmlnode **packet); |
| 314 void jabber_send(JabberStream *js, xmlnode *data); |
337 void jabber_send(JabberStream *js, xmlnode *data); |
| 315 void jabber_send_raw(JabberStream *js, const char *data, int len); |
338 void jabber_send_raw(JabberStream *js, const char *data, int len); |
| 316 void jabber_send_signal_cb(PurpleConnection *pc, xmlnode **packet, |
339 void jabber_send_signal_cb(PurpleConnection *pc, xmlnode **packet, |
| 410 gboolean jabber_initiate_media(PurpleAccount *account, const char *who, |
433 gboolean jabber_initiate_media(PurpleAccount *account, const char *who, |
| 411 PurpleMediaSessionType type); |
434 PurpleMediaSessionType type); |
| 412 PurpleMediaCaps jabber_get_media_caps(PurpleAccount *account, const char *who); |
435 PurpleMediaCaps jabber_get_media_caps(PurpleAccount *account, const char *who); |
| 413 gboolean jabber_can_receive_file(PurpleConnection *gc, const gchar *who); |
436 gboolean jabber_can_receive_file(PurpleConnection *gc, const gchar *who); |
| 414 |
437 |
| 415 void jabber_plugin_init(PurpleProtocol *protocol); |
438 void jabber_protocol_init(PurpleProtocol *protocol); |
| 416 void jabber_plugin_uninit(PurpleProtocol *protocol); |
439 void jabber_protocol_uninit(PurpleProtocol *protocol); |
| 417 |
440 |
| 418 #endif /* PURPLE_JABBER_H_ */ |
441 #endif /* PURPLE_JABBER_H_ */ |