comparison src/protocols/oscar/family_bart.c @ 13239:f260d319bbbc

[gaim-migrate @ 15605] Renaming a bunch of structs and typedefs to use the same naming scheme as the rest of Gaim committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 12 Feb 2006 16:02:05 +0000
parents f2431a7e33aa
children 87a7c3077c19
comparison
equal deleted inserted replaced
13238:1e855032d7bc 13239:f260d319bbbc
35 * @param conn The icon connection for this session. 35 * @param conn The icon connection for this session.
36 * @param icon The raw data of the icon image file. 36 * @param icon The raw data of the icon image file.
37 * @param iconlen Length of the raw data of the icon image file. 37 * @param iconlen Length of the raw data of the icon image file.
38 * @return Return 0 if no errors, otherwise return the error number. 38 * @return Return 0 if no errors, otherwise return the error number.
39 */ 39 */
40 faim_export int aim_bart_upload(aim_session_t *sess, const guint8 *icon, guint16 iconlen) 40 faim_export int aim_bart_upload(OscarSession *sess, const guint8 *icon, guint16 iconlen)
41 { 41 {
42 aim_conn_t *conn; 42 OscarConnection *conn;
43 aim_frame_t *fr; 43 FlapFrame *fr;
44 aim_snacid_t snacid; 44 aim_snacid_t snacid;
45 45
46 if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0010)) || !icon || !iconlen) 46 if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0010)) || !icon || !iconlen)
47 return -EINVAL; 47 return -EINVAL;
48 48
66 /** 66 /**
67 * Subtype 0x0003 - Acknowledgement for uploading a buddy icon. 67 * Subtype 0x0003 - Acknowledgement for uploading a buddy icon.
68 * 68 *
69 * You get this honky after you upload a buddy icon. 69 * You get this honky after you upload a buddy icon.
70 */ 70 */
71 static int uploadack(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) 71 static int uploadack(OscarSession *sess, aim_module_t *mod, FlapFrame *rx, aim_modsnac_t *snac, ByteStream *bs)
72 { 72 {
73 int ret = 0; 73 int ret = 0;
74 aim_rxcallback_t userfunc; 74 aim_rxcallback_t userfunc;
75 guint16 something, somethingelse; 75 guint16 something, somethingelse;
76 guint8 onemorething; 76 guint8 onemorething;
93 * @param sn The screen name of the person who's icon you are requesting. 93 * @param sn The screen name of the person who's icon you are requesting.
94 * @param iconcsum The MD5 checksum of the icon you are requesting. 94 * @param iconcsum The MD5 checksum of the icon you are requesting.
95 * @param iconcsumlen Length of the MD5 checksum given above. Should be 10 bytes. 95 * @param iconcsumlen Length of the MD5 checksum given above. Should be 10 bytes.
96 * @return Return 0 if no errors, otherwise return the error number. 96 * @return Return 0 if no errors, otherwise return the error number.
97 */ 97 */
98 faim_export int aim_bart_request(aim_session_t *sess, const char *sn, guint8 iconcsumtype, const guint8 *iconcsum, guint16 iconcsumlen) 98 faim_export int aim_bart_request(OscarSession *sess, const char *sn, guint8 iconcsumtype, const guint8 *iconcsum, guint16 iconcsumlen)
99 { 99 {
100 aim_conn_t *conn; 100 OscarConnection *conn;
101 aim_frame_t *fr; 101 FlapFrame *fr;
102 aim_snacid_t snacid; 102 aim_snacid_t snacid;
103 103
104 if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0010)) || !sn || !strlen(sn) || !iconcsum || !iconcsumlen) 104 if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0010)) || !sn || !strlen(sn) || !iconcsum || !iconcsumlen)
105 return -EINVAL; 105 return -EINVAL;
106 106
130 /** 130 /**
131 * Subtype 0x0005 - Receive a buddy icon. 131 * Subtype 0x0005 - Receive a buddy icon.
132 * 132 *
133 * This is sent in response to a buddy icon request. 133 * This is sent in response to a buddy icon request.
134 */ 134 */
135 static int parseicon(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) 135 static int parseicon(OscarSession *sess, aim_module_t *mod, FlapFrame *rx, aim_modsnac_t *snac, ByteStream *bs)
136 { 136 {
137 int ret = 0; 137 int ret = 0;
138 aim_rxcallback_t userfunc; 138 aim_rxcallback_t userfunc;
139 char *sn; 139 char *sn;
140 guint16 flags, iconlen; 140 guint16 flags, iconlen;
156 free(icon); 156 free(icon);
157 157
158 return ret; 158 return ret;
159 } 159 }
160 160
161 static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) 161 static int snachandler(OscarSession *sess, aim_module_t *mod, FlapFrame *rx, aim_modsnac_t *snac, ByteStream *bs)
162 { 162 {
163 163
164 if (snac->subtype == 0x0003) 164 if (snac->subtype == 0x0003)
165 return uploadack(sess, mod, rx, snac, bs); 165 return uploadack(sess, mod, rx, snac, bs);
166 else if (snac->subtype == 0x0005) 166 else if (snac->subtype == 0x0005)
167 return parseicon(sess, mod, rx, snac, bs); 167 return parseicon(sess, mod, rx, snac, bs);
168 168
169 return 0; 169 return 0;
170 } 170 }
171 171
172 faim_internal int bart_modfirst(aim_session_t *sess, aim_module_t *mod) 172 faim_internal int bart_modfirst(OscarSession *sess, aim_module_t *mod)
173 { 173 {
174 174
175 mod->family = 0x0010; 175 mod->family = 0x0010;
176 mod->version = 0x0001; 176 mod->version = 0x0001;
177 mod->toolid = 0x0010; 177 mod->toolid = 0x0010;