Mercurial > pidgin.yaz
annotate libfaim/aim_search.c @ 927:9b04a3419351
[gaim-migrate @ 937]
Fixed the linkifier even more.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Mon, 18 Sep 2000 18:58:03 +0000 |
parents | 595ac7759563 |
children | 920c86b753d7 |
rev | line source |
---|---|
2 | 1 |
2 /* | |
3 * aim_search.c | |
4 * | |
5 * TODO: Add aim_usersearch_name() | |
6 * | |
7 */ | |
8 | |
283
0f14e6d8a51b
[gaim-migrate @ 293]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
237
diff
changeset
|
9 #include <faim/aim.h> |
2 | 10 |
840
595ac7759563
[gaim-migrate @ 850]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
445
diff
changeset
|
11 faim_export unsigned long aim_usersearch_address(struct aim_session_t *sess, |
595ac7759563
[gaim-migrate @ 850]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
445
diff
changeset
|
12 struct aim_conn_t *conn, |
595ac7759563
[gaim-migrate @ 850]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
445
diff
changeset
|
13 char *address) |
2 | 14 { |
237 | 15 struct command_tx_struct *newpacket; |
2 | 16 |
17 if (!address) | |
18 return -1; | |
19 | |
445
e4c34ca88d9b
[gaim-migrate @ 455]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
283
diff
changeset
|
20 if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 10+strlen(address)))) |
237 | 21 return -1; |
2 | 22 |
237 | 23 newpacket->lock = 1; |
2 | 24 |
237 | 25 aim_putsnac(newpacket->data, 0x000a, 0x0002, 0x0000, sess->snac_nextid); |
2 | 26 |
237 | 27 aimutil_putstr(newpacket->data+10, address, strlen(address)); |
2 | 28 |
237 | 29 aim_tx_enqueue(sess, newpacket); |
2 | 30 |
31 { | |
32 struct aim_snac_t snac; | |
33 | |
237 | 34 snac.id = sess->snac_nextid; |
2 | 35 snac.family = 0x000a; |
36 snac.type = 0x0002; | |
37 snac.flags = 0x0000; | |
38 | |
39 snac.data = malloc(strlen(address)+1); | |
40 memcpy(snac.data, address, strlen(address)+1); | |
41 | |
237 | 42 aim_newsnac(sess, &snac); |
2 | 43 } |
44 | |
237 | 45 return (sess->snac_nextid++); |
2 | 46 } |
47 |