Sun, 10 Dec 2006 02:53:09 +0000
[gaim-migrate @ 17929]
User Info and Tooltips now use the GaimNotifyUserInfo object and methods defined in notify.h. GaimNotifyUserInfo objects encapsulate a list of GaimNotifyUserInfoEntry objects, each of which may have a label, a value, and be specified to be a section header.
This moves the burden of UI generation of user information from the various prpls to the UI. The UI can choose how to display the information rather than being fenced into a particular HTML formatting. Consistency across the prpls' information presentation is now enforced, as well. gaim_notify_user_info_get_text_with_newline() generates text in the:
<b>label</b>: value
<b>label</b>: value
format as was passed by convention from prpls in the past.
|
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 | * |
| 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
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 |
|
7751d1269b09
[gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2411
diff
changeset
|
27 | * this file, they should get glib, proxy, gaim_connection, prpl, etc. */ |
| 981 | 28 | |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
29 | #ifndef _GAIM_PRPL_H_ |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
30 | #define _GAIM_PRPL_H_ |
|
2417
7751d1269b09
[gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2411
diff
changeset
|
31 | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
32 | typedef struct _GaimPluginProtocolInfo GaimPluginProtocolInfo; |
|
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 { |
| 39 | GAIM_ICON_SCALE_DISPLAY = 0x01, /**< We scale the icon when we display it */ | |
| 40 | GAIM_ICON_SCALE_SEND = 0x02 /**< We scale the icon before we send it to the server */ | |
| 41 | } GaimIconScaleRules; | |
| 42 | ||
| 43 | ||
| 9308 | 44 | /** |
| 45 | * A description of a Buddy Icon specification. This tells Gaim what kind of image file | |
| 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 | */ |
| 49 | typedef struct { | |
|
13328
65543dcbaa89
[gaim-migrate @ 15697]
Mark Doliner <markdoliner@pidgin.im>
parents:
13294
diff
changeset
|
50 | char *format; /**< This is a comma-delimited list of image formats or NULL if icons are not supported. |
| 15002 | 51 | * Neither the core nor the prpl will actually check to see if the data it's given matches this; it's |
| 52 | * entirely up to the UI to do what it wants */ | |
| 9318 | 53 | int min_width; /**< The minimum width of this icon */ |
| 54 | int min_height; /**< The minimum height of this icon */ | |
| 55 | int max_width; /**< The maximum width of this icon */ | |
| 56 | int max_height; /**< The maximum height of this icon */ | |
| 57 | GaimIconScaleRules scale_rules; /**< How to stretch this icon */ | |
| 9308 | 58 | } GaimBuddyIconSpec; |
| 59 | ||
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
60 | /** |
|
11035
c10c382f4896
[gaim-migrate @ 12922]
Gary Kramlich <grim@reaperworld.com>
parents:
10870
diff
changeset
|
61 | * 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
|
62 | * 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
|
63 | */ |
| 9318 | 64 | #define NO_BUDDY_ICONS {NULL, 0, 0, 0, 0, 0} |
| 9308 | 65 | |
| 8573 | 66 | #include "blist.h" |
|
12216
d80739091a63
[gaim-migrate @ 14518]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12143
diff
changeset
|
67 | #include "conversation.h" |
|
12143
09f216663302
[gaim-migrate @ 14444]
Evan Schoenberg <evands@pidgin.im>
parents:
12024
diff
changeset
|
68 | #include "ft.h" |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
15185
diff
changeset
|
69 | #include "notify.h" |
| 8573 | 70 | #include "proxy.h" |
| 71 | #include "plugin.h" | |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
72 | #include "roomlist.h" |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
73 | #include "status.h" |
|
11475
1e222e6e52a0
[gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
11462
diff
changeset
|
74 | #include "whiteboard.h" |
| 8573 | 75 | |
|
9713
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
76 | struct proto_chat_entry { |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12970
diff
changeset
|
77 | const char *label; |
|
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12970
diff
changeset
|
78 | const char *identifier; |
|
10475
1b7fe16233f3
[gaim-migrate @ 11762]
Richard Laager <rlaager@pidgin.im>
parents:
10447
diff
changeset
|
79 | gboolean required; |
|
9713
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
80 | gboolean is_int; |
|
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
81 | int min; |
|
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
82 | int max; |
|
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
83 | gboolean secret; |
|
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
84 | }; |
|
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9584
diff
changeset
|
85 | |
|
6622
277eb0b14653
[gaim-migrate @ 7146]
Robert McQueen <robot101@debian.org>
parents:
6451
diff
changeset
|
86 | /** |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
87 | * Protocol options |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
88 | * |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
89 | * 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
|
90 | */ |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
91 | typedef enum |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
92 | { |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
93 | /** |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
94 | * Use a unique name, not an alias, for chat rooms. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
95 | * |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
96 | * Jabber lets you choose what name you want for chat. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
97 | * 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
|
98 | * it gets annoying. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
99 | */ |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
100 | OPT_PROTO_UNIQUE_CHATNAME = 0x00000004, |
|
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 | /** |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
103 | * Chat rooms have topics. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
104 | * |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
105 | * IRC and Jabber support this. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
106 | */ |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
107 | OPT_PROTO_CHAT_TOPIC = 0x00000008, |
|
1370
de786e8d0146
[gaim-migrate @ 1380]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1355
diff
changeset
|
108 | |
|
4557
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 | * Don't require passwords for sign-in. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
111 | * |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
112 | * Zephyr doesn't require passwords, so there's no |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
113 | * need for a password prompt. |
|
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_NO_PASSWORD = 0x00000010, |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
116 | |
|
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 | * Notify on new mail. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
119 | * |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
120 | * MSN and Yahoo notify you when you have new mail. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
121 | */ |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
122 | OPT_PROTO_MAIL_CHECK = 0x00000020, |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
123 | |
|
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 | * Images in IMs. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
126 | * |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
127 | * Oscar lets you send images in direct IMs. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
128 | */ |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
129 | OPT_PROTO_IM_IMAGE = 0x00000040, |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
130 | |
|
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 | * Allow passwords to be optional. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
133 | * |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
134 | * Passwords in IRC are optional, and are needed for certain |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
135 | * functionality. |
|
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_PASSWORD_OPTIONAL = 0x00000080, |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
138 | |
| 5367 | 139 | /** |
| 140 | * Allows font size to be specified in sane point size | |
| 141 | * | |
| 142 | * Probably just Jabber and Y!M | |
| 143 | */ | |
| 11358 | 144 | OPT_PROTO_USE_POINTSIZE = 0x00000100, |
| 145 | ||
| 146 | /** | |
| 147 | * Set the Register button active when screenname is not given. | |
| 148 | * | |
| 149 | * Gadu-Gadu doesn't need a screenname to register new account. | |
| 150 | */ | |
| 151 | OPT_PROTO_REGISTER_NOSCREENNAME = 0x00000200, | |
| 5367 | 152 | |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
153 | } GaimProtocolOptions; |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
154 | |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
155 | /** |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
156 | * A protocol plugin information structure. |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
157 | * |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
158 | * Every protocol plugin initializes this structure. It is the gateway |
|
10160
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
159 | * between gaim 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
|
160 | * 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
|
161 | */ |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
162 | struct _GaimPluginProtocolInfo |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
163 | { |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
164 | GaimProtocolOptions options; /**< Protocol options. */ |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
165 | |
|
5638
53e752c88ea1
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
166 | GList *user_splits; /* A GList of GaimAccountUserSplit */ |
|
53e752c88ea1
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
167 | GList *protocol_options; /* A GList of GaimAccountOption */ |
|
10160
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
168 | |
| 9308 | 169 | GaimBuddyIconSpec icon_spec; /* The icon spec. */ |
|
10160
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
170 | |
|
6451
2ff17ce330d8
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
171 | /** |
|
2ff17ce330d8
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
172 | * Returns the base icon name for the given buddy and account. |
|
10160
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
173 | * If buddy is NULL, it will return the name to use for the account's |
|
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
174 | * icon. This must be implemented. |
| 4687 | 175 | */ |
| 6695 | 176 | const char *(*list_icon)(GaimAccount *account, GaimBuddy *buddy); |
| 4687 | 177 | |
| 178 | /** | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
179 | * Fills the four char**'s with string identifiers for "emblems" |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
180 | * that the UI will interpret and display as relevant |
| 4687 | 181 | */ |
| 9952 | 182 | void (*list_emblems)(GaimBuddy *buddy, const char **se, const char **sw, |
| 183 | const char **nw, const char **ne); | |
| 4722 | 184 | |
| 185 | /** | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
186 | * Gets a short string representing this buddy's status. This will |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
187 | * be shown on the buddy list. |
| 4722 | 188 | */ |
| 6695 | 189 | char *(*status_text)(GaimBuddy *buddy); |
|
6451
2ff17ce330d8
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
190 | |
| 4724 | 191 | /** |
|
12970
c2f3b4dcf711
[gaim-migrate @ 15323]
Richard Laager <rlaager@pidgin.im>
parents:
12943
diff
changeset
|
192 | * Allows the prpl to add text to a buddy's tooltip. |
| 4724 | 193 | */ |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
15185
diff
changeset
|
194 | void (*tooltip_text)(GaimBuddy *buddy, GaimNotifyUserInfo *user_info, gboolean full); |
|
6451
2ff17ce330d8
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
195 | |
|
10200
33c21db946e7
[gaim-migrate @ 11317]
Mark Doliner <markdoliner@pidgin.im>
parents:
10162
diff
changeset
|
196 | /** |
|
33c21db946e7
[gaim-migrate @ 11317]
Mark Doliner <markdoliner@pidgin.im>
parents:
10162
diff
changeset
|
197 | * This must be implemented, and must add at least the offline |
|
33c21db946e7
[gaim-migrate @ 11317]
Mark Doliner <markdoliner@pidgin.im>
parents:
10162
diff
changeset
|
198 | * and online states. |
|
33c21db946e7
[gaim-migrate @ 11317]
Mark Doliner <markdoliner@pidgin.im>
parents:
10162
diff
changeset
|
199 | */ |
| 9950 | 200 | GList *(*status_types)(GaimAccount *account); |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
201 | |
|
9030
7b574a641391
[gaim-migrate @ 9806]
Mark Doliner <markdoliner@pidgin.im>
parents:
9015
diff
changeset
|
202 | GList *(*blist_node_menu)(GaimBlistNode *node); |
|
5563
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
203 | GList *(*chat_info)(GaimConnection *); |
|
9754
3a17eee239b2
[gaim-migrate @ 10621]
Nathan Fredrickson <nathan@silverorange.com>
parents:
9753
diff
changeset
|
204 | GHashTable *(*chat_info_defaults)(GaimConnection *, const char *chat_name); |
|
1333
bbd54f86976f
[gaim-migrate @ 1343]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1318
diff
changeset
|
205 | |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
206 | /* All the server-related functions */ |
|
10160
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
207 | |
|
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
208 | /** This must be implemented. */ |
|
11837
2f1206084fef
[gaim-migrate @ 14128]
Mark Doliner <markdoliner@pidgin.im>
parents:
11693
diff
changeset
|
209 | void (*login)(GaimAccount *); |
|
10160
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
210 | |
|
90f207810143
[gaim-migrate @ 11243]
Mark Doliner <markdoliner@pidgin.im>
parents:
10104
diff
changeset
|
211 | /** This must be implemented. */ |
|
5563
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
212 | void (*close)(GaimConnection *); |
|
11693
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
213 | |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
214 | /** |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
215 | * This PRPL function should return a positive value on success. |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
216 | * 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
|
217 | * the account is not connected, return -ENOTCONN. If the |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
218 | * PRPL is unable to send the message for another reason, return |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
219 | * some other negative value. You can use one of the valid |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
220 | * errno values, or just big something. If the message should |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
221 | * not be echoed to the conversation window, return 0. |
|
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
222 | */ |
|
5563
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
223 | int (*send_im)(GaimConnection *, const char *who, |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6885
diff
changeset
|
224 | const char *message, |
|
12216
d80739091a63
[gaim-migrate @ 14518]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12143
diff
changeset
|
225 | GaimMessageFlags flags); |
|
11693
1a42a66ca0f8
[gaim-migrate @ 13979]
Mark Doliner <markdoliner@pidgin.im>
parents:
11500
diff
changeset
|
226 | |
|
5954
58e43cf2dc1f
[gaim-migrate @ 6398]
Mark Doliner <markdoliner@pidgin.im>
parents:
5946
diff
changeset
|
227 | void (*set_info)(GaimConnection *, const char *info); |
|
13844
835b8f7b3d1d
[gaim-migrate @ 16295]
Mark Doliner <markdoliner@pidgin.im>
parents:
13374
diff
changeset
|
228 | unsigned int (*send_typing)(GaimConnection *, const char *name, GaimTypingState state); |
|
5563
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
229 | void (*get_info)(GaimConnection *, const char *who); |
|
9949
377cd65fab3d
[gaim-migrate @ 10845]
Daniel Atallah <datallah@pidgin.im>
parents:
9944
diff
changeset
|
230 | void (*set_status)(GaimAccount *account, GaimStatus *status); |
|
377cd65fab3d
[gaim-migrate @ 10845]
Daniel Atallah <datallah@pidgin.im>
parents:
9944
diff
changeset
|
231 | |
|
5563
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
232 | void (*set_idle)(GaimConnection *, int idletime); |
|
5946
ebabcd2b4637
[gaim-migrate @ 6387]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
233 | void (*change_passwd)(GaimConnection *, const char *old_pass, |
|
ebabcd2b4637
[gaim-migrate @ 6387]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
234 | const char *new_pass); |
|
9285
9cedf5d26577
[gaim-migrate @ 10088]
Mark Doliner <markdoliner@pidgin.im>
parents:
9058
diff
changeset
|
235 | void (*add_buddy)(GaimConnection *, GaimBuddy *buddy, GaimGroup *group); |
|
9cedf5d26577
[gaim-migrate @ 10088]
Mark Doliner <markdoliner@pidgin.im>
parents:
9058
diff
changeset
|
236 | void (*add_buddies)(GaimConnection *, GList *buddies, GList *groups); |
|
9cedf5d26577
[gaim-migrate @ 10088]
Mark Doliner <markdoliner@pidgin.im>
parents:
9058
diff
changeset
|
237 | void (*remove_buddy)(GaimConnection *, GaimBuddy *buddy, GaimGroup *group); |
|
9cedf5d26577
[gaim-migrate @ 10088]
Mark Doliner <markdoliner@pidgin.im>
parents:
9058
diff
changeset
|
238 | void (*remove_buddies)(GaimConnection *, GList *buddies, GList *groups); |
|
5563
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
239 | void (*add_permit)(GaimConnection *, const char *name); |
|
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
240 | void (*add_deny)(GaimConnection *, const char *name); |
|
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
241 | void (*rem_permit)(GaimConnection *, const char *name); |
|
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
242 | void (*rem_deny)(GaimConnection *, const char *name); |
|
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
243 | void (*set_permit_deny)(GaimConnection *); |
|
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
244 | void (*join_chat)(GaimConnection *, GHashTable *components); |
|
8562
7e73676d1772
[gaim-migrate @ 9306]
Christopher O'Brien <siege@pidgin.im>
parents:
8170
diff
changeset
|
245 | void (*reject_chat)(GaimConnection *, GHashTable *components); |
|
9917
2fbb3c9fab2b
[gaim-migrate @ 10809]
Daniel Atallah <datallah@pidgin.im>
parents:
9770
diff
changeset
|
246 | char *(*get_chat_name)(GHashTable *components); |
|
5563
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
247 | void (*chat_invite)(GaimConnection *, int id, |
|
15036
2580e926104d
[gaim-migrate @ 17753]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15002
diff
changeset
|
248 | const char *message, const char *who); |
|
5563
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
249 | void (*chat_leave)(GaimConnection *, int id); |
|
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
250 | void (*chat_whisper)(GaimConnection *, int id, |
|
6059
9934c862ca14
[gaim-migrate @ 6509]
John Silvestri <john.silvestri@gmail.com>
parents:
5954
diff
changeset
|
251 | const char *who, const char *message); |
|
12216
d80739091a63
[gaim-migrate @ 14518]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
12143
diff
changeset
|
252 | int (*chat_send)(GaimConnection *, int id, const char *message, GaimMessageFlags flags); |
|
5563
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
253 | void (*keepalive)(GaimConnection *); |
|
1713
3e0138242a5b
[gaim-migrate @ 1723]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
1626
diff
changeset
|
254 | |
|
2827
e3d10df95e74
[gaim-migrate @ 2840]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2773
diff
changeset
|
255 | /* new user registration */ |
|
5563
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
256 | void (*register_user)(GaimAccount *); |
| 2956 | 257 | |
| 258 | /* get "chat buddy" info and away message */ | |
|
6059
9934c862ca14
[gaim-migrate @ 6509]
John Silvestri <john.silvestri@gmail.com>
parents:
5954
diff
changeset
|
259 | void (*get_cb_info)(GaimConnection *, int, const char *who); |
|
9934c862ca14
[gaim-migrate @ 6509]
John Silvestri <john.silvestri@gmail.com>
parents:
5954
diff
changeset
|
260 | void (*get_cb_away)(GaimConnection *, int, const char *who); |
|
2827
e3d10df95e74
[gaim-migrate @ 2840]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2773
diff
changeset
|
261 | |
| 3136 | 262 | /* save/store buddy's alias on server list/roster */ |
|
5563
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
263 | void (*alias_buddy)(GaimConnection *, const char *who, |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
264 | const char *alias); |
| 3136 | 265 | |
| 266 | /* change a buddy's group on a server list/roster */ | |
|
5563
d5a7852aa0cb
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5538
diff
changeset
|
267 | void (*group_buddy)(GaimConnection *, const char *who, |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
268 | const char *old_group, const char *new_group); |
| 3136 | 269 | |
|
3348
57ed471963ba
[gaim-migrate @ 3367]
Mark Doliner <markdoliner@pidgin.im>
parents:
3313
diff
changeset
|
270 | /* rename a group on a server list/roster */ |
|
9285
9cedf5d26577
[gaim-migrate @ 10088]
Mark Doliner <markdoliner@pidgin.im>
parents:
9058
diff
changeset
|
271 | void (*rename_group)(GaimConnection *, const char *old_name, |
|
9cedf5d26577
[gaim-migrate @ 10088]
Mark Doliner <markdoliner@pidgin.im>
parents:
9058
diff
changeset
|
272 | GaimGroup *group, GList *moved_buddies); |
|
3348
57ed471963ba
[gaim-migrate @ 3367]
Mark Doliner <markdoliner@pidgin.im>
parents:
3313
diff
changeset
|
273 | |
| 6695 | 274 | void (*buddy_free)(GaimBuddy *); |
|
2607
7bcd3ea48df3
[gaim-migrate @ 2620]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2582
diff
changeset
|
275 | |
|
6059
9934c862ca14
[gaim-migrate @ 6509]
John Silvestri <john.silvestri@gmail.com>
parents:
5954
diff
changeset
|
276 | void (*convo_closed)(GaimConnection *, const char *who); |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
277 | |
| 7322 | 278 | const char *(*normalize)(const GaimAccount *, const char *); |
|
6451
2ff17ce330d8
[gaim-migrate @ 6960]
Christian Hammond <chipx86@chipx86.com>
parents:
6418
diff
changeset
|
279 | |
|
15132
672c39839af1
[gaim-migrate @ 17854]
Mark Huetsch <markhuetsch@users.sourceforge.net>
parents:
15036
diff
changeset
|
280 | void (*set_buddy_icon)(GaimConnection *, const char *cached_path); |
|
6885
65132ebfc662
[gaim-migrate @ 7431]
Christian Hammond <chipx86@chipx86.com>
parents:
6846
diff
changeset
|
281 | |
|
9285
9cedf5d26577
[gaim-migrate @ 10088]
Mark Doliner <markdoliner@pidgin.im>
parents:
9058
diff
changeset
|
282 | void (*remove_group)(GaimConnection *gc, GaimGroup *group); |
| 7398 | 283 | |
| 284 | char *(*get_cb_real_name)(GaimConnection *gc, int id, const char *who); | |
| 7971 | 285 | |
| 286 | void (*set_chat_topic)(GaimConnection *gc, int id, const char *topic); | |
| 7999 | 287 | |
| 288 | GaimChat *(*find_blist_chat)(GaimAccount *account, const char *name); | |
| 8113 | 289 | |
| 290 | /* room listing prpl callbacks */ | |
|
9999
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
291 | GaimRoomlist *(*roomlist_get_list)(GaimConnection *gc); |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
292 | void (*roomlist_cancel)(GaimRoomlist *list); |
|
86e89e1dee10
[gaim-migrate @ 10913]
Mark Doliner <markdoliner@pidgin.im>
parents:
9971
diff
changeset
|
293 | void (*roomlist_expand_category)(GaimRoomlist *list, GaimRoomlistRoom *category); |
|
9466
b6425eab60ca
[gaim-migrate @ 10291]
Daniel Atallah <datallah@pidgin.im>
parents:
9460
diff
changeset
|
294 | |
|
b6425eab60ca
[gaim-migrate @ 10291]
Daniel Atallah <datallah@pidgin.im>
parents:
9460
diff
changeset
|
295 | /* file transfer callbacks */ |
|
b6425eab60ca
[gaim-migrate @ 10291]
Daniel Atallah <datallah@pidgin.im>
parents:
9460
diff
changeset
|
296 | gboolean (*can_receive_file)(GaimConnection *, const char *who); |
|
b6425eab60ca
[gaim-migrate @ 10291]
Daniel Atallah <datallah@pidgin.im>
parents:
9460
diff
changeset
|
297 | void (*send_file)(GaimConnection *, const char *who, const char *filename); |
|
12143
09f216663302
[gaim-migrate @ 14444]
Evan Schoenberg <evands@pidgin.im>
parents:
12024
diff
changeset
|
298 | GaimXfer *(*new_xfer)(GaimConnection *, const char *who); |
|
13328
65543dcbaa89
[gaim-migrate @ 15697]
Mark Doliner <markdoliner@pidgin.im>
parents:
13294
diff
changeset
|
299 | gboolean (*offline_message)(const GaimBuddy *buddy); |
|
12143
09f216663302
[gaim-migrate @ 14444]
Evan Schoenberg <evands@pidgin.im>
parents:
12024
diff
changeset
|
300 | |
|
11475
1e222e6e52a0
[gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
11462
diff
changeset
|
301 | GaimWhiteboardPrplOps *whiteboard_prpl_ops; |
| 14604 | 302 | |
| 303 | /* For use in plugins that may understand the underlying protocol */ | |
| 304 | int (*send_raw)(GaimConnection *gc, const char *buf, int len); | |
| 15185 | 305 | |
| 306 | /* room list serialize */ | |
| 307 | char *(*roomlist_room_serialize)(GaimRoomlistRoom *room); | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
308 | }; |
|
2246
8ade8b7421af
[gaim-migrate @ 2256]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2232
diff
changeset
|
309 | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
310 | #define GAIM_IS_PROTOCOL_PLUGIN(plugin) \ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
311 | ((plugin)->info->type == GAIM_PLUGIN_PROTOCOL) |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
312 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
313 | #define GAIM_PLUGIN_PROTOCOL_INFO(plugin) \ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5148
diff
changeset
|
314 | ((GaimPluginProtocolInfo *)(plugin)->info->extra_info) |
| 981 | 315 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
316 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
317 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
318 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
319 | |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
320 | /**************************************************************************/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
321 | /** @name Protocol Plugin API */ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
322 | /**************************************************************************/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
323 | /*@{*/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
324 | |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
325 | /** |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
326 | * Notifies Gaim that an account's idle state and time have changed. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
327 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
328 | * This is meant to be called from protocol plugins. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
329 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
330 | * @param account The account. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
331 | * @param idle The user's idle state. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
332 | * @param idle_time The user's idle time. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
333 | */ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
334 | void gaim_prpl_got_account_idle(GaimAccount *account, gboolean idle, |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
335 | time_t idle_time); |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
336 | |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
337 | /** |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
338 | * Notifies Gaim of an account's log-in time. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
339 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
340 | * This is meant to be called from protocol plugins. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
341 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
342 | * @param account The account the user is on. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
343 | * @param login_time The user's log-in time. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
344 | */ |
|
10870
028006831b79
[gaim-migrate @ 12557]
Mark Doliner <markdoliner@pidgin.im>
parents:
10860
diff
changeset
|
345 | void gaim_prpl_got_account_login_time(GaimAccount *account, time_t login_time); |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
346 | |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
347 | /** |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
348 | * Notifies Gaim that an account's status has changed. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
349 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
350 | * This is meant to be called from protocol plugins. |
|
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 | * @param account The account the user is on. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
353 | * @param status_id The status ID. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
354 | * @param ... A NULL-terminated list of attribute IDs and values, |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
355 | * beginning with the value for @a attr_id. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
356 | */ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
357 | void gaim_prpl_got_account_status(GaimAccount *account, |
|
13374
e5da5325b1fa
[gaim-migrate @ 15746]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13328
diff
changeset
|
358 | const char *status_id, ...); |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
359 | /** |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
360 | * Notifies Gaim that a user's idle state and time have changed. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
361 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
362 | * This is meant to be called from protocol plugins. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
363 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
364 | * @param account The account the user is on. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
365 | * @param name The screen name of the user. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
366 | * @param idle The user's idle state. |
|
10860
8f600347b9e4
[gaim-migrate @ 12543]
Palmer Cox <enix@users.sourceforge.net>
parents:
10475
diff
changeset
|
367 | * @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
|
368 | * which the user became idle, in seconds since |
|
8f600347b9e4
[gaim-migrate @ 12543]
Palmer Cox <enix@users.sourceforge.net>
parents:
10475
diff
changeset
|
369 | * the epoch. |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
370 | */ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
371 | void gaim_prpl_got_user_idle(GaimAccount *account, const char *name, |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
372 | gboolean idle, time_t idle_time); |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
373 | |
|
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 | * Notifies Gaim of a user's log-in time. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
376 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
377 | * This is meant to be called from protocol plugins. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
378 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
379 | * @param account The account the user is on. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
380 | * @param name The screen name of the user. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
381 | * @param login_time The user's log-in time. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
382 | */ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
383 | void gaim_prpl_got_user_login_time(GaimAccount *account, const char *name, |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
384 | time_t login_time); |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
385 | |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
386 | /** |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
387 | * Notifies Gaim that a user's status has changed. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
388 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
389 | * This is meant to be called from protocol plugins. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
390 | * |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
391 | * @param account The account the user is on. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
392 | * @param name The screen name of the user. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
393 | * @param status_id The status ID. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
394 | * @param ... A NULL-terminated list of attribute IDs and values, |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
395 | * beginning with the value for @a attr_id. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
396 | */ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
397 | void gaim_prpl_got_user_status(GaimAccount *account, const char *name, |
|
13374
e5da5325b1fa
[gaim-migrate @ 15746]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13328
diff
changeset
|
398 | const char *status_id, ...); |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
399 | /** |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
400 | * Informs the server that an account's status changed. |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
401 | * |
|
10447
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
402 | * @param account The account the user is on. |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
403 | * @param old_status The previous status. |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
404 | * @param new_status The status that was activated, or deactivated |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
405 | * (in the case of independent statuses). |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
406 | */ |
|
10447
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
407 | void gaim_prpl_change_account_status(GaimAccount *account, |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
408 | GaimStatus *old_status, |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
409 | GaimStatus *new_status); |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
410 | |
|
10006
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
411 | /** |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
412 | * Retrieves the list of stock status types from a prpl. |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
413 | * |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
414 | * @param account The account the user is on. |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
415 | * @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
|
416 | * |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
417 | * @return List of statuses |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
418 | */ |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
419 | GList *gaim_prpl_get_statuses(GaimAccount *account, GaimPresence *presence); |
|
800a81666868
[gaim-migrate @ 10923]
Dave West <kat@users.sourceforge.net>
parents:
9999
diff
changeset
|
420 | |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
421 | /*@}*/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
422 | |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
423 | /**************************************************************************/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
424 | /** @name Protocol Plugin Subsystem API */ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
425 | /**************************************************************************/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
426 | /*@{*/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
427 | |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
428 | /** |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
429 | * Finds a protocol plugin structure of the specified type. |
|
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
430 | * |
| 9000 | 431 | * @param id The protocol plugin; |
|
4557
40c90b1671cf
[gaim-migrate @ 4837]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
432 | */ |
| 7956 | 433 | GaimPlugin *gaim_find_prpl(const char *id); |
| 981 | 434 | |
|
9944
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
435 | /*@}*/ |
|
71ef020ec4b0
[gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents:
9943
diff
changeset
|
436 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
437 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
438 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
439 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
440 | |
|
2417
7751d1269b09
[gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
2411
diff
changeset
|
441 | #endif /* _PRPL_H_ */ |