annotate src/protocols/yahoo/yahoo_friend.c @ 9278:2401a9ef74a0

[gaim-migrate @ 10081] Some reorganization. Renamed struct yahoo_friend to YahooFriend. Gave it its own file, which only has two functions. Either I've lost it or I intend to add to it. You decide. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Mon, 14 Jun 2004 04:51:14 +0000
parents
children 1eaa4d8dcf26
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9278
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
1 /*
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
2 * gaim
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
3 *
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
4 * Gaim is the legal property of its developers, whose names are too numerous
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
6 * source distribution.
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
7 *
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
11 * (at your option) any later version.
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
12 *
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
16 * GNU General Public License for more details.
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
17 *
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
21 *
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
22 */
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
23
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
24 #include "prpl.h"
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
25
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
26 #include "yahoo_friend.h"
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
27
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
28 YahooFriend *yahoo_friend_new(void)
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
29 {
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
30 YahooFriend *ret;
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
31
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
32 ret = g_new0(YahooFriend, 1);
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
33 ret->status = YAHOO_STATUS_OFFLINE;
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
34
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
35 return ret;
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
36 }
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
37
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
38 void yahoo_friend_free(gpointer p)
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
39 {
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
40 YahooFriend *f = p;
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
41 if (f->msg)
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
42 g_free(f->msg);
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
43 if (f->game)
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
44 g_free(f->game);
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
45 g_free(f);
2401a9ef74a0 [gaim-migrate @ 10081]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
46 }