annotate src/prpl.h @ 4687:283fb289c510

[gaim-migrate @ 4998] This is a new buddy list. Lots of things about it just Don't Work. I probably already know about those things, and you'd just be wasting my time in submitting a bug report about it. I decided that instead of getting it to all work perfectly before committing, that I'd get it in cvs, and slowly fix it with regular commits. That way, it's easier to keep track of things, and other developers can help. Plus, I'm getting pissed off at the buddy list and want it to die. It's kinda boring, and doing nothing but the buddy list for such a long time has just gotten me very bitter. After 0.60 is released later this week, Gaim will resume being fun. This week is going to be very stressful, though, I'm sure. Things you ought to know about this buddy list: - It crashes - It leaks - There's no way to edit the buddy list, or access offline buddies - Most of the menus and buttons and whatnot just plain ol' don't work. - Status icons are only implemented for AIM. That's mostly just because I'm lazy. As such, you may want to be wary of updating this. If you do decide to update this, you may want to learn "cvs update -D yesterday" as well :) All the art there is just placeholder art. You probably won't really have as many problems as it sounds like you will from reading this. This message is extra-negative to stress that I don't want to be bothered with complaints about something not working about it :). I'll repeat: If something doesn't work, I probably already know about it. If you want to actually help with something, I'd be delighted to have it. IM me. -s. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 10 Mar 2003 05:30:31 +0000
parents 6e7196dcfd37
children 534eaa4ead94
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
1 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
2 * @file prpl.h Protocol Plugin functions
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
3 *
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4 * gaim
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5 *
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 *
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11 * (at your option) any later version.
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 *
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 * GNU General Public License for more details.
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 *
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 *
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 */
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
24 /* this file should be all that prpls need to include. therefore, by including
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
25 * this file, they should get glib, proxy, gaim_connection, prpl, etc. */
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
27 #ifndef _GAIM_PRPL_H_
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
28 #define _GAIM_PRPL_H_
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
29
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
30 #include "core.h"
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
31 #include "proxy.h"
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32 #include "multi.h"
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
33
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
34 /**************************************************************************/
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
35 /** @name Basic Protocol Information */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
36 /**************************************************************************/
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
37 /*@{*/
3572
bdd0bebd2d04 [gaim-migrate @ 3670]
Sean Egan <seanegan@gmail.com>
parents: 3466
diff changeset
38
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
39 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
40 * Protocol types and numbers.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
41 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
42 * Do not assume a new protocol number without talking to
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
43 * Rob Flynn or Sean Egan first!
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
44 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
45 typedef enum
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
46 {
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
47 PROTO_TOC = 0, /**< AIM TOC protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
48 PROTO_OSCAR, /**< AIM OSCAR protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
49 PROTO_YAHOO, /**< Yahoo Messenger protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
50 PROTO_ICQ, /**< Outdated ICQ protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
51 PROTO_MSN, /**< MSN Messenger protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
52 PROTO_IRC, /**< IRC protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
53 PROTO_FTP, /**< FTP protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
54 PROTO_VGATE, /**< VGATE protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
55 PROTO_JABBER, /**< Jabber protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
56 PROTO_NAPSTER, /**< Napster/OpenNAP protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
57 PROTO_ZEPHYR, /**< MIT Zephyr protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
58 PROTO_GADUGADU, /**< Gadu-Gadu protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
59 PROTO_SAMETIME, /**< SameTime protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
60 PROTO_TLEN, /**< TLEN protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
61 PROTO_RVP, /**< RVP protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
62 PROTO_BACKRUB, /**< Instant Massager protocol */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
63 PROTO_UNTAKEN /**< Untaken protocol number */
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
64
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
65 } GaimProtocol;
2162
a464da684307 [gaim-migrate @ 2172]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2154
diff changeset
66
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
67 /** Default protocol plugin description */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
68 #define PRPL_DESC(x) \
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
69 "Allows gaim to use the " x " protocol.\n\n" \
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
70 "Now that you have loaded this protocol, use the " \
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
71 "Account Editor to add an account that uses this " \
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
72 "protocol. You can access the Account Editor from " \
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
73 "the \"Accounts\" button on the login window or " \
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
74 "in the \"Tools\" menu in the buddy list window."
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
75
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
76 /** Default protocol */
1878
75643b9f4261 [gaim-migrate @ 1888]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1815
diff changeset
77 #define DEFAULT_PROTO PROTO_OSCAR
75643b9f4261 [gaim-migrate @ 1888]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1815
diff changeset
78
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
79 /*@}*/
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
80
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
81 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
82 * Protocol options
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
83 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
84 * These should all be stuff that some plugins can do and others can't.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
85 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
86 typedef enum
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
87 {
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
88 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
89 * TOC and Oscar send HTML-encoded messages;
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
90 * most other protocols don't.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
91 */
4668
6e7196dcfd37 [gaim-migrate @ 4979]
Christian Hammond <chipx86@chipx86.com>
parents: 4596
diff changeset
92 #if 0
6e7196dcfd37 [gaim-migrate @ 4979]
Christian Hammond <chipx86@chipx86.com>
parents: 4596
diff changeset
93 #define OPT_PROTO_HTML 0x00000001 this should be per-connection */
6e7196dcfd37 [gaim-migrate @ 4979]
Christian Hammond <chipx86@chipx86.com>
parents: 4596
diff changeset
94 #endif
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
95
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
96 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
97 * Synchronize the time between the local computer and the server.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
98 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
99 * TOC and Oscar have signon time, and the server's time needs
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
100 * to be adjusted to match your computer's time.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
101 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
102 * We wouldn't need this if everyone used NTP.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
103 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
104 OPT_PROTO_CORRECT_TIME = 0x00000002,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
105
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
106 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
107 * Use a unique name, not an alias, for chat rooms.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
108 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
109 * Jabber lets you choose what name you want for chat.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
110 * So it shouldn't be pulling the alias for when you're in chat;
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
111 * it gets annoying.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
112 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
113 OPT_PROTO_UNIQUE_CHATNAME = 0x00000004,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
114
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
115 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
116 * Chat rooms have topics.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
117 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
118 * IRC and Jabber support this.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
119 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
120 OPT_PROTO_CHAT_TOPIC = 0x00000008,
1370
776bb4c6c0b8 [gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1355
diff changeset
121
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
122 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
123 * Don't require passwords for sign-in.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
124 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
125 * Zephyr doesn't require passwords, so there's no need for
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
126 * a password prompt.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
127 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
128 OPT_PROTO_NO_PASSWORD = 0x00000010,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
129
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
130 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
131 * Notify on new mail.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
132 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
133 * MSN and Yahoo notify you when you have new mail.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
134 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
135 OPT_PROTO_MAIL_CHECK = 0x00000020,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
136
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
137 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
138 * Buddy icon support.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
139 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
140 * Oscar and Jabber have buddy icons.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
141 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
142 OPT_PROTO_BUDDY_ICON = 0x00000040,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
143
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
144 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
145 * Images in IMs.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
146 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
147 * Oscar lets you send images in direct IMs.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
148 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
149 OPT_PROTO_IM_IMAGE = 0x00000080,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
150
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
151 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
152 * Allow passwords to be optional.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
153 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
154 * Passwords in IRC are optional, and are needed for certain
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
155 * functionality.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
156 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
157 OPT_PROTO_PASSWORD_OPTIONAL = 0x00000100,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
158
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
159 } GaimProtocolOptions;
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
160
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
161 /** Custom away message. */
4596
7e1591c6d0d8 [gaim-migrate @ 4881]
Luke Schierer <lschiere@pidgin.im>
parents: 4557
diff changeset
162 #define GAIM_AWAY_CUSTOM _("Custom")
1401
bf041349b11e [gaim-migrate @ 1411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1370
diff changeset
163
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
164 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
165 * Protocol plugin initialization function.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
166 */
1000
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 981
diff changeset
167 typedef void (*proto_init)(struct prpl *);
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 981
diff changeset
168
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
169 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
170 * A protocol plugin structure.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
171 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
172 * Every protocol plugin initializes this structure. It is the gateway
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
173 * between gaim and the protocol plugin.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
174 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
175 struct prpl
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
176 {
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
177 GaimProtocol protocol; /**< The protocol type. */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
178 GaimProtocolOptions options; /**< Protocol options. */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
179 struct gaim_plugin *plug; /**< The base plugin structure. */
3572
bdd0bebd2d04 [gaim-migrate @ 3670]
Sean Egan <seanegan@gmail.com>
parents: 3466
diff changeset
180 char *name;
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
181
4687
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4668
diff changeset
182 /**
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4668
diff changeset
183 * Returns the base icon name for the given buddy and account.
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4668
diff changeset
184 * If buddy is NULL, it will return the name to use for the account's icon
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4668
diff changeset
185 */
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4668
diff changeset
186 const char *(* list_icon)(struct gaim_account *account, struct buddy *buddy);
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4668
diff changeset
187
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4668
diff changeset
188 /**
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4668
diff changeset
189 * Fills the four char**'s with string identifiers for "emblems" that the UI will
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4668
diff changeset
190 * interpret and display as relevant
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4668
diff changeset
191 */
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4668
diff changeset
192 void (* list_emblems)(struct buddy *buddy, char **se, char **sw, char **nw, char **ne);
283fb289c510 [gaim-migrate @ 4998]
Sean Egan <seanegan@gmail.com>
parents: 4668
diff changeset
193
2501
227cc42ffa6e [gaim-migrate @ 2514]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2417
diff changeset
194 GList *(* away_states)(struct gaim_connection *gc);
4333
cc2f780c0505 [gaim-migrate @ 4597]
Mark Doliner <mark@kingant.net>
parents: 4269
diff changeset
195 GList *(* actions)(struct gaim_connection *gc);
3572
bdd0bebd2d04 [gaim-migrate @ 3670]
Sean Egan <seanegan@gmail.com>
parents: 3466
diff changeset
196 /* user_opts is a GList* of g_malloc'd struct proto_user_opts */
bdd0bebd2d04 [gaim-migrate @ 3670]
Sean Egan <seanegan@gmail.com>
parents: 3466
diff changeset
197 GList *user_opts;
2170
c24595d3c364 [gaim-migrate @ 2180]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2167
diff changeset
198 GList *(* buddy_menu)(struct gaim_connection *, char *);
3313
b0d5ce77f7dd [gaim-migrate @ 3331]
Jim Seymour <jseymour>
parents: 3136
diff changeset
199 GList *(* edit_buddy_menu)(struct gaim_connection *, char *);
2205
cff4fbe01c7b [gaim-migrate @ 2215]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2191
diff changeset
200 GList *(* chat_info)(struct gaim_connection *);
1333
b332d8f46b84 [gaim-migrate @ 1343]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1318
diff changeset
201
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
202 /* All the server-related functions */
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
203
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
204 /*
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
205 * A lot of these (like get_dir) are protocol-dependent and should
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
206 * be removed. ones like set_dir (which is also protocol-dependent)
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
207 * can stay though because there's a dialog (i.e. the prpl says you
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
208 * can set your dir info, the ui shows a dialog and needs to call
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
209 * set_dir in order to set it)
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
210 */
4491
3196d9044a45 [gaim-migrate @ 4766]
Nathan Walp <nwalp@pidgin.im>
parents: 4349
diff changeset
211 void (* login) (struct gaim_account *);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
212 void (* close) (struct gaim_connection *);
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
213 int (* send_im) (struct gaim_connection *, char *who, char *message,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
214 int len, int away);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
215 void (* set_info) (struct gaim_connection *, char *info);
3001
87fff45fa36b [gaim-migrate @ 3014]
Sean Egan <seanegan@gmail.com>
parents: 2993
diff changeset
216 int (* send_typing) (struct gaim_connection *, char *name, int typing);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
217 void (* get_info) (struct gaim_connection *, char *who);
1401
bf041349b11e [gaim-migrate @ 1411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1370
diff changeset
218 void (* set_away) (struct gaim_connection *, char *state, char *message);
2773
a0fd8f91e294 [gaim-migrate @ 2786]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2706
diff changeset
219 void (* get_away) (struct gaim_connection *, char *who);
3466
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
220 void (* set_dir) (struct gaim_connection *, const char *first,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
221 const char *middle,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
222 const char *last,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
223 const char *maiden,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
224 const char *city,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
225 const char *state,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
226 const char *country,
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
227 int web);
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
228 void (* get_dir) (struct gaim_connection *, char *who);
3466
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
229 void (* dir_search) (struct gaim_connection *, const char *first,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
230 const char *middle,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
231 const char *last,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
232 const char *maiden,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
233 const char *city,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
234 const char *state,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
235 const char *country,
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
236 const char *email);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
237 void (* set_idle) (struct gaim_connection *, int idletime);
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
238 void (* change_passwd) (struct gaim_connection *, const char *old,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
239 const char *new);
3466
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 3348
diff changeset
240 void (* add_buddy) (struct gaim_connection *, const char *name);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
241 void (* add_buddies) (struct gaim_connection *, GList *buddies);
2681
37d80035e77f [gaim-migrate @ 2694]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2607
diff changeset
242 void (* remove_buddy) (struct gaim_connection *, char *name, char *group);
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
243 void (* remove_buddies) (struct gaim_connection *, GList *buddies,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
244 const char *group);
4349
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4333
diff changeset
245 void (* add_permit) (struct gaim_connection *, const char *name);
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4333
diff changeset
246 void (* add_deny) (struct gaim_connection *, const char *name);
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4333
diff changeset
247 void (* rem_permit) (struct gaim_connection *, const char *name);
0c68d402f59f [gaim-migrate @ 4614]
Nathan Walp <nwalp@pidgin.im>
parents: 4333
diff changeset
248 void (* rem_deny) (struct gaim_connection *, const char *name);
1038
daad2440a642 [gaim-migrate @ 1048]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1032
diff changeset
249 void (* set_permit_deny)(struct gaim_connection *);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
250 void (* warn) (struct gaim_connection *, char *who, int anonymous);
2205
cff4fbe01c7b [gaim-migrate @ 2215]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2191
diff changeset
251 void (* join_chat) (struct gaim_connection *, GList *data);
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
252 void (* chat_invite) (struct gaim_connection *, int id,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
253 const char *who, const char *message);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
254 void (* chat_leave) (struct gaim_connection *, int id);
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
255 void (* chat_whisper) (struct gaim_connection *, int id,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
256 char *who, char *message);
2167
edf8c5a70e5b [gaim-migrate @ 2177]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2162
diff changeset
257 int (* chat_send) (struct gaim_connection *, int id, char *message);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
258 void (* keepalive) (struct gaim_connection *);
1713
14caa7df478c [gaim-migrate @ 1723]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1626
diff changeset
259
2827
51999a36c0b1 [gaim-migrate @ 2840]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2773
diff changeset
260 /* new user registration */
4491
3196d9044a45 [gaim-migrate @ 4766]
Nathan Walp <nwalp@pidgin.im>
parents: 4349
diff changeset
261 void (* register_user) (struct gaim_account *);
2956
b68c648618a3 [gaim-migrate @ 2969]
Rob Flynn <gaim@robflynn.com>
parents: 2827
diff changeset
262
b68c648618a3 [gaim-migrate @ 2969]
Rob Flynn <gaim@robflynn.com>
parents: 2827
diff changeset
263 /* get "chat buddy" info and away message */
b68c648618a3 [gaim-migrate @ 2969]
Rob Flynn <gaim@robflynn.com>
parents: 2827
diff changeset
264 void (* get_cb_info) (struct gaim_connection *, int, char *who);
b68c648618a3 [gaim-migrate @ 2969]
Rob Flynn <gaim@robflynn.com>
parents: 2827
diff changeset
265 void (* get_cb_away) (struct gaim_connection *, int, char *who);
2827
51999a36c0b1 [gaim-migrate @ 2840]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2773
diff changeset
266
3136
1bd472b7f7a2 [gaim-migrate @ 3151]
Rob Flynn <gaim@robflynn.com>
parents: 3044
diff changeset
267 /* save/store buddy's alias on server list/roster */
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
268 void (* alias_buddy) (struct gaim_connection *, const char *who,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
269 const char *alias);
3136
1bd472b7f7a2 [gaim-migrate @ 3151]
Rob Flynn <gaim@robflynn.com>
parents: 3044
diff changeset
270
1bd472b7f7a2 [gaim-migrate @ 3151]
Rob Flynn <gaim@robflynn.com>
parents: 3044
diff changeset
271 /* change a buddy's group on a server list/roster */
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
272 void (* group_buddy) (struct gaim_connection *, const char *who,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
273 const char *old_group, const char *new_group);
3136
1bd472b7f7a2 [gaim-migrate @ 3151]
Rob Flynn <gaim@robflynn.com>
parents: 3044
diff changeset
274
3348
dd34e0b40fed [gaim-migrate @ 3367]
Jim Seymour <jseymour>
parents: 3313
diff changeset
275 /* rename a group on a server list/roster */
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
276 void (* rename_group) (struct gaim_connection *, const char *old_group,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
277 const char *new_group, GList *members);
3348
dd34e0b40fed [gaim-migrate @ 3367]
Jim Seymour <jseymour>
parents: 3313
diff changeset
278
2607
e0d4a23aac89 [gaim-migrate @ 2620]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2582
diff changeset
279 void (* buddy_free) (struct buddy *);
e0d4a23aac89 [gaim-migrate @ 2620]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2582
diff changeset
280
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
281 /* this is really bad. */
2246
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2232
diff changeset
282 void (* convo_closed) (struct gaim_connection *, char *who);
933346315b9b [gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2232
diff changeset
283
1713
14caa7df478c [gaim-migrate @ 1723]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1626
diff changeset
284 char *(* normalize)(const char *);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
285 };
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
286
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
287 /** A list of all loaded protocol plugins. */
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
288 extern GSList *protocols;
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
289
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
290 /** The number of accounts using a given protocol plugin. */
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents: 3609
diff changeset
291 extern int prpl_accounts[];
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
292
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
293 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
294 * Initializes static protocols.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
295 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
296 * This is mostly just for main.c, when it initializes the protocols.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
297 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
298 void static_proto_init();
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
299
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
300 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
301 * Loads a protocol plugin.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
302 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
303 * @param prpl The initial protocol plugin structure.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
304 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
305 * @return @c TRUE if the protocol was loaded, or @c FALSE otherwise.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
306 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
307 gboolean load_prpl(struct prpl *prpl);
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
308
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
309 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
310 * Loads a statically compiled protocol plugin.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
311 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
312 * @param pi The initialization function.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
313 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
314 void load_protocol(proto_init pi);
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
315
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
316 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
317 * Unloads a protocol plugin.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
318 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
319 * @param prpl The protocol plugin to unload.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
320 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
321 extern void unload_protocol(struct prpl *prpl);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
322
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
323 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
324 * Compares two protocol plugins, based off their protocol plugin number.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
325 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
326 * @param a The first protocol plugin.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
327 * @param b The second protocol plugin.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
328 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
329 * @return <= 1 if the first plugin's number is smaller than the second;
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
330 * 0 if the first plugin's number is equal to the second; or
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
331 * >= 1 if the first plugin's number is greater than the second.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
332 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
333 gint proto_compare(struct prpl *a, struct prpl *b);
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
334
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
335 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
336 * Finds a protocol plugin structure of the specified type.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
337 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
338 * @param type The protocol plugin type.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
339 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
340 struct prpl *find_prpl(GaimProtocol type);
981
7e231bc0018a [gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
341
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
342 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
343 * Creates a menu of all protocol plugins and their protocol-specific
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
344 * actions.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
345 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
346 * @note This should be UI-specific code, or rewritten in such a way as to
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
347 * not use any any GTK code.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
348 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
349 void do_proto_menu();
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
350
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
351 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
352 * Shows a message saying that somebody added you as a buddy, and asks
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
353 * if you would like to do the same.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
354 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
355 * @param gc The gaim connection.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
356 * @param id The ID of the user.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
357 * @param who The username.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
358 * @param alias The user's alias.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
359 * @param msg The message to go along with the request.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
360 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
361 void show_got_added(struct gaim_connection *gc, const char *id,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
362 const char *who, const char *alias, const char *msg);
2050
ddd696ccb46b [gaim-migrate @ 2060]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1920
diff changeset
363
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
364 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
365 * Closes do_ask_dialogs when the associated plugin is unloaded.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
366 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
367 * @param module The module.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
368 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
369 void do_ask_cancel_by_handle(GModule *module);
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
370
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
371 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
372 * Asks the user a question and acts on the response.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
373 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
374 * @param prim The primary question.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
375 * @param sec The secondary question.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
376 * @param data The data to be passed to a callback.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
377 * @param yestext The text for the Yes button.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
378 * @param doit The callback function to call when the Yes button is clicked.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
379 * @param notext The text for the No button.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
380 * @param dont The callback function to call when the No button is clicked.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
381 * @param handle The module handle to associate with this dialog, or @c NULL.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
382 * @param modal @c TRUE if the dialog should be modal; @c FALSE otherwise.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
383 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
384 void do_ask_dialog(const char *prim, const char *sec, void *data,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
385 char *yestext, void *doit, char *notext, void *dont,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
386 GModule *handle, gboolean modal);
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
387
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
388 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
389 * Prompts the user for data.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
390 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
391 * @param text The text to present to the user.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
392 * @param def The default data, or @c NULL.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
393 * @param data The data to be passed to the callback.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
394 * @param doit The callback function to call when the Accept button is clicked.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
395 * @param dont The callback function to call when the Cancel button is clicked.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
396 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
397 void do_prompt_dialog(const char *text, const char *sdef, void *data,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
398 void *doit, void *dont);
2582
5efa8077107f [gaim-migrate @ 2595]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2541
diff changeset
399
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
400 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
401 * Called to notify the user that the account has new mail.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
402 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
403 * If @a count is less than 0, the dialog will display the the sender
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
404 * and the subject, if available. If @a count is greater than 0, it will
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
405 * display how many messages the user has.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
406 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
407 * @param gc The gaim connection.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
408 * @param count The number of new e-mails.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
409 * @param from The sender, or @c NULL.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
410 * @param subject The subject, or @c NULL.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
411 * @param url The URL to go to to read the new mail.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
412 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
413 void connection_has_mail(struct gaim_connection *gc, int count,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
414 const char *from, const char *subject,
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
415 const char *url);
2050
ddd696ccb46b [gaim-migrate @ 2060]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1920
diff changeset
416
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
417 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
418 * Retrieves and sets the new buddy icon for a user.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
419 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
420 * @param gc The gaim connection.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
421 * @param who The user.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
422 * @param data The icon data.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
423 * @param len The length of @a data.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
424 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
425 void set_icon_data(struct gaim_connection *gc, char *who, void *data, int len);
2050
ddd696ccb46b [gaim-migrate @ 2060]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1920
diff changeset
426
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
427 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
428 * Retrieves the buddy icon data for a user.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
429 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
430 * @param gc The gaim connection.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
431 * @param who The user.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
432 * @param len The returned length of the data.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
433 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
434 * @return The buddy icon data.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
435 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
436 void *get_icon_data(struct gaim_connection *gc, char *who, int *len);
2191
657dbe515608 [gaim-migrate @ 2201]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2189
diff changeset
437
4040
89b56ab2b692 [gaim-migrate @ 4248]
Luke Schierer <lschiere@pidgin.im>
parents: 3867
diff changeset
438 /* stuff to load/unload PRPLs as necessary */
4557
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
439
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
440 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
441 * Increments the reference count on a protocol plugin.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
442 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
443 * @param prpl The protocol plugin.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
444 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
445 * @return @c TRUE if the protocol plugin is loaded, or @c FALSE otherwise.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
446 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
447 gboolean ref_protocol(struct prpl *prpl);
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
448
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
449 /**
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
450 * Decrements the reference count on a protocol plugin.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
451 *
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
452 * When the reference count hits 0, the protocol plugin is unloaded.
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
453 */
53ce3af93edb [gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents: 4514
diff changeset
454 void unref_protocol(struct prpl *prpl);
4040
89b56ab2b692 [gaim-migrate @ 4248]
Luke Schierer <lschiere@pidgin.im>
parents: 3867
diff changeset
455
2417
5473c8c5378d [gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2411
diff changeset
456 #endif /* _PRPL_H_ */