Wed, 16 Jan 2008 06:29:52 +0000
Get rid of an unnecessary allocation.
| 9278 | 1 | /** |
| 2 | * @file yahoo_friend.h The Yahoo! protocol plugin YahooFriend object | |
| 3 | * | |
| 15884 | 4 | * purple |
| 9278 | 5 | * |
| 15884 | 6 | * Purple is the legal property of its developers, whose names are too numerous |
| 9278 | 7 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 8 | * source distribution. | |
| 9 | * | |
| 10 | * This program is free software; you can redistribute it and/or modify | |
| 11 | * it under the terms of the GNU General Public License as published by | |
| 12 | * the Free Software Foundation; either version 2 of the License, or | |
| 13 | * (at your option) any later version. | |
| 14 | * | |
| 15 | * This program is distributed in the hope that it will be useful, | |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 | * GNU General Public License for more details. | |
| 19 | * | |
| 20 | * You should have received a copy of the GNU General Public License | |
| 21 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
15884
diff
changeset
|
22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 9278 | 23 | */ |
| 24 | ||
| 25 | #ifndef _YAHOO_FRIEND_H_ | |
| 26 | #define _YAHOO_FRIEND_H_ | |
| 27 | ||
| 28 | #include "yahoo.h" | |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9292
diff
changeset
|
29 | #include "yahoo_packet.h" |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9292
diff
changeset
|
30 | |
|
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9292
diff
changeset
|
31 | typedef enum { |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
10989
diff
changeset
|
32 | YAHOO_PRESENCE_DEFAULT = 0, |
|
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
10989
diff
changeset
|
33 | YAHOO_PRESENCE_ONLINE, |
|
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
10989
diff
changeset
|
34 | YAHOO_PRESENCE_PERM_OFFLINE |
|
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
10989
diff
changeset
|
35 | } YahooPresenceVisibility; |
| 9278 | 36 | |
| 37 | /* these are called friends instead of buddies mainly so I can use variables | |
| 38 | * named f and not confuse them with variables named b | |
| 39 | */ | |
| 40 | typedef struct _YahooFriend { | |
| 41 | enum yahoo_status status; | |
| 42 | char *msg; | |
| 43 | char *game; | |
| 44 | int idle; | |
| 45 | int away; | |
| 46 | gboolean sms; | |
| 47 | char *ip; | |
| 9284 | 48 | gboolean bicon_sent_request; |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
10989
diff
changeset
|
49 | YahooPresenceVisibility presence; |
| 14346 | 50 | int protocol; /* 1=LCS, 2=MSN*/ |
|
22202
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
19859
diff
changeset
|
51 | long int version_id; |
| 9278 | 52 | } YahooFriend; |
| 53 | ||
| 15884 | 54 | YahooFriend *yahoo_friend_find(PurpleConnection *gc, const char *name); |
| 55 | YahooFriend *yahoo_friend_find_or_new(PurpleConnection *gc, const char *name); | |
| 9281 | 56 | |
| 57 | void yahoo_friend_set_ip(YahooFriend *f, const char *ip); | |
| 58 | const char *yahoo_friend_get_ip(YahooFriend *f); | |
| 59 | ||
| 9283 | 60 | void yahoo_friend_set_game(YahooFriend *f, const char *game); |
| 61 | const char *yahoo_friend_get_game(YahooFriend *f); | |
| 62 | ||
| 63 | void yahoo_friend_set_status_message(YahooFriend *f, char *msg); | |
| 64 | const char *yahoo_friend_get_status_message(YahooFriend *f); | |
| 65 | ||
| 9284 | 66 | void yahoo_friend_set_buddy_icon_need_request(YahooFriend *f, gboolean needs); |
| 67 | gboolean yahoo_friend_get_buddy_icon_need_request(YahooFriend *f); | |
| 68 | ||
| 9278 | 69 | void yahoo_friend_free(gpointer p); |
| 70 | ||
| 15884 | 71 | void yahoo_process_presence(PurpleConnection *gc, struct yahoo_packet *pkt); |
| 72 | void yahoo_friend_update_presence(PurpleConnection *gc, const char *name, | |
|
12010
aa2f3b07ec09
[gaim-migrate @ 14303]
Peter Lawler <pidgin@bleeter.id.au>
parents:
10989
diff
changeset
|
73 | YahooPresenceVisibility presence); |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9292
diff
changeset
|
74 | |
| 9278 | 75 | #endif /* _YAHOO_FRIEND_H_ */ |