comparison src/protocols/oscar/oscar.h @ 13608:6c34fbb75bbd

[gaim-migrate @ 15994] Disconnect the account with a decent error message when there are problems with an oscar FLAP connection. This needed to be added after I removed it when rewriting things for non-blocking I/O. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 10 Apr 2006 03:37:37 +0000
parents c1157497b32c
children 5796551db930
comparison
equal deleted inserted replaced
13607:a79d422bfe62 13608:6c34fbb75bbd
282 "us", "en", \ 282 "us", "en", \
283 } 283 }
284 284
285 #define CLIENTINFO_AIM_KNOWNGOOD CLIENTINFO_AIM_5_1_3036 285 #define CLIENTINFO_AIM_KNOWNGOOD CLIENTINFO_AIM_5_1_3036
286 #define CLIENTINFO_ICQ_KNOWNGOOD CLIENTINFO_ICQ_5_45_3777 286 #define CLIENTINFO_ICQ_KNOWNGOOD CLIENTINFO_ICQ_5_45_3777
287
288 typedef enum
289 {
290 OSCAR_DISCONNECT_DONE,
291 OSCAR_DISCONNECT_LOCAL_CLOSED,
292 OSCAR_DISCONNECT_REMOTE_CLOSED,
293 OSCAR_DISCONNECT_REMOTE_REFUSED,
294 OSCAR_DISCONNECT_LOST_CONNECTION,
295 OSCAR_DISCONNECT_INVALID_DATA,
296 OSCAR_DISCONNECT_COULD_NOT_CONNECT,
297 OSCAR_DISCONNECT_RETRYING
298 } OscarDisconnectReason;
287 299
288 typedef enum 300 typedef enum
289 { 301 {
290 OSCAR_CAPABILITY_BUDDYICON = 0x00000001, 302 OSCAR_CAPABILITY_BUDDYICON = 0x00000001,
291 OSCAR_CAPABILITY_TALK = 0x00000002, 303 OSCAR_CAPABILITY_TALK = 0x00000002,
347 }; 359 };
348 360
349 struct _FlapConnection 361 struct _FlapConnection
350 { 362 {
351 OscarData *od; /**< Pointer to parent session. */ 363 OscarData *od; /**< Pointer to parent session. */
364 gboolean connected;
365 time_t lastactivity; /**< Time of last transmit. */
366 guint destroy_timeout;
367 OscarDisconnectReason disconnect_reason;
368
352 int fd; 369 int fd;
353 time_t lastactivity; /**< Time of last transmit. */
354 gboolean connected;
355 guint destroy_timeout;
356
357 FlapFrame buffer_incoming; 370 FlapFrame buffer_incoming;
358 GaimCircBuffer *buffer_outgoing; 371 GaimCircBuffer *buffer_outgoing;
359 guint watcher_incoming; 372 guint watcher_incoming;
360 guint watcher_outgoing; 373 guint watcher_outgoing;
361 374
548 561
549 /* flap_connection.c */ 562 /* flap_connection.c */
550 FlapConnection *flap_connection_new(OscarData *, int type); 563 FlapConnection *flap_connection_new(OscarData *, int type);
551 void flap_connection_addgroup(FlapConnection *conn, guint16 group); 564 void flap_connection_addgroup(FlapConnection *conn, guint16 group);
552 void flap_connection_close(OscarData *od, FlapConnection *conn); 565 void flap_connection_close(OscarData *od, FlapConnection *conn);
553 void flap_connection_destroy(FlapConnection *conn); 566 void flap_connection_destroy(FlapConnection *conn, OscarDisconnectReason reason);
554 void flap_connection_schedule_destroy(FlapConnection *conn); 567 void flap_connection_schedule_destroy(FlapConnection *conn, OscarDisconnectReason reason);
555 FlapConnection *flap_connection_findbygroup(OscarData *od, guint16 group); 568 FlapConnection *flap_connection_findbygroup(OscarData *od, guint16 group);
556 FlapConnection *flap_connection_getbytype(OscarData *, int type); 569 FlapConnection *flap_connection_getbytype(OscarData *, int type);
557 FlapConnection *flap_connection_getbytype_all(OscarData *, int type); 570 FlapConnection *flap_connection_getbytype_all(OscarData *, int type);
558 void flap_connection_recv_cb(gpointer data, gint source, GaimInputCondition cond); 571 void flap_connection_recv_cb(gpointer data, gint source, GaimInputCondition cond);
559 FlapConnection *flap_connection_clone(OscarData *od, FlapConnection *src); 572 FlapConnection *flap_connection_clone(OscarData *od, FlapConnection *src);
610 623
611 /* family_icbm.c */ 624 /* family_icbm.c */
612 #define AIM_OFT_SUBTYPE_SEND_FILE 0x0001 625 #define AIM_OFT_SUBTYPE_SEND_FILE 0x0001
613 #define AIM_OFT_SUBTYPE_SEND_DIR 0x0002 626 #define AIM_OFT_SUBTYPE_SEND_DIR 0x0002
614 #define AIM_OFT_SUBTYPE_GET_FILE 0x0011 627 #define AIM_OFT_SUBTYPE_GET_FILE 0x0011
615 #define AIM_OPT_SUBTYPE_GET_LIST 0x0012 628 #define AIM_OFT_SUBTYPE_GET_LIST 0x0012
616 629
617 #define AIM_TRANSFER_DENY_NOTSUPPORTED 0x0000 630 #define AIM_TRANSFER_DENY_NOTSUPPORTED 0x0000
618 #define AIM_TRANSFER_DENY_DECLINE 0x0001 631 #define AIM_TRANSFER_DENY_DECLINE 0x0001
619 #define AIM_TRANSFER_DENY_NOTACCEPTING 0x0002 632 #define AIM_TRANSFER_DENY_NOTACCEPTING 0x0002
620 633