Mercurial > pidgin.yaz
annotate libpurple/protocols/yahoo/yahoo_friend.h @ 28331:0af4b1fb0566
propagate from branch 'im.pidgin.pidgin' (head 1876e80a840aa8045b1a49c60049781e0d285558)
to branch 'im.pidgin.cpw.darkrain42.2.6.1' (head 0e467725740268650f924a56ea776122abfffb67)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Mon, 03 Aug 2009 00:46:28 +0000 |
parents | fa827f6f990f |
children | 61856d0a2714 |
rev | line source |
---|---|
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
2 * @file yahoo_friend.h The Yahoo! protocol plugin YahooFriend object |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 * |
15823 | 4 * purple |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 * |
15823 | 6 * Purple is the legal property of its developers, whose names are too numerous |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 * to list here. Please refer to the COPYRIGHT file distributed with this |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 * source distribution. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * This program is free software; you can redistribute it and/or modify |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * it under the terms of the GNU General Public License as published by |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * the Free Software Foundation; either version 2 of the License, or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * This program is distributed in the hope that it will be useful, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 * GNU General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 * along with this program; if not, write to the Free Software |
19680
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
15823
diff
changeset
|
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
24 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 #ifndef _YAHOO_FRIEND_H_ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 #define _YAHOO_FRIEND_H_ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
27 |
27395
ef5f0cde8d74
Update for file renames.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
25630
diff
changeset
|
28 #include "libymsg.h" |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 #include "yahoo_packet.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
30 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 typedef enum { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
32 YAHOO_PRESENCE_DEFAULT = 0, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
33 YAHOO_PRESENCE_ONLINE, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
34 YAHOO_PRESENCE_PERM_OFFLINE |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
35 } YahooPresenceVisibility; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 |
25617
f16aba67b685
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents:
22807
diff
changeset
|
37 typedef enum { |
25627
262ae5f56a9a
Better naming convention, prefix YAHOO_P2PSTATUS_ to values in the enum YahooP2PStatus
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents:
25621
diff
changeset
|
38 YAHOO_P2PSTATUS_NOT_CONNECTED = 0, |
262ae5f56a9a
Better naming convention, prefix YAHOO_P2PSTATUS_ to values in the enum YahooP2PStatus
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents:
25621
diff
changeset
|
39 YAHOO_P2PSTATUS_DO_NOT_CONNECT, |
262ae5f56a9a
Better naming convention, prefix YAHOO_P2PSTATUS_ to values in the enum YahooP2PStatus
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents:
25621
diff
changeset
|
40 YAHOO_P2PSTATUS_WE_ARE_SERVER, |
262ae5f56a9a
Better naming convention, prefix YAHOO_P2PSTATUS_ to values in the enum YahooP2PStatus
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents:
25621
diff
changeset
|
41 YAHOO_P2PSTATUS_WE_ARE_CLIENT |
25617
f16aba67b685
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents:
22807
diff
changeset
|
42 } YahooP2PStatus; |
f16aba67b685
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents:
22807
diff
changeset
|
43 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
44 /* these are called friends instead of buddies mainly so I can use variables |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
45 * named f and not confuse them with variables named b |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
46 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
47 typedef struct _YahooFriend { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
48 enum yahoo_status status; |
22807
0b11895cc564
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22018
diff
changeset
|
49 gchar *msg; |
0b11895cc564
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22018
diff
changeset
|
50 gchar *game; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
51 int idle; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
52 int away; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
53 gboolean sms; |
22807
0b11895cc564
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22018
diff
changeset
|
54 gchar *ip; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
55 gboolean bicon_sent_request; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
56 YahooPresenceVisibility presence; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
57 int protocol; /* 1=LCS, 2=MSN*/ |
22018
118046227581
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan <madthanu@gmail.com>
parents:
19680
diff
changeset
|
58 long int version_id; |
27614
fa827f6f990f
Add support for receiving contact details from buddies.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
27531
diff
changeset
|
59 YahooPersonalDetails ypd; |
25617
f16aba67b685
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents:
22807
diff
changeset
|
60 YahooP2PStatus p2p_status; |
25630
63033139c590
minor changes in comments style and alphabetic ordering of header files.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents:
25627
diff
changeset
|
61 gboolean p2p_packet_sent; /* 0:not sent, 1=sent */ |
63033139c590
minor changes in comments style and alphabetic ordering of header files.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents:
25627
diff
changeset
|
62 gint session_id; /* session id of friend */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
63 } YahooFriend; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
64 |
15823 | 65 YahooFriend *yahoo_friend_find(PurpleConnection *gc, const char *name); |
66 YahooFriend *yahoo_friend_find_or_new(PurpleConnection *gc, const char *name); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
67 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
68 void yahoo_friend_set_ip(YahooFriend *f, const char *ip); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
69 const char *yahoo_friend_get_ip(YahooFriend *f); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
70 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
71 void yahoo_friend_set_game(YahooFriend *f, const char *game); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
72 const char *yahoo_friend_get_game(YahooFriend *f); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
73 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
74 void yahoo_friend_set_status_message(YahooFriend *f, char *msg); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
75 const char *yahoo_friend_get_status_message(YahooFriend *f); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
76 |
22807
0b11895cc564
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22018
diff
changeset
|
77 void yahoo_friend_set_alias_id(YahooFriend *f, const char *alias_id); |
0b11895cc564
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22018
diff
changeset
|
78 const char *yahoo_friend_get_alias_id(YahooFriend *f); |
0b11895cc564
Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22018
diff
changeset
|
79 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
80 void yahoo_friend_set_buddy_icon_need_request(YahooFriend *f, gboolean needs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
81 gboolean yahoo_friend_get_buddy_icon_need_request(YahooFriend *f); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
82 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
83 void yahoo_friend_free(gpointer p); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
84 |
15823 | 85 void yahoo_process_presence(PurpleConnection *gc, struct yahoo_packet *pkt); |
86 void yahoo_friend_update_presence(PurpleConnection *gc, const char *name, | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
87 YahooPresenceVisibility presence); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
88 |
25617
f16aba67b685
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents:
22807
diff
changeset
|
89 void yahoo_friend_set_p2p_status(YahooFriend *f, YahooP2PStatus p2p_status); |
f16aba67b685
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents:
22807
diff
changeset
|
90 YahooP2PStatus yahoo_friend_get_p2p_status(YahooFriend *f); |
f16aba67b685
Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents:
22807
diff
changeset
|
91 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
92 #endif /* _YAHOO_FRIEND_H_ */ |