Mercurial > pidgin
comparison libgaim/protocols/oscar/oscar.h @ 15085:f3573d941d66
[gaim-migrate @ 17871]
Minor cleanup. Mostly make some functions void instead of int where the
return value was always 0 and wasn't used
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 02 Dec 2006 08:03:45 +0000 |
parents | 57dcc53e77a4 |
children | eed75cc6cb88 |
comparison
equal
deleted
inserted
replaced
15084:e0d70bba8290 | 15085:f3573d941d66 |
---|---|
61 typedef struct _FlapConnection FlapConnection; | 61 typedef struct _FlapConnection FlapConnection; |
62 typedef struct _OscarData OscarData; | 62 typedef struct _OscarData OscarData; |
63 typedef struct _IcbmArgsCh2 IcbmArgsCh2; | 63 typedef struct _IcbmArgsCh2 IcbmArgsCh2; |
64 | 64 |
65 typedef guint32 aim_snacid_t; | 65 typedef guint32 aim_snacid_t; |
66 typedef guint16 flap_seqnum_t; | |
67 | 66 |
68 #include "snactypes.h" | 67 #include "snactypes.h" |
69 | 68 |
70 #ifdef __cplusplus | 69 #ifdef __cplusplus |
71 extern "C" { | 70 extern "C" { |
353 }; | 352 }; |
354 | 353 |
355 struct _FlapFrame | 354 struct _FlapFrame |
356 { | 355 { |
357 guint8 channel; | 356 guint8 channel; |
358 flap_seqnum_t seqnum; | 357 guint16 seqnum; |
359 ByteStream data; /* payload stream */ | 358 ByteStream data; /* payload stream */ |
360 }; | 359 }; |
361 | 360 |
362 struct _FlapConnection | 361 struct _FlapConnection |
363 { | 362 { |
380 guint watcher_incoming; | 379 guint watcher_incoming; |
381 guint watcher_outgoing; | 380 guint watcher_outgoing; |
382 | 381 |
383 guint16 type; | 382 guint16 type; |
384 guint16 subtype; | 383 guint16 subtype; |
385 flap_seqnum_t seqnum; | 384 guint16 seqnum; /**< The sequence number of most recent outgoing packet. */ |
386 guint32 status; | 385 guint32 status; |
387 GSList *groups; | 386 GSList *groups; |
388 struct rateclass *rates; | 387 struct rateclass *rates; |
389 | 388 |
390 void *internal; /* internal conn-specific libfaim data */ | 389 void *internal; /* internal conn-specific libfaim data */ |
583 void flap_connection_send_version(OscarData *od, FlapConnection *conn); | 582 void flap_connection_send_version(OscarData *od, FlapConnection *conn); |
584 void flap_connection_send_version_with_cookie(OscarData *od, FlapConnection *conn, guint16 length, const guint8 *chipsahoy); | 583 void flap_connection_send_version_with_cookie(OscarData *od, FlapConnection *conn, guint16 length, const guint8 *chipsahoy); |
585 void flap_connection_send_keepalive(OscarData *od, FlapConnection *conn); | 584 void flap_connection_send_keepalive(OscarData *od, FlapConnection *conn); |
586 FlapFrame *flap_frame_new(OscarData *od, guint16 channel, int datalen); | 585 FlapFrame *flap_frame_new(OscarData *od, guint16 channel, int datalen); |
587 | 586 |
588 | |
589 OscarData *oscar_data_new(void); | 587 OscarData *oscar_data_new(void); |
590 void oscar_data_destroy(OscarData *); | 588 void oscar_data_destroy(OscarData *); |
591 | 589 |
592 /* 0x0001 - family_oservice.c */ | |
593 int aim_srv_setstatusmsg(OscarData *od, const char *msg); | |
594 int aim_srv_setidle(OscarData *od, guint32 idletime); | |
595 | |
596 /* misc.c */ | 590 /* misc.c */ |
597 | |
598 #define AIM_VISIBILITYCHANGE_PERMITADD 0x05 | 591 #define AIM_VISIBILITYCHANGE_PERMITADD 0x05 |
599 #define AIM_VISIBILITYCHANGE_PERMITREMOVE 0x06 | 592 #define AIM_VISIBILITYCHANGE_PERMITREMOVE 0x06 |
600 #define AIM_VISIBILITYCHANGE_DENYADD 0x07 | 593 #define AIM_VISIBILITYCHANGE_DENYADD 0x07 |
601 #define AIM_VISIBILITYCHANGE_DENYREMOVE 0x08 | 594 #define AIM_VISIBILITYCHANGE_DENYREMOVE 0x08 |
602 | 595 |
603 #define AIM_PRIVFLAGS_ALLOWIDLE 0x01 | 596 #define AIM_PRIVFLAGS_ALLOWIDLE 0x01 |
604 #define AIM_PRIVFLAGS_ALLOWMEMBERSINCE 0x02 | 597 #define AIM_PRIVFLAGS_ALLOWMEMBERSINCE 0x02 |
605 | 598 |
606 #define AIM_WARN_ANON 0x01 | 599 #define AIM_WARN_ANON 0x01 |
607 | 600 |
608 int aim_nop(OscarData *, FlapConnection *); | 601 |
609 int aim_bos_changevisibility(OscarData *, FlapConnection *, int, const char *); | 602 |
610 int aim_bos_setgroupperm(OscarData *, FlapConnection *, guint32 mask); | 603 /* 0x0001 - family_oservice.c */ |
611 int aim_bos_setprivacyflags(OscarData *, FlapConnection *, guint32); | 604 /* 0x0004 */ void aim_srv_requestnew(OscarData *od, guint16 serviceid); |
612 void aim_reqpersonalinfo(OscarData *, FlapConnection *); | 605 /* 0x0006 */ void aim_srv_reqrates(OscarData *od, FlapConnection *conn); |
613 int aim_reqservice(OscarData *, guint16); | 606 /* 0x0008 */ void aim_srv_rates_addparam(OscarData *od, FlapConnection *conn); |
614 void aim_bos_reqrights(OscarData *, FlapConnection *); | 607 /* 0x0009 */ void aim_srv_rates_delparam(OscarData *od, FlapConnection *conn); |
615 int aim_setextstatus(OscarData *od, guint32 status); | 608 /* 0x000c */ void aim_srv_sendpauseack(OscarData *od, FlapConnection *conn); |
609 /* 0x000e */ void aim_srv_reqpersonalinfo(OscarData *od, FlapConnection *conn); | |
610 /* 0x0011 */ void aim_srv_setidle(OscarData *od, guint32 idletime); | |
611 /* 0x0014 */ void aim_srv_setprivacyflags(OscarData *od, FlapConnection *conn, guint32); | |
612 /* 0x0016 */ void aim_srv_nop(OscarData *od, FlapConnection *conn); | |
613 /* 0x0017 */ void aim_srv_setversions(OscarData *od, FlapConnection *conn); | |
614 /* 0x001e */ int aim_srv_setstatusmsg(OscarData *od, const char *msg); | |
615 /* 0x001e */ int aim_srv_setextstatus(OscarData *od, guint32 status); | |
616 | |
617 | |
618 void aim_bos_reqrights(OscarData *od, FlapConnection *conn); | |
619 int aim_bos_changevisibility(OscarData *od, FlapConnection *conn, int, const char *); | |
620 void aim_bos_setgroupperm(OscarData *od, FlapConnection *conn, guint32 mask); | |
621 | |
622 | |
616 | 623 |
617 #define AIM_CLIENTTYPE_UNKNOWN 0x0000 | 624 #define AIM_CLIENTTYPE_UNKNOWN 0x0000 |
618 #define AIM_CLIENTTYPE_MC 0x0001 | 625 #define AIM_CLIENTTYPE_MC 0x0001 |
619 #define AIM_CLIENTTYPE_WINAIM 0x0002 | 626 #define AIM_CLIENTTYPE_WINAIM 0x0002 |
620 #define AIM_CLIENTTYPE_WINAIM41 0x0003 | 627 #define AIM_CLIENTTYPE_WINAIM41 0x0003 |
623 | 630 |
624 #define AIM_RATE_CODE_CHANGE 0x0001 | 631 #define AIM_RATE_CODE_CHANGE 0x0001 |
625 #define AIM_RATE_CODE_WARNING 0x0002 | 632 #define AIM_RATE_CODE_WARNING 0x0002 |
626 #define AIM_RATE_CODE_LIMIT 0x0003 | 633 #define AIM_RATE_CODE_LIMIT 0x0003 |
627 #define AIM_RATE_CODE_CLEARLIMIT 0x0004 | 634 #define AIM_RATE_CODE_CLEARLIMIT 0x0004 |
628 int aim_ads_requestads(OscarData *od, FlapConnection *conn); | 635 void aim_ads_requestads(OscarData *od, FlapConnection *conn); |
629 | 636 |
630 | 637 |
631 | 638 |
632 /* family_icbm.c */ | 639 /* family_icbm.c */ |
633 #define AIM_OFT_SUBTYPE_SEND_FILE 0x0001 | 640 #define AIM_OFT_SUBTYPE_SEND_FILE 0x0001 |
1290 | 1297 |
1291 | 1298 |
1292 /* 0x0017 - family_auth.c */ | 1299 /* 0x0017 - family_auth.c */ |
1293 void aim_sendcookie(OscarData *, FlapConnection *, const guint16 length, const guint8 *); | 1300 void aim_sendcookie(OscarData *, FlapConnection *, const guint16 length, const guint8 *); |
1294 int aim_admin_changepasswd(OscarData *, FlapConnection *, const char *newpw, const char *curpw); | 1301 int aim_admin_changepasswd(OscarData *, FlapConnection *, const char *newpw, const char *curpw); |
1295 int aim_admin_reqconfirm(OscarData *od, FlapConnection *conn); | 1302 void aim_admin_reqconfirm(OscarData *od, FlapConnection *conn); |
1296 int aim_admin_getinfo(OscarData *od, FlapConnection *conn, guint16 info); | 1303 int aim_admin_getinfo(OscarData *od, FlapConnection *conn, guint16 info); |
1297 int aim_admin_setemail(OscarData *od, FlapConnection *conn, const char *newemail); | 1304 int aim_admin_setemail(OscarData *od, FlapConnection *conn, const char *newemail); |
1298 int aim_admin_setnick(OscarData *od, FlapConnection *conn, const char *newnick); | 1305 int aim_admin_setnick(OscarData *od, FlapConnection *conn, const char *newnick); |
1299 | 1306 |
1300 | 1307 |
1487 int bart_modfirst(OscarData *od, aim_module_t *mod); | 1494 int bart_modfirst(OscarData *od, aim_module_t *mod); |
1488 int ssi_modfirst(OscarData *od, aim_module_t *mod); | 1495 int ssi_modfirst(OscarData *od, aim_module_t *mod); |
1489 int icq_modfirst(OscarData *od, aim_module_t *mod); | 1496 int icq_modfirst(OscarData *od, aim_module_t *mod); |
1490 int email_modfirst(OscarData *od, aim_module_t *mod); | 1497 int email_modfirst(OscarData *od, aim_module_t *mod); |
1491 | 1498 |
1492 int aim_genericreq_n(OscarData *, FlapConnection *conn, guint16 family, guint16 subtype); | 1499 void aim_genericreq_n(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype); |
1493 void aim_genericreq_n_snacid(OscarData *, FlapConnection *conn, guint16 family, guint16 subtype); | 1500 void aim_genericreq_n_snacid(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype); |
1494 int aim_genericreq_l(OscarData *, FlapConnection *conn, guint16 family, guint16 subtype, guint32 *); | 1501 void aim_genericreq_l(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype, guint32 *); |
1495 int aim_genericreq_s(OscarData *, FlapConnection *conn, guint16 family, guint16 subtype, guint16 *); | 1502 void aim_genericreq_s(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype, guint16 *); |
1496 | 1503 |
1497 /* bstream.c */ | 1504 /* bstream.c */ |
1498 int byte_stream_init(ByteStream *bs, guint8 *data, int len); | 1505 int byte_stream_init(ByteStream *bs, guint8 *data, int len); |
1499 int byte_stream_empty(ByteStream *bs); | 1506 int byte_stream_empty(ByteStream *bs); |
1500 int byte_stream_curpos(ByteStream *bs); | 1507 int byte_stream_curpos(ByteStream *bs); |
1580 | 1587 |
1581 int aim_chat_readroominfo(ByteStream *bs, struct aim_chat_roominfo *outinfo); | 1588 int aim_chat_readroominfo(ByteStream *bs, struct aim_chat_roominfo *outinfo); |
1582 | 1589 |
1583 void flap_connection_destroy_chat(OscarData *od, FlapConnection *conn); | 1590 void flap_connection_destroy_chat(OscarData *od, FlapConnection *conn); |
1584 | 1591 |
1585 /* These are all handled internally now. */ | |
1586 void aim_setversions(OscarData *od, FlapConnection *conn); | |
1587 void aim_reqrates(OscarData *, FlapConnection *); | |
1588 void aim_rates_addparam(OscarData *, FlapConnection *); | |
1589 void aim_rates_delparam(OscarData *, FlapConnection *); | |
1590 void aim_sendpauseack(OscarData *od, FlapConnection *conn); | |
1591 | |
1592 | |
1593 | |
1594 | |
1595 | |
1596 #ifdef __cplusplus | 1592 #ifdef __cplusplus |
1597 } | 1593 } |
1598 #endif | 1594 #endif |
1599 | 1595 |
1600 #endif /* _OSCAR_H_ */ | 1596 #endif /* _OSCAR_H_ */ |