annotate libpurple/protocols/yahoo/yahoo_friend.h @ 28655:06fabb28bc69

The "packed" attribute on the raw_chunk data-structure seems to be a GCC extension. (ie, no alignment padding between members of the structure) To build with compilers which don't support this packed attribute, we've now use methods to access/modify the fields in the packed MXit chunk header.
author andrew.victor@mxit.com
date Tue, 24 Nov 2009 13:23:27 +0000
parents 61856d0a2714
children 44f53d3fc54f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15373
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 *
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15373
diff changeset
4 * purple
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 *
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15373
diff changeset
6 * Purple is the legal property of its developers, whose names are too numerous
15373
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
19681
44b4e8bd759b The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 15822
diff changeset
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
15373
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
27313
ef5f0cde8d74 Update for file renames.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 25072
diff changeset
28 #include "libymsg.h"
15373
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
25059
f16aba67b685 Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 22831
diff changeset
37 typedef enum {
25069
262ae5f56a9a Better naming convention, prefix YAHOO_P2PSTATUS_ to values in the enum YahooP2PStatus
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 25063
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: 25063
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: 25063
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: 25063
diff changeset
41 YAHOO_P2PSTATUS_WE_ARE_CLIENT
25059
f16aba67b685 Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 22831
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: 22831
diff changeset
43
28364
61856d0a2714 Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
kryojenik23-pidgin@steltek.com
parents: 27538
diff changeset
44
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45 /* 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
46 * 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
47 */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
48 typedef struct _YahooFriend {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
49 enum yahoo_status status;
22831
0b11895cc564 Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 22018
diff changeset
50 gchar *msg;
0b11895cc564 Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 22018
diff changeset
51 gchar *game;
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52 int idle;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 int away;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
54 gboolean sms;
22831
0b11895cc564 Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 22018
diff changeset
55 gchar *ip;
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56 gboolean bicon_sent_request;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
57 YahooPresenceVisibility presence;
28364
61856d0a2714 Handle adding Lotus Sametime and Microsoft OCS buddies to Yahoo! accounts.
kryojenik23-pidgin@steltek.com
parents: 27538
diff changeset
58 YahooFederation fed;
22018
118046227581 This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan <madthanu@gmail.com>
parents: 19681
diff changeset
59 long int version_id;
27538
fa827f6f990f Add support for receiving contact details from buddies.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 27455
diff changeset
60 YahooPersonalDetails ypd;
25059
f16aba67b685 Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 22831
diff changeset
61 YahooP2PStatus p2p_status;
25072
63033139c590 minor changes in comments style and alphabetic ordering of header files.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 25069
diff changeset
62 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: 25069
diff changeset
63 gint session_id; /* session id of friend */
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64 } YahooFriend;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
65
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15373
diff changeset
66 YahooFriend *yahoo_friend_find(PurpleConnection *gc, const char *name);
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15373
diff changeset
67 YahooFriend *yahoo_friend_find_or_new(PurpleConnection *gc, const char *name);
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
68
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69 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
70 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
71
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72 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
73 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
74
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
75 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
76 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
77
22831
0b11895cc564 Leak fixes. Avoid creating an unnecessary parallel data structure to YahooFriend.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 22018
diff changeset
78 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
79 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
80
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81 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
82 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
83
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84 void yahoo_friend_free(gpointer p);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15373
diff changeset
86 void yahoo_process_presence(PurpleConnection *gc, struct yahoo_packet *pkt);
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15373
diff changeset
87 void yahoo_friend_update_presence(PurpleConnection *gc, const char *name,
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88 YahooPresenceVisibility presence);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
89
25059
f16aba67b685 Sending of p2p packet, providing peer with our IP address to make a connection to us.
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 22831
diff changeset
90 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: 22831
diff changeset
91 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: 22831
diff changeset
92
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
93 #endif /* _YAHOO_FRIEND_H_ */