1 | #ifndef __OSCAR_SSI_H__ |
---|
2 | #define __OSCAR_SSI_H__ |
---|
3 | |
---|
4 | #define AIM_CB_FAM_SSI 0x0013 /* Server stored information */ |
---|
5 | |
---|
6 | /* |
---|
7 | * SNAC Family: Server-Stored Buddy Lists |
---|
8 | */ |
---|
9 | #define AIM_CB_SSI_ERROR 0x0001 |
---|
10 | #define AIM_CB_SSI_REQRIGHTS 0x0002 |
---|
11 | #define AIM_CB_SSI_RIGHTSINFO 0x0003 |
---|
12 | #define AIM_CB_SSI_REQFULLLIST 0x0004 |
---|
13 | #define AIM_CB_SSI_REQLIST 0x0005 |
---|
14 | #define AIM_CB_SSI_LIST 0x0006 |
---|
15 | #define AIM_CB_SSI_ACTIVATE 0x0007 |
---|
16 | #define AIM_CB_SSI_ADD 0x0008 |
---|
17 | #define AIM_CB_SSI_MOD 0x0009 |
---|
18 | #define AIM_CB_SSI_DEL 0x000A |
---|
19 | #define AIM_CB_SSI_SRVACK 0x000E |
---|
20 | #define AIM_CB_SSI_NOLIST 0x000F |
---|
21 | #define AIM_CB_SSI_EDITSTART 0x0011 |
---|
22 | #define AIM_CB_SSI_EDITSTOP 0x0012 |
---|
23 | #define AIM_CB_SSI_SENDAUTHREQ 0x0018 |
---|
24 | #define AIM_CB_SSI_SERVAUTHREQ 0x0019 |
---|
25 | #define AIM_CB_SSI_SENDAUTHREP 0x001A |
---|
26 | #define AIM_CB_SSI_SERVAUTHREP 0x001B |
---|
27 | |
---|
28 | |
---|
29 | #define AIM_SSI_TYPE_BUDDY 0x0000 |
---|
30 | #define AIM_SSI_TYPE_GROUP 0x0001 |
---|
31 | #define AIM_SSI_TYPE_PERMIT 0x0002 |
---|
32 | #define AIM_SSI_TYPE_DENY 0x0003 |
---|
33 | #define AIM_SSI_TYPE_PDINFO 0x0004 |
---|
34 | #define AIM_SSI_TYPE_PRESENCEPREFS 0x0005 |
---|
35 | |
---|
36 | struct aim_ssi_item { |
---|
37 | char *name; |
---|
38 | guint16 gid; |
---|
39 | guint16 bid; |
---|
40 | guint16 type; |
---|
41 | void *data; |
---|
42 | struct aim_ssi_item *next; |
---|
43 | }; |
---|
44 | |
---|
45 | /* These build the actual SNACs and queue them to be sent */ |
---|
46 | int aim_ssi_reqrights(aim_session_t *sess, aim_conn_t *conn); |
---|
47 | int aim_ssi_reqalldata(aim_session_t *sess, aim_conn_t *conn); |
---|
48 | int aim_ssi_enable(aim_session_t *sess, aim_conn_t *conn); |
---|
49 | int aim_ssi_addmoddel(aim_session_t *sess, aim_conn_t *conn, struct aim_ssi_item **items, unsigned int num, |
---|
50 | guint16 subtype); |
---|
51 | int aim_ssi_modbegin(aim_session_t *sess, aim_conn_t *conn); |
---|
52 | int aim_ssi_modend(aim_session_t *sess, aim_conn_t *conn); |
---|
53 | |
---|
54 | /* These handle the local variables */ |
---|
55 | struct aim_ssi_item *aim_ssi_itemlist_find(struct aim_ssi_item *list, guint16 gid, guint16 bid); |
---|
56 | struct aim_ssi_item *aim_ssi_itemlist_finditem(struct aim_ssi_item *list, char *gn, char *sn, guint16 type); |
---|
57 | struct aim_ssi_item *aim_ssi_itemlist_findparent(struct aim_ssi_item *list, char *sn); |
---|
58 | int aim_ssi_getpermdeny(struct aim_ssi_item *list); |
---|
59 | |
---|
60 | /* Send packets */ |
---|
61 | int aim_ssi_addbuddies(aim_session_t *sess, aim_conn_t *conn, char *gn, char **sn, unsigned int num, |
---|
62 | unsigned int flags); |
---|
63 | int aim_ssi_addmastergroup(aim_session_t *sess, aim_conn_t *conn); |
---|
64 | int aim_ssi_addgroups(aim_session_t *sess, aim_conn_t *conn, char **gn, unsigned int num); |
---|
65 | int aim_ssi_addpord(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num, guint16 type); |
---|
66 | int aim_ssi_movebuddy(aim_session_t *sess, aim_conn_t *conn, char *oldgn, char *newgn, char *sn); |
---|
67 | int aim_ssi_delbuddies(aim_session_t *sess, aim_conn_t *conn, char *gn, char **sn, unsigned int num); |
---|
68 | int aim_ssi_delmastergroup(aim_session_t *sess, aim_conn_t *conn); |
---|
69 | int aim_ssi_delgroups(aim_session_t *sess, aim_conn_t *conn, char **gn, unsigned int num); |
---|
70 | int aim_ssi_delpord(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num, guint16 type); |
---|
71 | int aim_ssi_auth_request(aim_session_t *sess, aim_conn_t *conn, char *uin, char *reason); |
---|
72 | int aim_ssi_auth_reply(aim_session_t *sess, aim_conn_t *conn, char *uin, int yesno, char *reason); |
---|
73 | |
---|
74 | #endif /* __OSCAR_SSI_H__ */ |
---|