Mercurial > pidgin
annotate src/prpl.h @ 9950:ba085944efee
[gaim-migrate @ 10846]
[00:33] <marv> datallah: commit message?
[00:33] <datallah> nah..
committer: Tailor Script <tailor@pidgin.im>
| author | Tim Ringenbach <marv@pidgin.im> |
|---|---|
| date | Sat, 04 Sep 2004 05:36:32 +0000 |
| parents | ced29c7b396c |
| children | 8fdf9706c45d |
| 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 |
|
5034
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
4966
diff
changeset
|
3 * @ingroup core |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
4 * |
| 981 | 5 * gaim |
| 6 * | |
| 8046 | 7 * Gaim is the legal property of its developers, whose names are too numerous |
| 8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 * source distribution. | |
|
6451
6f16136b41e5
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
10 * |
| 981 | 11 * This program is free software; you can redistribute it and/or modify |
| 12 * it under the terms of the GNU General Public License as published by | |
| 13 * the Free Software Foundation; either version 2 of the License, or | |
| 14 * (at your option) any later version. | |
| 15 * | |
| 16 * This program is distributed in the hope that it will be useful, | |
| 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 * GNU General Public License for more details. | |
| 20 * | |
| 21 * You should have received a copy of the GNU General Public License | |
| 22 * along with this program; if not, write to the Free Software | |
| 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 */ | |
| 25 | |
|
2417
5473c8c5378d
[gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2411
diff
changeset
|
26 /* 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
|
27 * this file, they should get glib, proxy, gaim_connection, prpl, etc. */ |
| 981 | 28 |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
29 #ifndef _GAIM_PRPL_H_ |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
30 #define _GAIM_PRPL_H_ |
|
2417
5473c8c5378d
[gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2411
diff
changeset
|
31 |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
32 typedef struct _GaimPluginProtocolInfo GaimPluginProtocolInfo; |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
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 | 38 |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
39 /** Default protocol plugin description */ |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
40 #define GAIM_PRPL_DESC(x) \ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
41 "Allows gaim to use the " (x) " protocol.\n\n" \ |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
42 "Now that you have loaded this protocol, use the " \ |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
43 "Account Editor to add an account that uses this " \ |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
44 "protocol. You can access the Account Editor from " \ |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
45 "the \"Accounts\" button on the login window or " \ |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
46 "in the \"Tools\" menu in the buddy list window." |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
47 |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
48 /** Default protocol */ |
| 7956 | 49 #define GAIM_PROTO_DEFAULT "prpl-oscar" |
|
1878
75643b9f4261
[gaim-migrate @ 1888]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1815
diff
changeset
|
50 |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
51 /*@}*/ |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
52 |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
53 /** |
| 6622 | 54 * Flags applicable to outgoing/incoming IMs from prpls. |
| 55 */ | |
| 56 typedef enum | |
| 57 { | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7015
diff
changeset
|
58 GAIM_CONV_IM_AUTO_RESP = 0x0001, /**< Auto response. */ |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7015
diff
changeset
|
59 GAIM_CONV_IM_IMAGES = 0x0002 /**< Contains images. */ |
| 9584 | 60 } GaimConvImFlags; |
|
8749
d7b8eb1f0a18
[gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents:
8713
diff
changeset
|
61 |
| 9584 | 62 typedef enum |
| 63 { | |
| 64 GAIM_CONV_CHAT_WHISPER = 0x0001, /**< Whispered message.*/ | |
| 65 GAIM_CONV_CHAT_DELAYED = 0x0002 /**< Delayed message. */ | |
| 66 | |
| 67 } GaimConvChatFlags; | |
| 6622 | 68 |
| 9318 | 69 typedef enum { |
| 70 GAIM_ICON_SCALE_DISPLAY = 0x01, /**< We scale the icon when we display it */ | |
| 71 GAIM_ICON_SCALE_SEND = 0x02 /**< We scale the icon before we send it to the server */ | |
| 72 } GaimIconScaleRules; | |
| 73 | |
| 74 | |
| 9308 | 75 /** |
| 76 * A description of a Buddy Icon specification. This tells Gaim what kind of image file | |
| 77 * it should give this prpl, and what kind of image file it should expect back. | |
| 9316 | 78 * Dimensions less than 1 should be ignored and the image not scaled. |
| 9308 | 79 */ |
| 80 typedef struct { | |
| 81 char *format; /**< This is a comma-delimited list of image formats or NULL if icons are not supported. | |
| 82 * The core nor the prpl will actually check to see if the data it's given matches this, it's entirely | |
| 83 * up to the UI to do what it wants */ | |
| 9318 | 84 int min_width; /**< The minimum width of this icon */ |
| 85 int min_height; /**< The minimum height of this icon */ | |
| 86 int max_width; /**< The maximum width of this icon */ | |
| 87 int max_height; /**< The maximum height of this icon */ | |
| 88 GaimIconScaleRules scale_rules; /**< How to stretch this icon */ | |
| 9308 | 89 } GaimBuddyIconSpec; |
| 90 | |
| 91 /* This #define exists just to make it easier to fill out the buddy icon field in he prpl info struct for protocols that couldn't care less. */ | |
| 9318 | 92 #define NO_BUDDY_ICONS {NULL, 0, 0, 0, 0, 0} |
| 9308 | 93 |
| 8573 | 94 #include "blist.h" |
| 95 #include "proxy.h" | |
| 96 #include "plugin.h" | |
| 9944 | 97 #include "status.h" |
| 8573 | 98 |
| 9713 | 99 struct proto_chat_entry { |
| 100 char *label; | |
| 101 char *identifier; | |
| 102 gboolean is_int; | |
| 103 int min; | |
| 104 int max; | |
| 105 gboolean secret; | |
| 106 }; | |
| 107 | |
| 6622 | 108 /** |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
109 * Protocol options |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
110 * |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
111 * 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
|
112 */ |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
113 typedef enum |
|
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 * Use a unique name, not an alias, for chat rooms. |
|
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 * Jabber lets you choose what name you want for chat. |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
119 * 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
|
120 * it gets annoying. |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
121 */ |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
122 OPT_PROTO_UNIQUE_CHATNAME = 0x00000004, |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
123 |
|
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 * Chat rooms have topics. |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
126 * |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
127 * IRC and Jabber support this. |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
128 */ |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
129 OPT_PROTO_CHAT_TOPIC = 0x00000008, |
|
1370
776bb4c6c0b8
[gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1355
diff
changeset
|
130 |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
131 /** |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
132 * Don't require passwords for sign-in. |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
133 * |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
134 * Zephyr doesn't require passwords, so there's no need for |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
135 * a password prompt. |
|
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 OPT_PROTO_NO_PASSWORD = 0x00000010, |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
138 |
|
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 * Notify on new mail. |
|
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 * MSN and Yahoo notify you when you have new mail. |
|
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 OPT_PROTO_MAIL_CHECK = 0x00000020, |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
145 |
|
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 * Buddy icon support. |
|
6451
6f16136b41e5
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
148 * |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
149 * Oscar and Jabber have buddy icons. |
| 9308 | 150 * |
| 151 * *We'll do this a bit more sophisticated like, now. | |
| 152 * | |
| 153 * OPT_PROTO_BUDDY_ICON = 0x00000040, | |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
154 */ |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
155 |
|
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 * Images in IMs. |
|
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 * Oscar lets you send images in direct IMs. |
|
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 OPT_PROTO_IM_IMAGE = 0x00000080, |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
162 |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
163 /** |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
164 * Allow passwords to be optional. |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
165 * |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
166 * Passwords in IRC are optional, and are needed for certain |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
167 * functionality. |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
168 */ |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
169 OPT_PROTO_PASSWORD_OPTIONAL = 0x00000100, |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
170 |
| 5367 | 171 /** |
| 172 * Allows font size to be specified in sane point size | |
| 173 * | |
| 174 * Probably just Jabber and Y!M | |
| 175 */ | |
| 6063 | 176 OPT_PROTO_USE_POINTSIZE = 0x00000200 |
| 5367 | 177 |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
178 } GaimProtocolOptions; |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
179 |
| 8113 | 180 /** Some structs defined in roomlist.h */ |
| 181 struct _GaimRoomlist; | |
| 182 struct _GaimRoomlistRoom; | |
| 183 | |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
184 /** |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
185 * A protocol plugin information structure. |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
186 * |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
187 * Every protocol plugin initializes this structure. It is the gateway |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
188 * between gaim and the protocol plugin. |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
189 */ |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
190 struct _GaimPluginProtocolInfo |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
191 { |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
192 GaimProtocolOptions options; /**< Protocol options. */ |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
193 |
|
5638
0bdfa28c678e
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
194 GList *user_splits; /* A GList of GaimAccountUserSplit */ |
|
0bdfa28c678e
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
195 GList *protocol_options; /* A GList of GaimAccountOption */ |
| 9308 | 196 |
| 197 GaimBuddyIconSpec icon_spec; /* The icon spec. */ | |
| 198 | |
|
6451
6f16136b41e5
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
199 /** |
|
6f16136b41e5
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
200 * Returns the base icon name for the given buddy and account. |
| 4687 | 201 * If buddy is NULL, it will return the name to use for the account's icon |
| 202 */ | |
| 6695 | 203 const char *(*list_icon)(GaimAccount *account, GaimBuddy *buddy); |
| 4687 | 204 |
| 205 /** | |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
206 * Fills the four char**'s with string identifiers for "emblems" |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
207 * that the UI will interpret and display as relevant |
| 4687 | 208 */ |
| 6695 | 209 void (*list_emblems)(GaimBuddy *buddy, char **se, char **sw, |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
210 char **nw, char **ne); |
| 4722 | 211 |
| 212 /** | |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
213 * Gets a short string representing this buddy's status. This will |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
214 * be shown on the buddy list. |
| 4722 | 215 */ |
| 6695 | 216 char *(*status_text)(GaimBuddy *buddy); |
|
6451
6f16136b41e5
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
217 |
| 4724 | 218 /** |
| 219 * Gets a string to put in the buddy list tooltip. | |
| 220 */ | |
| 6695 | 221 char *(*tooltip_text)(GaimBuddy *buddy); |
|
6451
6f16136b41e5
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
222 |
| 9950 | 223 GList *(*status_types)(GaimAccount *account); |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
224 |
| 9030 | 225 GList *(*blist_node_menu)(GaimBlistNode *node); |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
226 GList *(*chat_info)(GaimConnection *); |
| 9754 | 227 GHashTable *(*chat_info_defaults)(GaimConnection *, const char *chat_name); |
|
1333
b332d8f46b84
[gaim-migrate @ 1343]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1318
diff
changeset
|
228 |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
229 /* All the server-related functions */ |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
230 void (*login)(GaimAccount *); |
|
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
231 void (*close)(GaimConnection *); |
|
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
232 int (*send_im)(GaimConnection *, const char *who, |
| 6982 | 233 const char *message, |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7015
diff
changeset
|
234 GaimConvImFlags flags); |
| 5954 | 235 void (*set_info)(GaimConnection *, const char *info); |
| 6059 | 236 int (*send_typing)(GaimConnection *, const char *name, int typing); |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
237 void (*get_info)(GaimConnection *, const char *who); |
| 9949 | 238 void (*set_status)(GaimAccount *account, GaimStatus *status); |
| 239 | |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
240 void (*set_idle)(GaimConnection *, int idletime); |
|
5946
209cae24a51d
[gaim-migrate @ 6387]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
241 void (*change_passwd)(GaimConnection *, const char *old_pass, |
|
209cae24a51d
[gaim-migrate @ 6387]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
242 const char *new_pass); |
| 9285 | 243 void (*add_buddy)(GaimConnection *, GaimBuddy *buddy, GaimGroup *group); |
| 244 void (*add_buddies)(GaimConnection *, GList *buddies, GList *groups); | |
| 245 void (*remove_buddy)(GaimConnection *, GaimBuddy *buddy, GaimGroup *group); | |
| 246 void (*remove_buddies)(GaimConnection *, GList *buddies, GList *groups); | |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
247 void (*add_permit)(GaimConnection *, const char *name); |
|
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
248 void (*add_deny)(GaimConnection *, const char *name); |
|
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
249 void (*rem_permit)(GaimConnection *, const char *name); |
|
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
250 void (*rem_deny)(GaimConnection *, const char *name); |
|
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
251 void (*set_permit_deny)(GaimConnection *); |
| 9753 | 252 void (*warn)(GaimConnection *, const char *who, gboolean anonymous); |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
253 void (*join_chat)(GaimConnection *, GHashTable *components); |
| 8562 | 254 void (*reject_chat)(GaimConnection *, GHashTable *components); |
| 9917 | 255 char *(*get_chat_name)(GHashTable *components); |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
256 void (*chat_invite)(GaimConnection *, int id, |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
257 const char *who, const char *message); |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
258 void (*chat_leave)(GaimConnection *, int id); |
|
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
259 void (*chat_whisper)(GaimConnection *, int id, |
| 6059 | 260 const char *who, const char *message); |
| 261 int (*chat_send)(GaimConnection *, int id, const char *message); | |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
262 void (*keepalive)(GaimConnection *); |
|
1713
14caa7df478c
[gaim-migrate @ 1723]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1626
diff
changeset
|
263 |
|
2827
51999a36c0b1
[gaim-migrate @ 2840]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2773
diff
changeset
|
264 /* new user registration */ |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
265 void (*register_user)(GaimAccount *); |
| 2956 | 266 |
| 267 /* get "chat buddy" info and away message */ | |
| 6059 | 268 void (*get_cb_info)(GaimConnection *, int, const char *who); |
| 269 void (*get_cb_away)(GaimConnection *, int, const char *who); | |
|
2827
51999a36c0b1
[gaim-migrate @ 2840]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2773
diff
changeset
|
270 |
| 3136 | 271 /* save/store buddy's alias on server list/roster */ |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
272 void (*alias_buddy)(GaimConnection *, const char *who, |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
273 const char *alias); |
| 3136 | 274 |
| 275 /* change a buddy's group on a server list/roster */ | |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
276 void (*group_buddy)(GaimConnection *, const char *who, |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
277 const char *old_group, const char *new_group); |
| 3136 | 278 |
| 3348 | 279 /* rename a group on a server list/roster */ |
| 9285 | 280 void (*rename_group)(GaimConnection *, const char *old_name, |
| 281 GaimGroup *group, GList *moved_buddies); | |
| 3348 | 282 |
| 6695 | 283 void (*buddy_free)(GaimBuddy *); |
|
2607
e0d4a23aac89
[gaim-migrate @ 2620]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2582
diff
changeset
|
284 |
| 6059 | 285 void (*convo_closed)(GaimConnection *, const char *who); |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
286 |
| 7322 | 287 const char *(*normalize)(const GaimAccount *, const char *); |
|
6451
6f16136b41e5
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
288 |
| 5842 | 289 void (*set_buddy_icon)(GaimConnection *, const char *filename); |
|
6885
66dd420d3d23
[gaim-migrate @ 7431]
Christian Hammond <chipx86@chipx86.com>
parents:
6846
diff
changeset
|
290 |
| 9285 | 291 void (*remove_group)(GaimConnection *gc, GaimGroup *group); |
| 7398 | 292 |
| 293 char *(*get_cb_real_name)(GaimConnection *gc, int id, const char *who); | |
| 7971 | 294 |
| 295 void (*set_chat_topic)(GaimConnection *gc, int id, const char *topic); | |
| 7999 | 296 |
| 297 GaimChat *(*find_blist_chat)(GaimAccount *account, const char *name); | |
| 8113 | 298 |
| 299 /* room listing prpl callbacks */ | |
| 300 struct _GaimRoomlist *(*roomlist_get_list)(GaimConnection *gc); | |
| 301 void (*roomlist_cancel)(struct _GaimRoomlist *list); | |
| 8584 | 302 void (*roomlist_expand_category)(struct _GaimRoomlist *list, struct _GaimRoomlistRoom *category); |
| 9466 | 303 |
| 304 /* file transfer callbacks */ | |
| 305 gboolean (*can_receive_file)(GaimConnection *, const char *who); | |
| 306 void (*send_file)(GaimConnection *, const char *who, const char *filename); | |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
307 }; |
|
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2232
diff
changeset
|
308 |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
309 #define GAIM_IS_PROTOCOL_PLUGIN(plugin) \ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
310 ((plugin)->info->type == GAIM_PLUGIN_PROTOCOL) |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
311 |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
312 #define GAIM_PLUGIN_PROTOCOL_INFO(plugin) \ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
313 ((GaimPluginProtocolInfo *)(plugin)->info->extra_info) |
| 981 | 314 |
|
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
315 #ifdef __cplusplus |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
316 extern "C" { |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
317 #endif |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
318 |
| 9944 | 319 /**************************************************************************/ |
| 320 /** @name Protocol Plugin API */ | |
| 321 /**************************************************************************/ | |
| 322 /*@{*/ | |
| 323 | |
| 324 /** | |
| 325 * Notifies Gaim that an account's idle state and time have changed. | |
| 326 * | |
| 327 * This is meant to be called from protocol plugins. | |
| 328 * | |
| 329 * @param account The account. | |
| 330 * @param idle The user's idle state. | |
| 331 * @param idle_time The user's idle time. | |
| 332 */ | |
| 333 void gaim_prpl_got_account_idle(GaimAccount *account, gboolean idle, | |
| 334 time_t idle_time); | |
| 335 | |
| 336 /** | |
| 337 * Notifies Gaim of an account's log-in time. | |
| 338 * | |
| 339 * This is meant to be called from protocol plugins. | |
| 340 * | |
| 341 * @param account The account the user is on. | |
| 342 * @param login_time The user's log-in time. | |
| 343 */ | |
| 344 void gaim_prpl_got_account_login_time(GaimAccount *account, const char *name, | |
| 345 time_t login_time); | |
| 346 | |
| 347 /** | |
| 348 * Notifies Gaim that an account's status has changed. | |
| 349 * | |
| 350 * This is meant to be called from protocol plugins. | |
| 351 * | |
| 352 * @param account The account the user is on. | |
| 353 * @param status_id The status ID. | |
| 354 * @param attr_id The first attribute ID, or NULL for no attribute updates. | |
| 355 * @param ... A NULL-terminated list of attribute IDs and values, | |
| 356 * beginning with the value for @a attr_id. | |
| 357 */ | |
| 358 void gaim_prpl_got_account_status(GaimAccount *account, | |
| 359 const char *status_id, const char *attr_id, | |
| 360 ...); | |
| 361 | |
| 362 /** | |
| 363 * Notifies Gaim that an account's warning level has changed. | |
| 364 * | |
| 365 * This is meant to be called from protocol plugins. | |
| 366 * | |
| 367 * @param account The account the user is on. | |
| 368 * @param username The user that warned the account. | |
| 369 * @param level The new warning level. | |
| 370 */ | |
| 371 void gaim_prpl_got_account_warning_level(GaimAccount *account, | |
| 372 const char *username, | |
| 373 unsigned int level); | |
| 374 | |
| 375 | |
| 376 /** | |
| 377 * Notifies Gaim that a user's idle state and time have changed. | |
| 378 * | |
| 379 * This is meant to be called from protocol plugins. | |
| 380 * | |
| 381 * @param account The account the user is on. | |
| 382 * @param name The screen name of the user. | |
| 383 * @param idle The user's idle state. | |
| 384 * @param idle_time The user's idle time. | |
| 385 */ | |
| 386 void gaim_prpl_got_user_idle(GaimAccount *account, const char *name, | |
| 387 gboolean idle, time_t idle_time); | |
| 388 | |
| 389 /** | |
| 390 * Notifies Gaim of a user's log-in time. | |
| 391 * | |
| 392 * This is meant to be called from protocol plugins. | |
| 393 * | |
| 394 * @param account The account the user is on. | |
| 395 * @param name The screen name of the user. | |
| 396 * @param login_time The user's log-in time. | |
| 397 */ | |
| 398 void gaim_prpl_got_user_login_time(GaimAccount *account, const char *name, | |
| 399 time_t login_time); | |
| 400 | |
| 401 /** | |
| 402 * Notifies Gaim that a user's status has changed. | |
| 403 * | |
| 404 * This is meant to be called from protocol plugins. | |
| 405 * | |
| 406 * @param account The account the user is on. | |
| 407 * @param name The screen name of the user. | |
| 408 * @param status_id The status ID. | |
| 409 * @param attr_id The first attribute ID, or NULL for no attribute updates. | |
| 410 * @param ... A NULL-terminated list of attribute IDs and values, | |
| 411 * beginning with the value for @a attr_id. | |
| 412 */ | |
| 413 void gaim_prpl_got_user_status(GaimAccount *account, const char *name, | |
| 414 const char *status_id, const char *attr_id, ...); | |
| 415 | |
| 416 /** | |
| 417 * Notifies Gaim that a user's warning level has changed. | |
| 418 * | |
| 419 * This is meant to be called from protocol plugins. | |
| 420 * | |
| 421 * @param account The account the user is on. | |
| 422 * @param name The screen name of the user. | |
| 423 * @param level The new warning level. | |
| 424 */ | |
| 425 void gaim_prpl_got_user_warning_level(GaimAccount *account, const char *name, | |
| 426 unsigned int level); | |
| 427 | |
| 428 /** | |
| 429 * Informs the server that an account's status changed. | |
| 430 * | |
| 431 * @param account The account the user is on. | |
| 432 * @param status The status that was activated, or deactivated | |
| 433 * (in the case of independent statuses). | |
| 434 */ | |
| 435 void gaim_prpl_set_account_status(GaimAccount *account, GaimStatus *status); | |
| 436 | |
| 437 /*@}*/ | |
| 438 | |
| 439 /**************************************************************************/ | |
| 440 /** @name Protocol Plugin Subsystem API */ | |
| 441 /**************************************************************************/ | |
| 442 /*@{*/ | |
| 443 | |
|
4557
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 * Finds a protocol plugin structure of the specified type. |
|
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
446 * |
| 9000 | 447 * @param id The protocol plugin; |
|
4557
53ce3af93edb
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
448 */ |
| 7956 | 449 GaimPlugin *gaim_find_prpl(const char *id); |
| 981 | 450 |
| 9944 | 451 /*@}*/ |
| 452 | |
|
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
453 #ifdef __cplusplus |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
454 } |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
455 #endif |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
456 |
|
2417
5473c8c5378d
[gaim-migrate @ 2430]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2411
diff
changeset
|
457 #endif /* _PRPL_H_ */ |
