annotate src/protocols/oscar/bart.c @ 13209:72414fe08156

[gaim-migrate @ 15573] Ethan noticed that the src and target memory may overlap under certain conditions, so we should use memmove instead of memcpy committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 09 Feb 2006 20:51:27 +0000
parents 1d58cc6c4552
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6879
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
1 /*
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
2 * Family 0x0010 - Server stored buddy art
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
3 *
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
4 * Used for storing and retrieving your cute little buddy icon
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
5 * from the AIM servers.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
6 *
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
7 */
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
8
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
9 #define FAIM_INTERNAL
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
10 #include <aim.h>
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
11
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
12 /**
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
13 * Subtype 0x0002 - Upload your icon.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
14 *
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
15 * @param sess The oscar session.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
16 * @param conn The icon connection for this session.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
17 * @param icon The raw data of the icon image file.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
18 * @param iconlen Length of the raw data of the icon image file.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
19 * @return Return 0 if no errors, otherwise return the error number.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
20 */
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
21 faim_export int aim_bart_upload(aim_session_t *sess, const fu8_t *icon, fu16_t iconlen)
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
22 {
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
23 aim_conn_t *conn;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
24 aim_frame_t *fr;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
25 aim_snacid_t snacid;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
26
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
27 if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0010)) || !icon || !iconlen)
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
28 return -EINVAL;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
29
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
30 if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 2 + 2+iconlen)))
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
31 return -ENOMEM;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
32 snacid = aim_cachesnac(sess, 0x0010, 0x0002, 0x0000, NULL, 0);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
33 aim_putsnac(&fr->data, 0x0010, 0x0002, 0x0000, snacid);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
34
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
35 /* The reference number for the icon */
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
36 aimbs_put16(&fr->data, 1);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
37
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
38 /* The icon */
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
39 aimbs_put16(&fr->data, iconlen);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
40 aimbs_putraw(&fr->data, icon, iconlen);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
41
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
42 aim_tx_enqueue(sess, fr);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
43
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
44 return 0;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
45 }
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
46
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
47 /**
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
48 * Subtype 0x0003 - Acknowledgement for uploading a buddy icon.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
49 *
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
50 * You get this honky after you upload a buddy icon.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
51 */
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
52 static int uploadack(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
53 {
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
54 int ret = 0;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
55 aim_rxcallback_t userfunc;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
56 fu16_t something, somethingelse;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
57 fu8_t onemorething;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
58
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
59 something = aimbs_get16(bs);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
60 somethingelse = aimbs_get16(bs);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
61 onemorething = aimbs_get8(bs);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
62
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
63 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
64 ret = userfunc(sess, rx);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
65
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
66 return ret;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
67 }
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
68
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
69 /**
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
70 * Subtype 0x0004 - Request someone's icon.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
71 *
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
72 * @param sess The oscar session.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
73 * @param conn The icon connection for this session.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
74 * @param sn The screen name of the person who's icon you are requesting.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
75 * @param iconcsum The MD5 checksum of the icon you are requesting.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
76 * @param iconcsumlen Length of the MD5 checksum given above. Should be 10 bytes.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
77 * @return Return 0 if no errors, otherwise return the error number.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
78 */
11024
1d58cc6c4552 [gaim-migrate @ 12897]
Mark Doliner <mark@kingant.net>
parents: 10990
diff changeset
79 faim_export int aim_bart_request(aim_session_t *sess, const char *sn, fu8_t iconcsumtype, const fu8_t *iconcsum, fu16_t iconcsumlen)
6879
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
80 {
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
81 aim_conn_t *conn;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
82 aim_frame_t *fr;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
83 aim_snacid_t snacid;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
84
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
85 if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0010)) || !sn || !strlen(sn) || !iconcsum || !iconcsumlen)
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
86 return -EINVAL;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
87
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
88 if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 1+strlen(sn) + 4 + 1+iconcsumlen)))
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
89 return -ENOMEM;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
90 snacid = aim_cachesnac(sess, 0x0010, 0x0004, 0x0000, NULL, 0);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
91 aim_putsnac(&fr->data, 0x0010, 0x0004, 0x0000, snacid);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
92
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
93 /* Screen name */
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
94 aimbs_put8(&fr->data, strlen(sn));
10990
8d74ae785a46 [gaim-migrate @ 12828]
Mark Doliner <mark@kingant.net>
parents: 6879
diff changeset
95 aimbs_putstr(&fr->data, sn);
6879
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
96
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
97 /* Some numbers. You like numbers, right? */
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
98 aimbs_put8(&fr->data, 0x01);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
99 aimbs_put16(&fr->data, 0x0001);
11024
1d58cc6c4552 [gaim-migrate @ 12897]
Mark Doliner <mark@kingant.net>
parents: 10990
diff changeset
100 aimbs_put8(&fr->data, iconcsumtype);
6879
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
101
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
102 /* Icon string */
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
103 aimbs_put8(&fr->data, iconcsumlen);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
104 aimbs_putraw(&fr->data, iconcsum, iconcsumlen);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
105
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
106 aim_tx_enqueue(sess, fr);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
107
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
108 return 0;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
109 }
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
110
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
111 /**
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
112 * Subtype 0x0005 - Receive a buddy icon.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
113 *
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
114 * This is sent in response to a buddy icon request.
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
115 */
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
116 static int parseicon(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
117 {
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
118 int ret = 0;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
119 aim_rxcallback_t userfunc;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
120 char *sn;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
121 fu16_t flags, iconlen;
11024
1d58cc6c4552 [gaim-migrate @ 12897]
Mark Doliner <mark@kingant.net>
parents: 10990
diff changeset
122 fu8_t iconcsumtype, iconcsumlen, *iconcsum, *icon;
6879
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
123
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
124 sn = aimbs_getstr(bs, aimbs_get8(bs));
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
125 flags = aimbs_get16(bs);
11024
1d58cc6c4552 [gaim-migrate @ 12897]
Mark Doliner <mark@kingant.net>
parents: 10990
diff changeset
126 iconcsumtype = aimbs_get8(bs);
6879
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
127 iconcsumlen = aimbs_get8(bs);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
128 iconcsum = aimbs_getraw(bs, iconcsumlen);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
129 iconlen = aimbs_get16(bs);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
130 icon = aimbs_getraw(bs, iconlen);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
131
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
132 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
11024
1d58cc6c4552 [gaim-migrate @ 12897]
Mark Doliner <mark@kingant.net>
parents: 10990
diff changeset
133 ret = userfunc(sess, rx, sn, iconcsumtype, iconcsum, iconcsumlen, icon, iconlen);
6879
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
134
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
135 free(sn);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
136 free(iconcsum);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
137 free(icon);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
138
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
139 return ret;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
140 }
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
141
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
142 static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
143 {
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
144
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
145 if (snac->subtype == 0x0003)
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
146 return uploadack(sess, mod, rx, snac, bs);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
147 else if (snac->subtype == 0x0005)
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
148 return parseicon(sess, mod, rx, snac, bs);
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
149
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
150 return 0;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
151 }
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
152
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
153 faim_internal int bart_modfirst(aim_session_t *sess, aim_module_t *mod)
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
154 {
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
155
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
156 mod->family = 0x0010;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
157 mod->version = 0x0001;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
158 mod->toolid = 0x0010;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
159 mod->toolversion = 0x0629;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
160 mod->flags = 0;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
161 strncpy(mod->name, "bart", sizeof(mod->name));
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
162 mod->snachandler = snachandler;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
163
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
164 return 0;
594682101ba6 [gaim-migrate @ 7425]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
165 }