annotate src/protocols/oscar/invite.c @ 3952:07283934dedd

[gaim-migrate @ 4133] Ok, big commit with little functionality change. Most of it is me shuffling crap around because I'm one of them neat freaks. Lots of general code cleanup too. I'm trying to move to that whole "one-family-per-file" thing. The details... I added libfaim support for aim's new search family, 0x000f. I only tested this briefly, so if anyone uses it for anything, be aware that it could be buggy. I'll add oscar support sometime. Advantages of this family are... when you search for someone, you get the directory info for that person. So like, first name, middle name, last name, maiden name, city, state, country, zip, address, interests, nickname, and maybe some other stuff. Basically all the info that they've set in their directory info thing. Info. Oh, and I'm calling it "new search" because seach was already taken, and cookie monster ate my right brain. The reason I didn't add support to oscar.c... the new search family requires making a connection to another server. While moving stuff around I realized that I didn't really like how new connections are made. It's kind of sloppy. I'm thinking it would be nice to have an outgoing queue for each type of connection, and then let the client queue messages as much as they want. Then, if libfaim sees that there is a message for a certain type of connection, and there is no open connection of that type, it will connect, and then flush the queue when the connection is made. This seems a lot cleaner, but it also seems like a pain in the ass. I should do ssi for icq first, anyway :-) Also, I think it would be neat if there was an ICBM file that handled channels 1 through 4. Then im.c and chat.c could pass the ICBM part to the icbm stuff and it could get parsed there. im.c is really huge right now. I applied a patch from Graham Booker that paves the way for unicode in direct IMs. Thanks Graham. Now we just need Paco-Paco to git a little free time and write a patch for this. http://sourceforge.net/tracker/index.php?func=detail&aid=633589&group_id=235&atid=300235 I applied 2 patches from Will Mahan dealing with file transfer/oft/rendezous/whatever. Here's some info on them, from The Man himself: Patch 1 "Currently the Rendezvous code is rather messy; this patch attempts to bring it up to speed with the rest of the Oscar prpl. Its changes include: * Rewrite several ft.c functions to use bstreams. Apparently the code in question was written before bstreams were implemented. * Handle incoming Rendezvous packets through the rxqueue like FLAP packets, rather than handling them as a special case as soon as they are received. This takes advantage of the bstream cleanup to unify some code and simplify the aim_frame_t struct. * Change some names used to try to clarify the distinction between OFT, which refers specifically to file transfer, and Rendezvous, which encompasses OFT as well as other types of client-to-client connections." Patch 2 "* Add some comments I inadvertently left out of my last patch. * Fix a double-free that occurs when connections time out. * Correct a bug causing filenames to be truncated by 4 characters on some clients. * Preserve directory structure when sending multiple files. * Handle (throw away) resource forks sent by Mac clients." I also changed all indents to tabs in ft.c. And split all the bstream stuff from rxqueue.c and put it in bstream.c. It really is a separate thing. Especially since it can be used for outgoing connections. Also, I was going to look over the whole patch tonight to make sure it's all good, but it's like 6000 lines, so, uh, I'll do it later. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 13 Nov 2002 07:01:37 +0000
parents c41030cfed76
children 2532f1192da3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2672
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
1 /*
3952
07283934dedd [gaim-migrate @ 4133]
Mark Doliner <mark@kingant.net>
parents: 2672
diff changeset
2 * Family 0x0006 - This isn't really ever used by anyone anymore.
2672
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
3 *
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
4 * Once upon a time, there used to be a menu item in AIM clients that
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
5 * said something like "Invite a friend to use AIM..." and then it would
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
6 * ask for an email address and it would sent a mail to them saying
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
7 * how perfectly wonderful the AIM service is and why you should use it
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
8 * and click here if you hate the person who sent this to you and want to
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
9 * complain and yell at them in a small box with pretty fonts.
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
10 *
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
11 * I could've sworn libfaim had this implemented once, a long long time ago,
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
12 * but I can't find it.
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
13 *
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
14 * I'm mainly adding this so that I can keep advertising that we support
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
15 * group 6, even though we don't.
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
16 *
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
17 */
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
18
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
19 #define FAIM_INTERNAL
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
20 #include <aim.h>
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
21
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
22 faim_internal int invite_modfirst(aim_session_t *sess, aim_module_t *mod)
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
23 {
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
24
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
25 mod->family = 0x0006;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
26 mod->version = 0x0001;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
27 mod->toolid = 0x0110;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
28 mod->toolversion = 0x047b;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
29 mod->flags = 0;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
30 strncpy(mod->name, "invite", sizeof(mod->name));
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
31 mod->snachandler = NULL;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
32
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
33 return 0;
c41030cfed76 [gaim-migrate @ 2685]
Adam Fritzler <mid@auk.cx>
parents:
diff changeset
34 }