Wed, 30 Jul 2008 03:58:21 +0000
Cleanup unnecessary casts and etc.
| 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; | |
|
22980
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
22202
diff
changeset
|
42 | gchar *msg; |
|
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
22202
diff
changeset
|
43 | gchar *game; |
| 9278 | 44 | int idle; |
| 45 | int away; | |
| 46 | gboolean sms; | |
|
22980
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
22202
diff
changeset
|
47 | gchar *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; |
|
22980
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
22202
diff
changeset
|
52 | gchar *alias_id; |
| 9278 | 53 | } YahooFriend; |
| 54 | ||
| 15884 | 55 | YahooFriend *yahoo_friend_find(PurpleConnection *gc, const char *name); |
| 56 | YahooFriend *yahoo_friend_find_or_new(PurpleConnection *gc, const char *name); | |
| 9281 | 57 | |
| 58 | void yahoo_friend_set_ip(YahooFriend *f, const char *ip); | |
| 59 | const char *yahoo_friend_get_ip(YahooFriend *f); | |
| 60 | ||
| 9283 | 61 | void yahoo_friend_set_game(YahooFriend *f, const char *game); |
| 62 | const char *yahoo_friend_get_game(YahooFriend *f); | |
| 63 | ||
| 64 | void yahoo_friend_set_status_message(YahooFriend *f, char *msg); | |
| 65 | const char *yahoo_friend_get_status_message(YahooFriend *f); | |
| 66 | ||
|
22980
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
22202
diff
changeset
|
67 | void yahoo_friend_set_alias_id(YahooFriend *f, const char *alias_id); |
|
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
22202
diff
changeset
|
68 | const char *yahoo_friend_get_alias_id(YahooFriend *f); |
|
b5c23c9bbd24
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <datallah@pidgin.im>
parents:
22202
diff
changeset
|
69 | |
| 9284 | 70 | void yahoo_friend_set_buddy_icon_need_request(YahooFriend *f, gboolean needs); |
| 71 | gboolean yahoo_friend_get_buddy_icon_need_request(YahooFriend *f); | |
| 72 | ||
| 9278 | 73 | void yahoo_friend_free(gpointer p); |
| 74 | ||
| 15884 | 75 | void yahoo_process_presence(PurpleConnection *gc, struct yahoo_packet *pkt); |
| 76 | 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
|
77 | YahooPresenceVisibility presence); |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
9292
diff
changeset
|
78 | |
| 9278 | 79 | #endif /* _YAHOO_FRIEND_H_ */ |