Tue, 31 Jul 2007 03:50:41 +0000
Implemented a callback for unregistering, mirroring the registration callback. Since this is a new API, I can do it properly by passing it right in the unregister function call, instead of having a separate function for setting it.
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
1 | /** |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
2 | * @file prpl.h Protocol Plugin functions |
|
5034
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
4966
diff
changeset
|
3 | * @ingroup core |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
4 | * |
| 15884 | 5 | * purple |
| 981 | 6 | * |
| 15884 | 7 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 8 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 9 | * source distribution. | |
|
6451
2ff17ce330d8
[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
7751d1269b09
[gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2411
diff
changeset
|
26 | /* this file should be all that prpls need to include. therefore, by including |
| 15884 | 27 | * this file, they should get glib, proxy, purple_connection, prpl, etc. */ |
| 981 | 28 | |
| 15884 | 29 | #ifndef _PURPLE_PRPL_H_ |
| 30 | #define _PURPLE_PRPL_H_ | |
|
2417
7751d1269b09
[gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2411
diff
changeset
|
31 | |
| 15884 | 32 | typedef struct _PurplePluginProtocolInfo PurplePluginProtocolInfo; |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
33 | |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
34 | /**************************************************************************/ |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
35 | /** @name Basic Protocol Information */ |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
36 | /**************************************************************************/ |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
37 | |
| 9318 | 38 | typedef enum { |
| 15884 | 39 | PURPLE_ICON_SCALE_DISPLAY = 0x01, /**< We scale the icon when we display it */ |
| 40 | PURPLE_ICON_SCALE_SEND = 0x02 /**< We scale the icon before we send it to the server */ | |
| 41 | } PurpleIconScaleRules; | |
| 9318 | 42 | |
| 43 | ||
| 9308 | 44 | /** |
| 15884 | 45 | * A description of a Buddy Icon specification. This tells Purple what kind of image file |
| 9308 | 46 | * it should give this prpl, and what kind of image file it should expect back. |
| 9316 | 47 | * Dimensions less than 1 should be ignored and the image not scaled. |
| 9308 | 48 | */ |
| 15884 | 49 | typedef struct _PurpleBuddyIconSpec PurpleBuddyIconSpec; |
| 9308 | 50 | |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
51 | /** |
|
11035
c10c382f4896
[gaim-migrate @ 12922]
Gary Kramlich <grim@reaperworld.com>
parents:
10870
diff
changeset
|
52 | * This \#define exists just to make it easier to fill out the buddy icon |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
53 | * field in the prpl info struct for protocols that couldn't care less. |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
54 | */ |
|
15281
5c0b8a2f6b3e
[gaim-migrate @ 18009]
Mark Doliner <markdoliner@pidgin.im>
parents:
15205
diff
changeset
|
55 | #define NO_BUDDY_ICONS {NULL, 0, 0, 0, 0, 0, 0} |
|
5c0b8a2f6b3e
[gaim-migrate @ 18009]
Mark Doliner <markdoliner@pidgin.im>
parents:
15205
diff
changeset
|
56 | |
|
17392
e88a54874d37
Don't include unistd.h if HAVE_UNISTD_H isn't defined.
Daniel Atallah <datallah@pidgin.im>
parents:
16961
diff
changeset
|
57 | #ifdef HAVE_UNISTD_H |
|
15281
5c0b8a2f6b3e
[gaim-migrate @ 18009]
Mark Doliner <markdoliner@pidgin.im>
parents:
15205
diff
changeset
|
58 | #include <unistd.h> |
|
17392
e88a54874d37
Don't include unistd.h if HAVE_UNISTD_H isn't defined.
Daniel Atallah <datallah@pidgin.im>
parents:
16961
diff
changeset
|
59 | #endif |
| 9308 | 60 | |
| 8573 | 61 | #include "blist.h" |
|
12216
d80739091a63
[gaim-migrate @ 14518]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12143
diff
changeset
|
62 | #include "conversation.h" |
|
12143
09f216663302
[gaim-migrate @ 14444]
Evan Schoenberg <evands@pidgin.im>
parents:
12024
diff
changeset
|
63 | #include "ft.h" |
|
16538
c7e61e2917c9
Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
64 | #include "imgstore.h" |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
15185
diff
changeset
|
65 | #include "notify.h" |
| 8573 | 66 | #include "proxy.h" |
| 67 | #include "plugin.h" | |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
68 | #include "roomlist.h" |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
69 | #include "status.h" |
|
11475
1e222e6e52a0
[gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
11462
diff
changeset
|
70 | #include "whiteboard.h" |
| 8573 | 71 | |
| 15884 | 72 | struct _PurpleBuddyIconSpec { |
|
15281
5c0b8a2f6b3e
[gaim-migrate @ 18009]
Mark Doliner <markdoliner@pidgin.im>
parents:
15205
diff
changeset
|
73 | char *format; /**< This is a comma-delimited list of image formats or NULL if icons are not supported. |
|
5c0b8a2f6b3e
[gaim-migrate @ 18009]
Mark Doliner <markdoliner@pidgin.im>
parents:
15205
diff
changeset
|
74 | * Neither the core nor the prpl will actually check to see if the data it's given matches this; it's |
|
5c0b8a2f6b3e
[gaim-migrate @ 18009]
Mark Doliner <markdoliner@pidgin.im>
parents:
15205
diff
changeset
|
75 | * entirely up to the UI to do what it wants */ |
|
5c0b8a2f6b3e
[gaim-migrate @ 18009]
Mark Doliner <markdoliner@pidgin.im>
parents:
15205
diff
changeset
|
76 | int min_width; /**< The minimum width of this icon */ |
|
5c0b8a2f6b3e
[gaim-migrate @ 18009]
Mark Doliner <markdoliner@pidgin.im>
parents:
15205
diff
changeset
|
77 | int min_height; /**< The minimum height of this icon */ |
|
5c0b8a2f6b3e
[gaim-migrate @ 18009]
Mark Doliner <markdoliner@pidgin.im>
parents:
15205
diff
changeset
|
78 | int max_width; /**< The maximum width of this icon */ |
|
5c0b8a2f6b3e
[gaim-migrate @ 18009]
Mark Doliner <markdoliner@pidgin.im>
parents:
15205
diff
changeset
|
79 | int max_height; /**< The maximum height of this icon */ |
|
5c0b8a2f6b3e
[gaim-migrate @ 18009]
Mark Doliner <markdoliner@pidgin.im>
parents:
15205
diff
changeset
|
80 | size_t max_filesize; /**< The maximum number of bytes */ |
| 15884 | 81 | PurpleIconScaleRules scale_rules; /**< How to stretch this icon */ |
|
15281
5c0b8a2f6b3e
[gaim-migrate @ 18009]
Mark Doliner <markdoliner@pidgin.im>
parents:
15205
diff
changeset
|
82 | }; |
|
5c0b8a2f6b3e
[gaim-migrate @ 18009]
Mark Doliner <markdoliner@pidgin.im>
parents:
15205
diff
changeset
|
83 | |
|
9713
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
84 | struct proto_chat_entry { |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12970
diff
changeset
|
85 | const char *label; |
|
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12970
diff
changeset
|
86 | const char *identifier; |
|
10475
1b7fe16233f3
[gaim-migrate @ 11762]
Richard Laager <rlaager@pidgin.im>
parents:
10447
diff
changeset
|
87 | gboolean required; |
|
9713
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
88 | gboolean is_int; |
|
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
89 | int min; |
|
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
90 | int max; |
|
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
91 | gboolean secret; |
|
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
92 | }; |
|
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
93 | |
|
6622
277eb0b14653
[gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents:
6451
diff
changeset
|
94 | /** |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
95 | * Protocol options |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
96 | * |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
97 | * These should all be stuff that some plugins can do and others can't. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
98 | */ |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
99 | typedef enum |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
100 | { |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
101 | /** |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
102 | * Use a unique name, not an alias, for chat rooms. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
103 | * |
|
16961
b6955f946f8f
s/Jabber/XMPP in user-visible places.
Richard Laager <rlaager@pidgin.im>
parents:
16799
diff
changeset
|
104 | * XMPP lets you choose what name you want for chat. |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
105 | * So it shouldn't be pulling the alias for when you're in chat; |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
106 | * it gets annoying. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
107 | */ |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
108 | OPT_PROTO_UNIQUE_CHATNAME = 0x00000004, |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
109 | |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
110 | /** |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
111 | * Chat rooms have topics. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
112 | * |
|
16961
b6955f946f8f
s/Jabber/XMPP in user-visible places.
Richard Laager <rlaager@pidgin.im>
parents:
16799
diff
changeset
|
113 | * IRC and XMPP support this. |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
114 | */ |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
115 | OPT_PROTO_CHAT_TOPIC = 0x00000008, |
|
1370
de786e8d0146
[gaim-migrate @ 1380]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1355
diff
changeset
|
116 | |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
117 | /** |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
118 | * Don't require passwords for sign-in. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
119 | * |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
120 | * Zephyr doesn't require passwords, so there's no |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
121 | * need for a password prompt. |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
122 | */ |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
123 | OPT_PROTO_NO_PASSWORD = 0x00000010, |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
124 | |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
125 | /** |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
126 | * Notify on new mail. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
127 | * |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
128 | * MSN and Yahoo notify you when you have new mail. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
129 | */ |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
130 | OPT_PROTO_MAIL_CHECK = 0x00000020, |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
131 | |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
132 | /** |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
133 | * Images in IMs. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
134 | * |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
135 | * Oscar lets you send images in direct IMs. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
136 | */ |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
137 | OPT_PROTO_IM_IMAGE = 0x00000040, |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
138 | |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
139 | /** |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
140 | * Allow passwords to be optional. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
141 | * |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
142 | * Passwords in IRC are optional, and are needed for certain |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
143 | * functionality. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
144 | */ |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
145 | OPT_PROTO_PASSWORD_OPTIONAL = 0x00000080, |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
146 | |
| 5367 | 147 | /** |
| 148 | * Allows font size to be specified in sane point size | |
| 149 | * | |
|
16961
b6955f946f8f
s/Jabber/XMPP in user-visible places.
Richard Laager <rlaager@pidgin.im>
parents:
16799
diff
changeset
|
150 | * Probably just XMPP and Y!M |
| 5367 | 151 | */ |
| 11358 | 152 | OPT_PROTO_USE_POINTSIZE = 0x00000100, |
| 153 | ||
| 154 | /** | |
| 155 | * Set the Register button active when screenname is not given. | |
| 156 | * | |
| 157 | * Gadu-Gadu doesn't need a screenname to register new account. | |
| 158 | */ | |
| 159 | OPT_PROTO_REGISTER_NOSCREENNAME = 0x00000200, | |
| 5367 | 160 | |
|
18092
1a2362194473
Mostly taken from the patch on ticket #410, don't send unknown slash
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
17392
diff
changeset
|
161 | /** |
|
1a2362194473
Mostly taken from the patch on ticket #410, don't send unknown slash
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
17392
diff
changeset
|
162 | * Indicates that slash commands are native to this protocol. |
|
1a2362194473
Mostly taken from the patch on ticket #410, don't send unknown slash
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
17392
diff
changeset
|
163 | * Used as a hint that unknown commands should not be sent as messages. |
|
1a2362194473
Mostly taken from the patch on ticket #410, don't send unknown slash
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
17392
diff
changeset
|
164 | */ |
|
1a2362194473
Mostly taken from the patch on ticket #410, don't send unknown slash
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
17392
diff
changeset
|
165 | OPT_PROTO_SLASH_COMMANDS_NATIVE = 0x00000400, |
|
1a2362194473
Mostly taken from the patch on ticket #410, don't send unknown slash
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
17392
diff
changeset
|
166 | |
| 15884 | 167 | } PurpleProtocolOptions; |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
168 | |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
169 | /** |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
170 | * A protocol plugin information structure. |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
171 | * |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
172 | * Every protocol plugin initializes this structure. It is the gateway |
| 15884 | 173 | * between purple and the protocol plugin. Many of this callbacks can be |
|
10162
432a7a659518
[gaim-migrate @ 11248]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
10160
diff
changeset
|
174 | * NULL. If a callback must be implemented, it has a comment indicating so. |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
175 | */ |
| 15884 | 176 | struct _PurplePluginProtocolInfo |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
177 | { |
| 15884 | 178 | PurpleProtocolOptions options; /**< Protocol options. */ |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
179 | |
| 15884 | 180 | GList *user_splits; /* A GList of PurpleAccountUserSplit */ |
| 181 | GList *protocol_options; /* A GList of PurpleAccountOption */ | |
|
10160
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
182 | |
| 15884 | 183 | PurpleBuddyIconSpec icon_spec; /* The icon spec. */ |
|
10160
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
184 | |
|
6451
2ff17ce330d8
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
185 | /** |
|
2ff17ce330d8
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
186 | * Returns the base icon name for the given buddy and account. |
|
16320
eec8b2bed22e
Document prpl_info->list_icon(NULL, NULL), and add my name to COPYRIGHT.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
15884
diff
changeset
|
187 | * If buddy is NULL and the account is non-NULL, it will return the |
|
eec8b2bed22e
Document prpl_info->list_icon(NULL, NULL), and add my name to COPYRIGHT.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
15884
diff
changeset
|
188 | * name to use for the account's icon. If both are NULL, it will |
|
eec8b2bed22e
Document prpl_info->list_icon(NULL, NULL), and add my name to COPYRIGHT.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
15884
diff
changeset
|
189 | * return the name to use for the protocol's icon. |
|
eec8b2bed22e
Document prpl_info->list_icon(NULL, NULL), and add my name to COPYRIGHT.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
15884
diff
changeset
|
190 | * |
|
eec8b2bed22e
Document prpl_info->list_icon(NULL, NULL), and add my name to COPYRIGHT.
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
15884
diff
changeset
|
191 | * This must be implemented. |
| 4687 | 192 | */ |
| 15884 | 193 | const char *(*list_icon)(PurpleAccount *account, PurpleBuddy *buddy); |
| 4687 | 194 | |
| 195 | /** | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
196 | * Fills the four char**'s with string identifiers for "emblems" |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
197 | * that the UI will interpret and display as relevant |
| 4687 | 198 | */ |
| 15884 | 199 | const char *(*list_emblem)(PurpleBuddy *buddy); |
| 4722 | 200 | |
| 201 | /** | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
202 | * Gets a short string representing this buddy's status. This will |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
203 | * be shown on the buddy list. |
| 4722 | 204 | */ |
| 15884 | 205 | char *(*status_text)(PurpleBuddy *buddy); |
|
6451
2ff17ce330d8
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
206 | |
| 4724 | 207 | /** |
|
12970
c2f3b4dcf711
[gaim-migrate @ 15323]
Richard Laager <rlaager@pidgin.im>
parents:
12943
diff
changeset
|
208 | * Allows the prpl to add text to a buddy's tooltip. |
| 4724 | 209 | */ |
| 15884 | 210 | void (*tooltip_text)(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gboolean full); |
|
6451
2ff17ce330d8
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
211 | |
|
10200
33c21db946e7
[gaim-migrate @ 11317]
Mark Doliner <markdoliner@pidgin.im>
parents:
10162
diff
changeset
|
212 | /** |
|
33c21db946e7
[gaim-migrate @ 11317]
Mark Doliner <markdoliner@pidgin.im>
parents:
10162
diff
changeset
|
213 | * This must be implemented, and must add at least the offline |
|
33c21db946e7
[gaim-migrate @ 11317]
Mark Doliner <markdoliner@pidgin.im>
parents:
10162
diff
changeset
|
214 | * and online states. |
|
33c21db946e7
[gaim-migrate @ 11317]
Mark Doliner <markdoliner@pidgin.im>
parents:
10162
diff
changeset
|
215 | */ |
| 15884 | 216 | GList *(*status_types)(PurpleAccount *account); |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
217 | |
| 15884 | 218 | GList *(*blist_node_menu)(PurpleBlistNode *node); |
| 219 | GList *(*chat_info)(PurpleConnection *); | |
| 220 | GHashTable *(*chat_info_defaults)(PurpleConnection *, const char *chat_name); | |
|
1333
bbd54f86976f
[gaim-migrate @ 1343]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1318
diff
changeset
|
221 | |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
222 | /* All the server-related functions */ |
|
10160
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
223 | |
|
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
224 | /** This must be implemented. */ |
| 15884 | 225 | void (*login)(PurpleAccount *); |
|
10160
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
226 | |
|
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
227 | /** This must be implemented. */ |
| 15884 | 228 | void (*close)(PurpleConnection *); |
|
11693
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
229 | |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
230 | /** |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
231 | * This PRPL function should return a positive value on success. |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
232 | * If the message is too big to be sent, return -E2BIG. If |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
233 | * the account is not connected, return -ENOTCONN. If the |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
234 | * PRPL is unable to send the message for another reason, return |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
235 | * some other negative value. You can use one of the valid |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
236 | * errno values, or just big something. If the message should |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
237 | * not be echoed to the conversation window, return 0. |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
238 | */ |
| 15884 | 239 | int (*send_im)(PurpleConnection *, const char *who, |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6885
diff
changeset
|
240 | const char *message, |
| 15884 | 241 | PurpleMessageFlags flags); |
|
11693
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
242 | |
| 15884 | 243 | void (*set_info)(PurpleConnection *, const char *info); |
| 244 | unsigned int (*send_typing)(PurpleConnection *, const char *name, PurpleTypingState state); | |
| 245 | void (*get_info)(PurpleConnection *, const char *who); | |
| 246 | void (*set_status)(PurpleAccount *account, PurpleStatus *status); | |
|
9949
377cd65fab3d
[gaim-migrate @ 10845]
Daniel Atallah <datallah@pidgin.im>
parents:
9944
diff
changeset
|
247 | |
| 15884 | 248 | void (*set_idle)(PurpleConnection *, int idletime); |
| 249 | void (*change_passwd)(PurpleConnection *, const char *old_pass, | |
|
5946
ebabcd2b4637
[gaim-migrate @ 6387]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
250 | const char *new_pass); |
| 15884 | 251 | void (*add_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group); |
| 252 | void (*add_buddies)(PurpleConnection *, GList *buddies, GList *groups); | |
| 253 | void (*remove_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group); | |
| 254 | void (*remove_buddies)(PurpleConnection *, GList *buddies, GList *groups); | |
| 255 | void (*add_permit)(PurpleConnection *, const char *name); | |
| 256 | void (*add_deny)(PurpleConnection *, const char *name); | |
| 257 | void (*rem_permit)(PurpleConnection *, const char *name); | |
| 258 | void (*rem_deny)(PurpleConnection *, const char *name); | |
| 259 | void (*set_permit_deny)(PurpleConnection *); | |
| 260 | void (*join_chat)(PurpleConnection *, GHashTable *components); | |
| 261 | void (*reject_chat)(PurpleConnection *, GHashTable *components); | |
|
9917
2fbb3c9fab2b
[gaim-migrate @ 10809]
Daniel Atallah <datallah@pidgin.im>
parents:
9770
diff
changeset
|
262 | char *(*get_chat_name)(GHashTable *components); |
| 15884 | 263 | void (*chat_invite)(PurpleConnection *, int id, |
|
15036
2580e926104d
[gaim-migrate @ 17753]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15002
diff
changeset
|
264 | const char *message, const char *who); |
| 15884 | 265 | void (*chat_leave)(PurpleConnection *, int id); |
| 266 | void (*chat_whisper)(PurpleConnection *, int id, | |
|
6059
9934c862ca14
[gaim-migrate @ 6509]
John Silvestri <john.silvestri@gmail.com>
parents:
5954
diff
changeset
|
267 | const char *who, const char *message); |
| 15884 | 268 | int (*chat_send)(PurpleConnection *, int id, const char *message, PurpleMessageFlags flags); |
| 269 | void (*keepalive)(PurpleConnection *); | |
|
1713
3e0138242a5b
[gaim-migrate @ 1723]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1626
diff
changeset
|
270 | |
|
2827
e3d10df95e74
[gaim-migrate @ 2840]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2773
diff
changeset
|
271 | /* new user registration */ |
| 15884 | 272 | void (*register_user)(PurpleAccount *); |
| 2956 | 273 | |
| 274 | /* get "chat buddy" info and away message */ | |
| 15884 | 275 | void (*get_cb_info)(PurpleConnection *, int, const char *who); |
| 276 | void (*get_cb_away)(PurpleConnection *, int, const char *who); | |
|
2827
e3d10df95e74
[gaim-migrate @ 2840]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2773
diff
changeset
|
277 | |
| 3136 | 278 | /* save/store buddy's alias on server list/roster */ |
| 15884 | 279 | void (*alias_buddy)(PurpleConnection *, const char *who, |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
280 | const char *alias); |
| 3136 | 281 | |
| 282 | /* change a buddy's group on a server list/roster */ | |
| 15884 | 283 | void (*group_buddy)(PurpleConnection *, const char *who, |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
284 | const char *old_group, const char *new_group); |
| 3136 | 285 | |
|
3348
57ed471963ba
[gaim-migrate @ 3367]
Mark Doliner <markdoliner@pidgin.im>
parents:
3313
diff
changeset
|
286 | /* rename a group on a server list/roster */ |
| 15884 | 287 | void (*rename_group)(PurpleConnection *, const char *old_name, |
| 288 | PurpleGroup *group, GList *moved_buddies); | |
|
3348
57ed471963ba
[gaim-migrate @ 3367]
Mark Doliner <markdoliner@pidgin.im>
parents:
3313
diff
changeset
|
289 | |
| 15884 | 290 | void (*buddy_free)(PurpleBuddy *); |
|
2607
7bcd3ea48df3
[gaim-migrate @ 2620]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2582
diff
changeset
|
291 | |
| 15884 | 292 | void (*convo_closed)(PurpleConnection *, const char *who); |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
293 | |
| 15884 | 294 | const char *(*normalize)(const PurpleAccount *, const char *); |
|
6451
2ff17ce330d8
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
295 | |
|
16538
c7e61e2917c9
Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
296 | /* The prpl does NOT own a reference to img. If it needs one, it |
|
c7e61e2917c9
Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
297 | * must purple_imgstore_ref(img) itself. */ |
|
c7e61e2917c9
Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
298 | void (*set_buddy_icon)(PurpleConnection *, PurpleStoredImage *img); |
|
6885
65132ebfc662
[gaim-migrate @ 7431]
Christian Hammond <chipx86@chipx86.com>
parents:
6846
diff
changeset
|
299 | |
| 15884 | 300 | void (*remove_group)(PurpleConnection *gc, PurpleGroup *group); |
| 7398 | 301 | |
| 15884 | 302 | char *(*get_cb_real_name)(PurpleConnection *gc, int id, const char *who); |
| 7971 | 303 | |
| 15884 | 304 | void (*set_chat_topic)(PurpleConnection *gc, int id, const char *topic); |
| 7999 | 305 | |
| 15884 | 306 | PurpleChat *(*find_blist_chat)(PurpleAccount *account, const char *name); |
| 8113 | 307 | |
| 308 | /* room listing prpl callbacks */ | |
| 15884 | 309 | PurpleRoomlist *(*roomlist_get_list)(PurpleConnection *gc); |
| 310 | void (*roomlist_cancel)(PurpleRoomlist *list); | |
| 311 | void (*roomlist_expand_category)(PurpleRoomlist *list, PurpleRoomlistRoom *category); | |
|
9466
b6425eab60ca
[gaim-migrate @ 10291]
Daniel Atallah <datallah@pidgin.im>
parents:
9460
diff
changeset
|
312 | |
|
b6425eab60ca
[gaim-migrate @ 10291]
Daniel Atallah <datallah@pidgin.im>
parents:
9460
diff
changeset
|
313 | /* file transfer callbacks */ |
| 15884 | 314 | gboolean (*can_receive_file)(PurpleConnection *, const char *who); |
| 315 | void (*send_file)(PurpleConnection *, const char *who, const char *filename); | |
| 316 | PurpleXfer *(*new_xfer)(PurpleConnection *, const char *who); | |
| 317 | gboolean (*offline_message)(const PurpleBuddy *buddy); | |
|
12143
09f216663302
[gaim-migrate @ 14444]
Evan Schoenberg <evands@pidgin.im>
parents:
12024
diff
changeset
|
318 | |
| 15884 | 319 | PurpleWhiteboardPrplOps *whiteboard_prpl_ops; |
| 14604 | 320 | |
| 321 | /* For use in plugins that may understand the underlying protocol */ | |
| 15884 | 322 | int (*send_raw)(PurpleConnection *gc, const char *buf, int len); |
| 15185 | 323 | |
| 324 | /* room list serialize */ | |
| 15884 | 325 | char *(*roomlist_room_serialize)(PurpleRoomlistRoom *room); |
|
18912
606597744812
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents:
18718
diff
changeset
|
326 | |
|
606597744812
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents:
18718
diff
changeset
|
327 | /* Remove the user from the server. (This is only at the bottom to keep binary compatibility.) |
|
606597744812
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents:
18718
diff
changeset
|
328 | * The account can either be connected or disconnected. After the removal is finished, |
|
606597744812
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents:
18718
diff
changeset
|
329 | * the connection will stay open and has to be closed! |
|
606597744812
Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents:
18718
diff
changeset
|
330 | */ |
|
18994
310e9d853e2b
Implemented a callback for unregistering, mirroring the registration callback. Since this is a new API, I can do it properly by passing it right in the unregister function call, instead of having a separate function for setting it.
Andreas Monitzer <am@adiumx.com>
parents:
18912
diff
changeset
|
331 | void (*unregister_user)(PurpleAccount *, PurpleAccountUnregistrationCb cb, void *user_data); |
|
17791
b947d72db9db
Implemented user tune, currently untested.
Andreas Monitzer <am@adiumx.com>
parents:
17392
diff
changeset
|
332 | |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16541
diff
changeset
|
333 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16541
diff
changeset
|
334 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16541
diff
changeset
|
335 | void (*_purple_reserved3)(void); |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
336 | }; |
|
2246
8ade8b7421af
[gaim-migrate @ 2256]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2232
diff
changeset
|
337 | |
| 15884 | 338 | #define PURPLE_IS_PROTOCOL_PLUGIN(plugin) \ |
| 339 | ((plugin)->info->type == PURPLE_PLUGIN_PROTOCOL) | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
340 | |
| 15884 | 341 | #define PURPLE_PLUGIN_PROTOCOL_INFO(plugin) \ |
| 342 | ((PurplePluginProtocolInfo *)(plugin)->info->extra_info) | |
| 981 | 343 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
344 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
345 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
346 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
347 | |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
348 | /**************************************************************************/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
349 | /** @name Protocol Plugin API */ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
350 | /**************************************************************************/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
351 | /*@{*/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
352 | |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
353 | /** |
| 15884 | 354 | * Notifies Purple that an account's idle state and time have changed. |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
355 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
356 | * This is meant to be called from protocol plugins. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
357 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
358 | * @param account The account. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
359 | * @param idle The user's idle state. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
360 | * @param idle_time The user's idle time. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
361 | */ |
| 15884 | 362 | void purple_prpl_got_account_idle(PurpleAccount *account, gboolean idle, |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
363 | time_t idle_time); |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
364 | |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
365 | /** |
| 15884 | 366 | * Notifies Purple of an account's log-in time. |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
367 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
368 | * This is meant to be called from protocol plugins. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
369 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
370 | * @param account The account the user is on. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
371 | * @param login_time The user's log-in time. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
372 | */ |
| 15884 | 373 | void purple_prpl_got_account_login_time(PurpleAccount *account, time_t login_time); |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
374 | |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
375 | /** |
| 15884 | 376 | * Notifies Purple that an account's status has changed. |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
377 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
378 | * This is meant to be called from protocol plugins. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
379 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
380 | * @param account The account the user is on. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
381 | * @param status_id The status ID. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
382 | * @param ... A NULL-terminated list of attribute IDs and values, |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
383 | * beginning with the value for @a attr_id. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
384 | */ |
| 15884 | 385 | void purple_prpl_got_account_status(PurpleAccount *account, |
|
18243
c68ce32c3449
Add G_GNUC_NULL_TERMINATED to a few functions that expect a NULL terminated
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18092
diff
changeset
|
386 | const char *status_id, ...) G_GNUC_NULL_TERMINATED; |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
387 | /** |
| 15884 | 388 | * Notifies Purple that a user's idle state and time have changed. |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
389 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
390 | * This is meant to be called from protocol plugins. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
391 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
392 | * @param account The account the user is on. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
393 | * @param name The screen name of the user. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
394 | * @param idle The user's idle state. |
|
10860
8f600347b9e4
[gaim-migrate @ 12543]
Palmer Cox <enix@users.sourceforge.net>
parents:
10475
diff
changeset
|
395 | * @param idle_time The user's idle time. This is the time at |
|
8f600347b9e4
[gaim-migrate @ 12543]
Palmer Cox <enix@users.sourceforge.net>
parents:
10475
diff
changeset
|
396 | * which the user became idle, in seconds since |
|
8f600347b9e4
[gaim-migrate @ 12543]
Palmer Cox <enix@users.sourceforge.net>
parents:
10475
diff
changeset
|
397 | * the epoch. |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
398 | */ |
| 15884 | 399 | void purple_prpl_got_user_idle(PurpleAccount *account, const char *name, |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
400 | gboolean idle, time_t idle_time); |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
401 | |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
402 | /** |
| 15884 | 403 | * Notifies Purple of a user's log-in time. |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
404 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
405 | * This is meant to be called from protocol plugins. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
406 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
407 | * @param account The account the user is on. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
408 | * @param name The screen name of the user. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
409 | * @param login_time The user's log-in time. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
410 | */ |
| 15884 | 411 | void purple_prpl_got_user_login_time(PurpleAccount *account, const char *name, |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
412 | time_t login_time); |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
413 | |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
414 | /** |
| 15884 | 415 | * Notifies Purple that a user's status has been activated. |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
416 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
417 | * This is meant to be called from protocol plugins. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
418 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
419 | * @param account The account the user is on. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
420 | * @param name The screen name of the user. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
421 | * @param status_id The status ID. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
422 | * @param ... A NULL-terminated list of attribute IDs and values, |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
423 | * beginning with the value for @a attr_id. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
424 | */ |
| 15884 | 425 | void purple_prpl_got_user_status(PurpleAccount *account, const char *name, |
|
18243
c68ce32c3449
Add G_GNUC_NULL_TERMINATED to a few functions that expect a NULL terminated
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18092
diff
changeset
|
426 | const char *status_id, ...) G_GNUC_NULL_TERMINATED; |
|
15588
e6e89a427ed5
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
427 | |
|
e6e89a427ed5
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
428 | /** |
|
e6e89a427ed5
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
429 | * Notifies libpurple that a user's status has been deactivated |
|
e6e89a427ed5
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
430 | * |
|
e6e89a427ed5
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
431 | * This is meant to be called from protocol plugins. |
|
e6e89a427ed5
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
432 | * |
|
e6e89a427ed5
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
433 | * @param account The account the user is on. |
|
e6e89a427ed5
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
434 | * @param name The screen name of the user. |
|
e6e89a427ed5
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
435 | * @param status_id The status ID. |
|
e6e89a427ed5
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
436 | */ |
| 15884 | 437 | void purple_prpl_got_user_status_deactive(PurpleAccount *account, const char *name, |
|
15588
e6e89a427ed5
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
438 | const char *status_id); |
|
e6e89a427ed5
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
439 | |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
440 | /** |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
441 | * Informs the server that an account's status changed. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
442 | * |
|
10447
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
443 | * @param account The account the user is on. |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
444 | * @param old_status The previous status. |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
445 | * @param new_status The status that was activated, or deactivated |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
446 | * (in the case of independent statuses). |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
447 | */ |
| 15884 | 448 | void purple_prpl_change_account_status(PurpleAccount *account, |
| 449 | PurpleStatus *old_status, | |
| 450 | PurpleStatus *new_status); | |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
451 | |
|
10006
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
452 | /** |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
453 | * Retrieves the list of stock status types from a prpl. |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
454 | * |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
455 | * @param account The account the user is on. |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
456 | * @param presence The presence for which we're going to get statuses |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
457 | * |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
458 | * @return List of statuses |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
459 | */ |
| 15884 | 460 | GList *purple_prpl_get_statuses(PurpleAccount *account, PurplePresence *presence); |
|
10006
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
461 | |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
462 | /*@}*/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
463 | |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
464 | /**************************************************************************/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
465 | /** @name Protocol Plugin Subsystem API */ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
466 | /**************************************************************************/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
467 | /*@{*/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
468 | |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
469 | /** |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
470 | * Finds a protocol plugin structure of the specified type. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
471 | * |
| 9000 | 472 | * @param id The protocol plugin; |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
473 | */ |
| 15884 | 474 | PurplePlugin *purple_find_prpl(const char *id); |
| 981 | 475 | |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
476 | /*@}*/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
477 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
478 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
479 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
480 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
481 | |
|
2417
7751d1269b09
[gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2411
diff
changeset
|
482 | #endif /* _PRPL_H_ */ |