aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/msn/msn.h
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-04-16 11:58:22 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2010-04-16 11:58:22 +0200
commitefbc154f93aeee89877378e8433a035f0a8febb2 (patch)
treec71bc88da2b00ae3de1318d39486c12a014c729b /protocols/msn/msn.h
parentb6190ca72d44523bc775ee3fc89b4bdbffe2cff4 (diff)
parentbb839e8ae5b6228f9dcd8dda96b4e3ac5c0f63ba (diff)
Merge msn-keepalive, a nice hack (not yet documented) which sends keepalives
to switchboards with offline contacts. This is meant as a work-around for the current lack of support for offline messaging.
Diffstat (limited to 'protocols/msn/msn.h')
-rw-r--r--protocols/msn/msn.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/protocols/msn/msn.h b/protocols/msn/msn.h
index 02d180b6..83a080a3 100644
--- a/protocols/msn/msn.h
+++ b/protocols/msn/msn.h
@@ -30,6 +30,7 @@
*/
#define TYPING_NOTIFICATION_MESSAGE "\r\r\rBEWARE, ME R TYPINK MESSAGE!!!!\r\r\r"
#define GROUPCHAT_SWITCHBOARD_MESSAGE "\r\r\rME WANT TALK TO MANY PEOPLE\r\r\r"
+#define SB_KEEPALIVE_MESSAGE "\r\r\rDONT HANG UP ON ME!\r\r\r"
#ifdef DEBUG_MSN
#define debug( text... ) imcb_log( ic, text );
@@ -53,6 +54,10 @@
"TypingUser: %s\r\n" \
"\r\n\r\n"
+#define SB_KEEPALIVE_HEADERS "MIME-Version: 1.0\r\n" \
+ "Content-Type: text/x-ping\r\n" \
+ "\r\n\r\n"
+
#define PROFILE_URL "http://members.msn.com/"
struct msn_data
@@ -82,6 +87,7 @@ struct msn_switchboard
int fd;
gint inp;
struct msn_handler_data *handler;
+ gint keepalive;
int trId;
int ready;
@@ -179,5 +185,7 @@ struct groupchat *msn_sb_to_chat( struct msn_switchboard *sb );
void msn_sb_destroy( struct msn_switchboard *sb );
gboolean msn_sb_connected( gpointer data, gint source, b_input_condition cond );
int msn_sb_write_msg( struct im_connection *ic, struct msn_message *m );
+void msn_sb_start_keepalives( struct msn_switchboard *sb, gboolean initial );
+void msn_sb_stop_keepalives( struct msn_switchboard *sb );
#endif //_MSN_H