Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/jabglue.h @ 1014:99c5278bf6b8
Keep the status and status messages when we're disconnected
Improve the automatic reconnection after a network failure.
- AutoConnection is only set to false when the user disconnects
explicitly (i.e. in do_disconnect()).
- AutoConnection is set to TRUE after the 1st successful connection.
- In jb_setstatus(), update the status message and the "wanted status"
even in offline mode. It helps with auto-away.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 12 Nov 2006 22:25:14 +0100 |
parents | c112423ac012 |
children | 579299b1c9b2 |
comparison
equal
deleted
inserted
replaced
1013:f1a9ca2348e5 | 1014:99c5278bf6b8 |
---|---|
13 #if ! HAVE_DECL_STRPTIME | 13 #if ! HAVE_DECL_STRPTIME |
14 extern char *strptime (); | 14 extern char *strptime (); |
15 #endif | 15 #endif |
16 | 16 |
17 extern jconn jc; | 17 extern jconn jc; |
18 extern guint AutoConnection; | |
18 | 19 |
19 extern char imstatus2char[]; | 20 extern char imstatus2char[]; |
20 // Status chars: '_', 'o', 'i', 'f', 'd', 'n', 'a' | 21 // Status chars: '_', 'o', 'i', 'f', 'd', 'n', 'a' |
21 | 22 |
22 enum agtype { | 23 enum agtype { |
48 void jb_delbuddy(const char *jid); | 49 void jb_delbuddy(const char *jid); |
49 void jb_updatebuddy(const char *jid, const char *name, const char *group); | 50 void jb_updatebuddy(const char *jid, const char *name, const char *group); |
50 inline enum imstatus jb_getstatus(void); | 51 inline enum imstatus jb_getstatus(void); |
51 inline const char *jb_getstatusmsg(void); | 52 inline const char *jb_getstatusmsg(void); |
52 void jb_setstatus(enum imstatus st, const char *recipient, const char *msg); | 53 void jb_setstatus(enum imstatus st, const char *recipient, const char *msg); |
54 inline void jb_setprevstatus(void); | |
53 void jb_send_msg(const char *jid, const char *text, int type, | 55 void jb_send_msg(const char *jid, const char *text, int type, |
54 const char *subject, const char *id); | 56 const char *subject, const char *id); |
55 void jb_send_raw(const char *str); | 57 void jb_send_raw(const char *str); |
56 void jb_send_chatstate(gpointer buddy, guint chatstate); | 58 void jb_send_chatstate(gpointer buddy, guint chatstate); |
57 void jb_keepalive(void); | 59 void jb_keepalive(void); |