Mercurial > pidgin
comparison libpurple/protocols/jabber/ibb.h @ 25756:151b4054ce40
Trigger error callbacks when receiving a malformed-ish packet.
Clean up a few pieces of code. Use G_GSIZE_FORMAT like KingAnt showed me.
Don't crash if an iq packet doesn't contain the seq attribute.
Error check g_fopen()
Don't unref the PurpleXfer until after we've called some functions with it.
Not sure that could ever actually crash it (I didn't bother to run through
the ref-counts in my head to see if it would fail).
committer: Marcus Lundblad <ml@update.uu.se>
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Tue, 16 Dec 2008 19:16:10 +0000 |
parents | b4ec5481a67a |
children | 5f9a24d1c25e |
comparison
equal
deleted
inserted
replaced
25755:3918ed48d7a8 | 25756:151b4054ce40 |
---|---|
12 * You should have received a copy of the GNU General Public License | 12 * You should have received a copy of the GNU General Public License |
13 * along with this program; if not, write to the Free Software | 13 * along with this program; if not, write to the Free Software |
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA | 14 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA |
15 */ | 15 */ |
16 | 16 |
17 #ifndef _PURPLE_JABBER_IBB_H_ | |
18 #define _PURPLE_JABBER_IBB_H_ | |
19 | |
17 #include "jabber.h" | 20 #include "jabber.h" |
18 #include "iq.h" | 21 #include "iq.h" |
19 | |
20 #ifndef JABBER_IBB_SESSION | |
21 #define JABBER_IBB_SESSION | |
22 | 22 |
23 #define XEP_0047_NAMESPACE "http://jabber.org/protocol/ibb" | 23 #define XEP_0047_NAMESPACE "http://jabber.org/protocol/ibb" |
24 | 24 |
25 typedef struct _JabberIBBSession JabberIBBSession; | 25 typedef struct _JabberIBBSession JabberIBBSession; |
26 | 26 |
87 JabberIBBErrorCallback *cb); | 87 JabberIBBErrorCallback *cb); |
88 | 88 |
89 void jabber_ibb_session_open(JabberIBBSession *sess); | 89 void jabber_ibb_session_open(JabberIBBSession *sess); |
90 void jabber_ibb_session_close(JabberIBBSession *sess); | 90 void jabber_ibb_session_close(JabberIBBSession *sess); |
91 void jabber_ibb_session_accept(JabberIBBSession *sess); | 91 void jabber_ibb_session_accept(JabberIBBSession *sess); |
92 void jabber_ibb_session_send_data(JabberIBBSession *sess, gpointer data, | 92 void jabber_ibb_session_send_data(JabberIBBSession *sess, gconstpointer data, |
93 gsize size); | 93 gsize size); |
94 | 94 |
95 const gchar *jabber_ibb_session_get_sid(const JabberIBBSession *sess); | 95 const gchar *jabber_ibb_session_get_sid(const JabberIBBSession *sess); |
96 JabberStream *jabber_ibb_session_get_js(JabberIBBSession *sess); | 96 JabberStream *jabber_ibb_session_get_js(JabberIBBSession *sess); |
97 const gchar *jabber_ibb_session_get_who(const JabberIBBSession *sess); | 97 const gchar *jabber_ibb_session_get_who(const JabberIBBSession *sess); |
114 void jabber_ibb_unregister_open_handler(JabberIBBOpenHandler *cb); | 114 void jabber_ibb_unregister_open_handler(JabberIBBOpenHandler *cb); |
115 | 115 |
116 void jabber_ibb_init(void); | 116 void jabber_ibb_init(void); |
117 void jabber_ibb_uninit(void); | 117 void jabber_ibb_uninit(void); |
118 | 118 |
119 #endif /* JABBER_IBB_SESSION */ | 119 #endif /* _PURPLE_JABBER_IBB_H_ */ |