45 static void tomessage(gconstpointer data, LmMessageNode *node); |
45 static void tomessage(gconstpointer data, LmMessageNode *node); |
46 static gconstpointer new(void); |
46 static gconstpointer new(void); |
47 static void send(session_content *sc, gconstpointer data, gchar *buf, gsize size); |
47 static void send(session_content *sc, gconstpointer data, gchar *buf, gsize size); |
48 static void init(session_content *sc, gconstpointer data); |
48 static void init(session_content *sc, gconstpointer data); |
49 static void end(session_content *sc, gconstpointer data); |
49 static void end(session_content *sc, gconstpointer data); |
|
50 static gchar *info(gconstpointer data); |
50 static void _send_internal(session_content *sc, const gchar *to, gchar *buf, |
51 static void _send_internal(session_content *sc, const gchar *to, gchar *buf, |
51 gsize size, const gchar *sid, gint64 *seq); |
52 gsize size, const gchar *sid, gint64 *seq); |
52 |
53 |
53 static void jingle_ibb_init(void); |
54 static void jingle_ibb_init(void); |
54 static void jingle_ibb_uninit(void); |
55 static void jingle_ibb_uninit(void); |
63 .tomessage = tomessage, |
64 .tomessage = tomessage, |
64 .cmp = cmp, |
65 .cmp = cmp, |
65 .new = new, |
66 .new = new, |
66 .send = send, |
67 .send = send, |
67 .init = init, |
68 .init = init, |
68 .end = end |
69 .end = end, |
|
70 .info = info |
69 }; |
71 }; |
70 |
72 |
71 module_info_t info_jingle_inbandbytestream = { |
73 module_info_t info_jingle_inbandbytestream = { |
72 .branch = MCABBER_BRANCH, |
74 .branch = MCABBER_BRANCH, |
73 .api = MCABBER_API_VERSION, |
75 .api = MCABBER_API_VERSION, |
363 { |
365 { |
364 jingle_ibb_unregister_lm_handlers(); |
366 jingle_ibb_unregister_lm_handlers(); |
365 return HOOK_HANDLER_RESULT_ALLOW_MORE_HANDLERS; |
367 return HOOK_HANDLER_RESULT_ALLOW_MORE_HANDLERS; |
366 } |
368 } |
367 |
369 |
|
370 static gchar *info(gconstpointer data) |
|
371 { |
|
372 JingleIBB *jibb = (JingleIBB *)data; |
|
373 gchar *info = g_strdup_printf("IBB %i", jibb->blocksize); |
|
374 return info; |
|
375 } |
|
376 |
368 static void jingle_ibb_init(void) |
377 static void jingle_ibb_init(void) |
369 { |
378 { |
370 jingle_ibb_handler = lm_message_handler_new(jingle_ibb_handle_iq, NULL, NULL); |
379 jingle_ibb_handler = lm_message_handler_new(jingle_ibb_handle_iq, NULL, NULL); |
371 |
380 |
372 connect_hid = hk_add_handler(jingle_ibb_connect_hh, HOOK_POST_CONNECT, |
381 connect_hid = hk_add_handler(jingle_ibb_connect_hh, HOOK_POST_CONNECT, |