comparison src/protocols/msn/buddyicon.h @ 5351:2aa7e4237142

[gaim-migrate @ 5727] Buddy icon support! The MSN protocol does not support this, but it does allow for different content-types, which no client (except a couple broken ones I can name) will see. So, I managed to extend the protocol a bit to do buddy icons. It should work like AIM. Setup your icon in your account editor, and message somebody. If they change their icon, however, you will have to close the conversation window, re-open it, and send another message. That's just how it has to work for now, I'm afraid. Oh, and another thing. MSNP7 (P6 as well? Not sure) times out inactive conversations after 5 minutes. Right now, you're seeing "User has closed the conversation window" messages, but they're really not. So, we now print out a message saying it timed out. Ugly, yes, but unless we have both messages, there's confusion. Oh well! Kick the hay! committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 10 May 2003 23:55:18 +0000
parents
children 4f72b611f0ee
comparison
equal deleted inserted replaced
5350:a6146cbae03b 5351:2aa7e4237142
1 /**
2 * @file buddyicon.h Buddy icon support
3 *
4 * gaim
5 *
6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22 #ifndef _MSN_BUDDY_ICON_H_
23 #define _MSN_BUDDY_ICON_H_
24
25 typedef struct _MsnBuddyIconXfer MsnBuddyIconXfer;
26
27 #include "servconn.h"
28
29 /**
30 * State of a buddy icon transfer.
31 */
32 struct _MsnBuddyIconXfer
33 {
34 MsnUser *user; /**< The user on the other end of the transfer. */
35
36 gboolean sending; /**< True if sending this icon. */
37
38 size_t bytes_xfer; /**< The current bytes sent or retrieved. */
39 size_t total_size; /**< The total size of the base64 icon data. */
40 size_t file_size; /**< The file size of the actual icon. */
41
42 char *md5sum; /**< The MD5SUM of the icon. */
43 char *data; /**< The buddy icon data. */
44 };
45
46 /**
47 * Creates an MsnBuddyIconXfer structure.
48 *
49 * @return The MsnBuddyIconXfer structure.
50 */
51 MsnBuddyIconXfer *msn_buddy_icon_xfer_new(void);
52
53 /**
54 * Destroys an MsnBuddyIconXfer structure.
55 *
56 * @param The buddy icon structure.
57 */
58 void msn_buddy_icon_xfer_destroy(MsnBuddyIconXfer *xfer);
59
60 /**
61 * Processed application/x-buddyicon messages.
62 *
63 * @param servconn The server connection.
64 * @param msg The message.
65 *
66 * @return TRUE
67 */
68 gboolean msn_buddy_icon_msg(MsnServConn *servconn, const MsnMessage *msg);
69
70 /**
71 * Sends a buddy icon invitation message.
72 *
73 * @param swboard The switchboard to send to.
74 */
75 void msn_buddy_icon_invite(MsnSwitchBoard *swboard);
76
77 #endif /* _MSN_BUDDY_ICON_H_ */