Wed, 06 Feb 2008 18:06:44 +0000
Simplified version of the newest patch on #4533 to not try Yahoo protocol
version 15 file transfer on Yahoo Japan.
| 5205 | 1 | /** |
| 2 | * @file plugin.h Plugin API | |
| 3 | * @ingroup core | |
|
20889
3d0ef192f98c
All the links to libpurple signal pages were in the comment containing the
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
4 | * @see @ref plugin-signals |
|
3d0ef192f98c
All the links to libpurple signal pages were in the comment containing the
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
5 | * @see @ref plugin-ids |
|
3d0ef192f98c
All the links to libpurple signal pages were in the comment containing the
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
6 | * @see @ref plugin-i18n |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19897
diff
changeset
|
7 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19897
diff
changeset
|
8 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19897
diff
changeset
|
9 | /* purple |
| 5205 | 10 | * |
| 15884 | 11 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 12 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 13 | * source distribution. | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
5949
diff
changeset
|
14 | * |
| 5205 | 15 | * This program is free software; you can redistribute it and/or modify |
| 16 | * it under the terms of the GNU General Public License as published by | |
| 17 | * the Free Software Foundation; either version 2 of the License, or | |
| 18 | * (at your option) any later version. | |
| 19 | * | |
| 20 | * This program is distributed in the hope that it will be useful, | |
| 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 23 | * GNU General Public License for more details. | |
| 24 | * | |
| 25 | * You should have received a copy of the GNU General Public License | |
| 26 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18412
diff
changeset
|
27 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 5205 | 28 | */ |
| 15884 | 29 | #ifndef _PURPLE_PLUGIN_H_ |
| 30 | #define _PURPLE_PLUGIN_H_ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5840
diff
changeset
|
31 | |
|
8986
30ba617356bb
[gaim-migrate @ 9761]
Christopher O'Brien <siege@pidgin.im>
parents:
8814
diff
changeset
|
32 | #include <glib/glist.h> |
|
5224
8cb89f5b912a
[gaim-migrate @ 5594]
Herman Bloggs <herman@bluedigits.com>
parents:
5205
diff
changeset
|
33 | #include <gmodule.h> |
|
6822
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
34 | #include "signals.h" |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
35 | #include "value.h" |
| 5205 | 36 | |
| 15884 | 37 | typedef struct _PurplePlugin PurplePlugin; |
| 38 | typedef struct _PurplePluginInfo PurplePluginInfo; | |
| 39 | typedef struct _PurplePluginUiInfo PurplePluginUiInfo; | |
| 40 | typedef struct _PurplePluginLoaderInfo PurplePluginLoaderInfo; | |
| 5205 | 41 | |
| 15884 | 42 | typedef struct _PurplePluginAction PurplePluginAction; |
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
43 | |
| 15884 | 44 | typedef int PurplePluginPriority; /**< Plugin priority. */ |
| 5205 | 45 | |
| 8713 | 46 | #include "pluginpref.h" |
| 47 | ||
| 5205 | 48 | /** |
| 49 | * Plugin types. | |
| 50 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5840
diff
changeset
|
51 | typedef enum |
| 5205 | 52 | { |
| 15884 | 53 | PURPLE_PLUGIN_UNKNOWN = -1, /**< Unknown type. */ |
| 54 | PURPLE_PLUGIN_STANDARD = 0, /**< Standard plugin. */ | |
| 55 | PURPLE_PLUGIN_LOADER, /**< Loader plugin. */ | |
| 56 | PURPLE_PLUGIN_PROTOCOL /**< Protocol plugin. */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5840
diff
changeset
|
57 | |
| 15884 | 58 | } PurplePluginType; |
| 5205 | 59 | |
| 15884 | 60 | #define PURPLE_PRIORITY_DEFAULT 0 |
| 61 | #define PURPLE_PRIORITY_HIGHEST 9999 | |
| 62 | #define PURPLE_PRIORITY_LOWEST -9999 | |
| 5205 | 63 | |
| 15884 | 64 | #define PURPLE_PLUGIN_FLAG_INVISIBLE 0x01 |
|
6928
17e0c572bd97
[gaim-migrate @ 7475]
Christian Hammond <chipx86@chipx86.com>
parents:
6822
diff
changeset
|
65 | |
| 15884 | 66 | #define PURPLE_PLUGIN_MAGIC 5 /* once we hit 6.0.0 I think we can remove this */ |
|
8749
fb487e9e101a
[gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents:
8735
diff
changeset
|
67 | |
| 5205 | 68 | /** |
| 69 | * Detailed information about a plugin. | |
| 70 | * | |
| 71 | * This is used in the version 2.0 API and up. | |
| 72 | */ | |
| 15884 | 73 | struct _PurplePluginInfo |
| 5205 | 74 | { |
| 9943 | 75 | unsigned int magic; |
| 76 | unsigned int major_version; | |
| 77 | unsigned int minor_version; | |
| 15884 | 78 | PurplePluginType type; |
| 5205 | 79 | char *ui_requirement; |
| 80 | unsigned long flags; | |
| 81 | GList *dependencies; | |
| 15884 | 82 | PurplePluginPriority priority; |
| 5205 | 83 | |
| 84 | char *id; | |
| 85 | char *name; | |
| 86 | char *version; | |
| 87 | char *summary; | |
| 88 | char *description; | |
| 89 | char *author; | |
| 90 | char *homepage; | |
| 91 | ||
|
11963
3af2d2a60564
[gaim-migrate @ 14254]
Mark Doliner <markdoliner@pidgin.im>
parents:
11950
diff
changeset
|
92 | /** |
|
3af2d2a60564
[gaim-migrate @ 14254]
Mark Doliner <markdoliner@pidgin.im>
parents:
11950
diff
changeset
|
93 | * If a plugin defines a 'load' function, and it returns FALSE, |
|
3af2d2a60564
[gaim-migrate @ 14254]
Mark Doliner <markdoliner@pidgin.im>
parents:
11950
diff
changeset
|
94 | * then the plugin will not be loaded. |
|
10450
1757208151dc
[gaim-migrate @ 11715]
Mark Doliner <markdoliner@pidgin.im>
parents:
10448
diff
changeset
|
95 | */ |
| 15884 | 96 | gboolean (*load)(PurplePlugin *plugin); |
| 97 | gboolean (*unload)(PurplePlugin *plugin); | |
| 98 | void (*destroy)(PurplePlugin *plugin); | |
| 5205 | 99 | |
|
11817
b8622a510778
[gaim-migrate @ 14108]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11772
diff
changeset
|
100 | void *ui_info; /**< Used only by UI-specific plugins to build a preference screen with a custom UI */ |
| 5205 | 101 | void *extra_info; |
| 15884 | 102 | PurplePluginUiInfo *prefs_info; /**< Used by any plugin to display preferences. If #ui_info has been specified, this will be ignored. */ |
| 103 | GList *(*actions)(PurplePlugin *plugin, gpointer context); | |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
104 | |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
105 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
106 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
107 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
108 | void (*_purple_reserved4)(void); |
| 5205 | 109 | }; |
| 110 | ||
| 111 | /** | |
| 112 | * Extra information for loader plugins. | |
| 113 | */ | |
| 15884 | 114 | struct _PurplePluginLoaderInfo |
| 5205 | 115 | { |
| 116 | GList *exts; | |
| 117 | ||
| 15884 | 118 | gboolean (*probe)(PurplePlugin *plugin); |
| 119 | gboolean (*load)(PurplePlugin *plugin); | |
| 120 | gboolean (*unload)(PurplePlugin *plugin); | |
| 121 | void (*destroy)(PurplePlugin *plugin); | |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
122 | |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
123 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
124 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
125 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
126 | void (*_purple_reserved4)(void); |
| 5205 | 127 | }; |
| 128 | ||
| 129 | /** | |
| 130 | * A plugin handle. | |
| 131 | */ | |
| 15884 | 132 | struct _PurplePlugin |
| 5205 | 133 | { |
| 134 | gboolean native_plugin; /**< Native C plugin. */ | |
| 135 | gboolean loaded; /**< The loaded state. */ | |
| 136 | void *handle; /**< The module handle. */ | |
| 137 | char *path; /**< The path to the plugin. */ | |
| 15884 | 138 | PurplePluginInfo *info; /**< The plugin information. */ |
| 5205 | 139 | char *error; |
|
6822
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
140 | void *ipc_data; /**< IPC data. */ |
| 5205 | 141 | void *extra; /**< Plugin-specific data. */ |
|
12695
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
142 | gboolean unloadable; /**< Unloadable */ |
| 12926 | 143 | GList *dependent_plugins; /**< Plugins depending on this */ |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
144 | |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
145 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
146 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
147 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
148 | void (*_purple_reserved4)(void); |
| 5205 | 149 | }; |
| 150 | ||
| 15884 | 151 | #define PURPLE_PLUGIN_LOADER_INFO(plugin) \ |
| 152 | ((PurplePluginLoaderInfo *)(plugin)->info->extra_info) | |
| 5205 | 153 | |
| 15884 | 154 | struct _PurplePluginUiInfo { |
| 155 | PurplePluginPrefFrame *(*get_plugin_pref_frame)(PurplePlugin *plugin); | |
| 8713 | 156 | |
|
10759
c6600b133594
[gaim-migrate @ 12362]
Mark Doliner <markdoliner@pidgin.im>
parents:
10710
diff
changeset
|
157 | int page_num; /**< Reserved */ |
| 15884 | 158 | PurplePluginPrefFrame *frame; /**< Reserved */ |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
159 | |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
160 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
161 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
162 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
163 | void (*_purple_reserved4)(void); |
| 8713 | 164 | }; |
| 165 | ||
| 15884 | 166 | #define PURPLE_PLUGIN_HAS_PREF_FRAME(plugin) \ |
| 8713 | 167 | ((plugin)->info != NULL && (plugin)->info->prefs_info != NULL) |
| 168 | ||
| 15884 | 169 | #define PURPLE_PLUGIN_UI_INFO(plugin) \ |
| 170 | ((PurplePluginUiInfo*)(plugin)->info->prefs_info) | |
| 8713 | 171 | |
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
172 | |
|
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
173 | /** |
| 15884 | 174 | * The structure used in the actions member of PurplePluginInfo |
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
175 | */ |
| 15884 | 176 | struct _PurplePluginAction { |
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
177 | char *label; |
| 15884 | 178 | void (*callback)(PurplePluginAction *); |
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
179 | |
|
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
180 | /** set to the owning plugin */ |
| 15884 | 181 | PurplePlugin *plugin; |
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
182 | |
| 15884 | 183 | /** NULL for plugin actions menu, set to the PurpleConnection for |
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
184 | account actions menu */ |
|
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
185 | gpointer context; |
|
17817
8e0f271aab78
The server's ad-hoc commands are now listed in the account's action menu. Note that this requires an additional field in the _PurplePluginAction struct. There's no other way, since there was no way to supply user_data, and dynamically created functions are not supported by C. This should be fine, since that struct is only malloced in purple_plugin_action_new, which is part of the core. Applications have to either pass the struct unmodified, or restore the user_data pointer if the action is recreated when necessary (as is the case in Adium).
Andreas Monitzer <am@adiumx.com>
parents:
16743
diff
changeset
|
186 | |
|
8e0f271aab78
The server's ad-hoc commands are now listed in the account's action menu. Note that this requires an additional field in the _PurplePluginAction struct. There's no other way, since there was no way to supply user_data, and dynamically created functions are not supported by C. This should be fine, since that struct is only malloced in purple_plugin_action_new, which is part of the core. Applications have to either pass the struct unmodified, or restore the user_data pointer if the action is recreated when necessary (as is the case in Adium).
Andreas Monitzer <am@adiumx.com>
parents:
16743
diff
changeset
|
187 | gpointer user_data; |
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
188 | }; |
|
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
189 | |
| 15884 | 190 | #define PURPLE_PLUGIN_HAS_ACTIONS(plugin) \ |
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
191 | ((plugin)->info != NULL && (plugin)->info->actions != NULL) |
|
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
192 | |
| 15884 | 193 | #define PURPLE_PLUGIN_ACTIONS(plugin, context) \ |
| 194 | (PURPLE_PLUGIN_HAS_ACTIONS(plugin)? \ | |
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
195 | (plugin)->info->actions(plugin, context): NULL) |
|
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
196 | |
|
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
197 | |
| 5205 | 198 | /** |
| 199 | * Handles the initialization of modules. | |
| 200 | */ | |
| 15884 | 201 | #if !defined(PURPLE_PLUGINS) || defined(PURPLE_STATIC_PRPL) |
| 202 | # define PURPLE_INIT_PLUGIN(pluginname, initfunc, plugininfo) \ | |
| 203 | gboolean purple_init_##pluginname##_plugin(void);\ | |
| 204 | gboolean purple_init_##pluginname##_plugin(void) { \ | |
| 205 | PurplePlugin *plugin = purple_plugin_new(TRUE, NULL); \ | |
| 5205 | 206 | plugin->info = &(plugininfo); \ |
| 207 | initfunc((plugin)); \ | |
| 15884 | 208 | purple_plugin_load((plugin)); \ |
| 209 | return purple_plugin_register(plugin); \ | |
| 5205 | 210 | } |
| 15884 | 211 | #else /* PURPLE_PLUGINS && !PURPLE_STATIC_PRPL */ |
| 212 | # define PURPLE_INIT_PLUGIN(pluginname, initfunc, plugininfo) \ | |
| 213 | G_MODULE_EXPORT gboolean purple_init_plugin(PurplePlugin *plugin); \ | |
| 214 | G_MODULE_EXPORT gboolean purple_init_plugin(PurplePlugin *plugin) { \ | |
| 5205 | 215 | plugin->info = &(plugininfo); \ |
| 216 | initfunc((plugin)); \ | |
| 15884 | 217 | return purple_plugin_register(plugin); \ |
| 5205 | 218 | } |
| 219 | #endif | |
| 220 | ||
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
221 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5840
diff
changeset
|
222 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5840
diff
changeset
|
223 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5840
diff
changeset
|
224 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5840
diff
changeset
|
225 | |
| 5205 | 226 | /**************************************************************************/ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5840
diff
changeset
|
227 | /** @name Plugin API */ |
| 5205 | 228 | /**************************************************************************/ |
| 229 | /*@{*/ | |
| 230 | ||
| 231 | /** | |
| 232 | * Creates a new plugin structure. | |
| 233 | * | |
| 234 | * @param native Whether or not the plugin is native. | |
| 235 | * @param path The path to the plugin, or @c NULL if statically compiled. | |
| 236 | * | |
| 15884 | 237 | * @return A new PurplePlugin structure. |
| 5205 | 238 | */ |
| 15884 | 239 | PurplePlugin *purple_plugin_new(gboolean native, const char *path); |
| 5205 | 240 | |
| 241 | /** | |
| 242 | * Probes a plugin, retrieving the information on it and adding it to the | |
| 243 | * list of available plugins. | |
| 244 | * | |
| 245 | * @param filename The plugin's filename. | |
| 246 | * | |
| 247 | * @return The plugin handle. | |
| 248 | * | |
| 15884 | 249 | * @see purple_plugin_load() |
| 250 | * @see purple_plugin_destroy() | |
| 5205 | 251 | */ |
| 15884 | 252 | PurplePlugin *purple_plugin_probe(const char *filename); |
| 5205 | 253 | |
| 254 | /** | |
| 255 | * Registers a plugin and prepares it for loading. | |
| 256 | * | |
| 257 | * This shouldn't be called by anything but the internal module code. | |
| 15884 | 258 | * Plugins should use the PURPLE_INIT_PLUGIN() macro to register themselves |
|
10447
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
9946
diff
changeset
|
259 | * with the core. |
| 5205 | 260 | * |
| 261 | * @param plugin The plugin to register. | |
|
10447
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
9946
diff
changeset
|
262 | * |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
9946
diff
changeset
|
263 | * @return @c TRUE if the plugin was registered successfully. Otherwise |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
9946
diff
changeset
|
264 | * @c FALSE is returned (this happens if the plugin does not contain |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
9946
diff
changeset
|
265 | * the necessary information). |
| 5205 | 266 | */ |
| 15884 | 267 | gboolean purple_plugin_register(PurplePlugin *plugin); |
| 5205 | 268 | |
| 269 | /** | |
| 270 | * Attempts to load a previously probed plugin. | |
| 271 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6486
diff
changeset
|
272 | * @param plugin The plugin to load. |
| 5205 | 273 | * |
| 274 | * @return @c TRUE if successful, or @c FALSE otherwise. | |
| 275 | * | |
| 15884 | 276 | * @see purple_plugin_reload() |
| 277 | * @see purple_plugin_unload() | |
| 5205 | 278 | */ |
| 15884 | 279 | gboolean purple_plugin_load(PurplePlugin *plugin); |
| 5205 | 280 | |
| 281 | /** | |
| 282 | * Unloads the specified plugin. | |
| 283 | * | |
| 284 | * @param plugin The plugin handle. | |
| 285 | * | |
| 286 | * @return @c TRUE if successful, or @c FALSE otherwise. | |
| 287 | * | |
| 15884 | 288 | * @see purple_plugin_load() |
| 289 | * @see purple_plugin_reload() | |
| 5205 | 290 | */ |
| 15884 | 291 | gboolean purple_plugin_unload(PurplePlugin *plugin); |
| 5205 | 292 | |
| 293 | /** | |
|
20870
0a689ca1985e
* Add purple_plugin_disable() to prevent plugins from loading on the next
Richard Laager <rlaager@pidgin.im>
parents:
20866
diff
changeset
|
294 | * Disable a plugin. |
|
0a689ca1985e
* Add purple_plugin_disable() to prevent plugins from loading on the next
Richard Laager <rlaager@pidgin.im>
parents:
20866
diff
changeset
|
295 | * |
|
0a689ca1985e
* Add purple_plugin_disable() to prevent plugins from loading on the next
Richard Laager <rlaager@pidgin.im>
parents:
20866
diff
changeset
|
296 | * This function adds the plugin to a list of plugins to "disable at the next |
|
0a689ca1985e
* Add purple_plugin_disable() to prevent plugins from loading on the next
Richard Laager <rlaager@pidgin.im>
parents:
20866
diff
changeset
|
297 | * startup" by excluding said plugins from the list of plugins to save. The |
|
0a689ca1985e
* Add purple_plugin_disable() to prevent plugins from loading on the next
Richard Laager <rlaager@pidgin.im>
parents:
20866
diff
changeset
|
298 | * UI needs to call purple_plugins_save_loaded() after calling this for it |
|
0a689ca1985e
* Add purple_plugin_disable() to prevent plugins from loading on the next
Richard Laager <rlaager@pidgin.im>
parents:
20866
diff
changeset
|
299 | * to have any effect. |
|
0a689ca1985e
* Add purple_plugin_disable() to prevent plugins from loading on the next
Richard Laager <rlaager@pidgin.im>
parents:
20866
diff
changeset
|
300 | * |
|
0a689ca1985e
* Add purple_plugin_disable() to prevent plugins from loading on the next
Richard Laager <rlaager@pidgin.im>
parents:
20866
diff
changeset
|
301 | * @since 2.3.0 |
|
0a689ca1985e
* Add purple_plugin_disable() to prevent plugins from loading on the next
Richard Laager <rlaager@pidgin.im>
parents:
20866
diff
changeset
|
302 | */ |
|
0a689ca1985e
* Add purple_plugin_disable() to prevent plugins from loading on the next
Richard Laager <rlaager@pidgin.im>
parents:
20866
diff
changeset
|
303 | void purple_plugin_disable(PurplePlugin *plugin); |
|
0a689ca1985e
* Add purple_plugin_disable() to prevent plugins from loading on the next
Richard Laager <rlaager@pidgin.im>
parents:
20866
diff
changeset
|
304 | |
|
0a689ca1985e
* Add purple_plugin_disable() to prevent plugins from loading on the next
Richard Laager <rlaager@pidgin.im>
parents:
20866
diff
changeset
|
305 | /** |
| 5205 | 306 | * Reloads a plugin. |
| 307 | * | |
| 308 | * @param plugin The old plugin handle. | |
|
6486
18da8fdbc85b
[gaim-migrate @ 7000]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
309 | * |
| 5205 | 310 | * @return @c TRUE if successful, or @c FALSE otherwise. |
| 311 | * | |
| 15884 | 312 | * @see purple_plugin_load() |
| 313 | * @see purple_plugin_unload() | |
| 5205 | 314 | */ |
| 15884 | 315 | gboolean purple_plugin_reload(PurplePlugin *plugin); |
| 5205 | 316 | |
| 317 | /** | |
| 318 | * Unloads a plugin and destroys the structure from memory. | |
| 319 | * | |
| 320 | * @param plugin The plugin handle. | |
| 321 | */ | |
| 15884 | 322 | void purple_plugin_destroy(PurplePlugin *plugin); |
| 5205 | 323 | |
| 324 | /** | |
| 325 | * Returns whether or not a plugin is currently loaded. | |
| 326 | * | |
| 327 | * @param plugin The plugin. | |
| 328 | * | |
|
12695
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
329 | * @return @c TRUE if loaded, or @c FALSE otherwise. |
| 5205 | 330 | */ |
| 15884 | 331 | gboolean purple_plugin_is_loaded(const PurplePlugin *plugin); |
| 5205 | 332 | |
|
11772
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
333 | /** |
|
12695
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
334 | * Returns whether or not a plugin is unloadable. |
|
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
335 | * |
|
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
336 | * If this returns @c TRUE, the plugin is guaranteed to not |
|
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
337 | * be loadable. However, a return value of @c FALSE does not |
|
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
338 | * guarantee the plugin is loadable. |
|
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
339 | * |
|
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
340 | * @param plugin The plugin. |
|
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
341 | * |
|
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
342 | * @return @c TRUE if the plugin is known to be unloadable,\ |
|
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
343 | * @c FALSE otherwise |
|
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
344 | */ |
| 15884 | 345 | gboolean purple_plugin_is_unloadable(const PurplePlugin *plugin); |
|
12695
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
346 | |
|
0c93a42b7ee2
[gaim-migrate @ 15038]
Richard Laager <rlaager@pidgin.im>
parents:
12323
diff
changeset
|
347 | /** |
|
11772
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
348 | * Returns a plugin's id. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
349 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
350 | * @param plugin The plugin. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
351 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
352 | * @return The plugin's id. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
353 | */ |
| 15884 | 354 | const gchar *purple_plugin_get_id(const PurplePlugin *plugin); |
|
11772
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
355 | |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
356 | /** |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
357 | * Returns a plugin's name. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
358 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
359 | * @param plugin The plugin. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
360 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
361 | * @return THe name of the plugin, or @c NULL. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
362 | */ |
| 15884 | 363 | const gchar *purple_plugin_get_name(const PurplePlugin *plugin); |
|
11772
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
364 | |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
365 | /** |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
366 | * Returns a plugin's version. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
367 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
368 | * @param plugin The plugin. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
369 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
370 | * @return The plugin's version or @c NULL. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
371 | */ |
| 15884 | 372 | const gchar *purple_plugin_get_version(const PurplePlugin *plugin); |
|
11772
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
373 | |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
374 | /** |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
375 | * Returns a plugin's summary. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
376 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
377 | * @param plugin The plugin. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
378 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
379 | * @return The plugin's summary. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
380 | */ |
| 15884 | 381 | const gchar *purple_plugin_get_summary(const PurplePlugin *plugin); |
|
11772
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
382 | |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
383 | /** |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
384 | * Returns a plugin's description. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
385 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
386 | * @param plugin The plugin. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
387 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
388 | * @return The plugin's description. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
389 | */ |
| 15884 | 390 | const gchar *purple_plugin_get_description(const PurplePlugin *plugin); |
|
11772
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
391 | |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
392 | /** |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
393 | * Returns a plugin's author. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
394 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
395 | * @param plugin The plugin. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
396 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
397 | * @return The plugin's author. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
398 | */ |
| 15884 | 399 | const gchar *purple_plugin_get_author(const PurplePlugin *plugin); |
|
11772
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
400 | |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
401 | /** |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
402 | * Returns a plugin's homepage. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
403 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
404 | * @param plugin The plugin. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
405 | * |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
406 | * @return The plugin's homepage. |
|
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
407 | */ |
| 15884 | 408 | const gchar *purple_plugin_get_homepage(const PurplePlugin *plugin); |
|
11772
0124b31e896a
[gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents:
10759
diff
changeset
|
409 | |
| 5205 | 410 | /*@}*/ |
| 411 | ||
| 412 | /**************************************************************************/ | |
|
6822
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
413 | /** @name Plugin IPC API */ |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
414 | /**************************************************************************/ |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
415 | /*@{*/ |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
416 | |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
417 | /** |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
418 | * Registers an IPC command in a plugin. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
419 | * |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
420 | * @param plugin The plugin to register the command with. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
421 | * @param command The name of the command. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
422 | * @param func The function to execute. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
423 | * @param marshal The marshalling function. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
424 | * @param ret_value The return value type. |
|
7114
6e5e4e674496
[gaim-migrate @ 7681]
Christian Hammond <chipx86@chipx86.com>
parents:
7034
diff
changeset
|
425 | * @param num_params The number of parameters. |
|
6822
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
426 | * @param ... The parameter types. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
427 | * |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
428 | * @return TRUE if the function was registered successfully, or |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
429 | * FALSE otherwise. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
430 | */ |
| 15884 | 431 | gboolean purple_plugin_ipc_register(PurplePlugin *plugin, const char *command, |
| 432 | PurpleCallback func, | |
| 433 | PurpleSignalMarshalFunc marshal, | |
| 434 | PurpleValue *ret_value, int num_params, ...); | |
|
6822
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
435 | |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
436 | /** |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
437 | * Unregisters an IPC command in a plugin. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
438 | * |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
439 | * @param plugin The plugin to unregister the command from. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
440 | * @param command The name of the command. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
441 | */ |
| 15884 | 442 | void purple_plugin_ipc_unregister(PurplePlugin *plugin, const char *command); |
|
6822
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
443 | |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
444 | /** |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
445 | * Unregisters all IPC commands in a plugin. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
446 | * |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
447 | * @param plugin The plugin to unregister the commands from. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
448 | */ |
| 15884 | 449 | void purple_plugin_ipc_unregister_all(PurplePlugin *plugin); |
|
6822
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
450 | |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
451 | /** |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
452 | * Returns a list of value types used for an IPC command. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
453 | * |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
454 | * @param plugin The plugin. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
455 | * @param command The name of the command. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
456 | * @param ret_value The returned return value. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
457 | * @param num_params The returned number of parameters. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
458 | * @param params The returned list of parameters. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
459 | * |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
460 | * @return TRUE if the command was found, or FALSE otherwise. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
461 | */ |
| 15884 | 462 | gboolean purple_plugin_ipc_get_params(PurplePlugin *plugin, const char *command, |
| 463 | PurpleValue **ret_value, int *num_params, | |
| 464 | PurpleValue ***params); | |
|
6822
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
465 | |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
466 | /** |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
467 | * Executes an IPC command. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
468 | * |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
469 | * @param plugin The plugin to execute the command on. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
470 | * @param command The name of the command. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
471 | * @param ok TRUE if the call was successful, or FALSE otherwise. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
472 | * @param ... The parameters to pass. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
473 | * |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
474 | * @return The return value, which will be NULL if the command doesn't |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
475 | * return a value. |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
476 | */ |
| 15884 | 477 | void *purple_plugin_ipc_call(PurplePlugin *plugin, const char *command, |
|
6822
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
478 | gboolean *ok, ...); |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
479 | |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
480 | /*@}*/ |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
481 | |
|
4adcde13ad17
[gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
482 | /**************************************************************************/ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5840
diff
changeset
|
483 | /** @name Plugins API */ |
| 5205 | 484 | /**************************************************************************/ |
| 485 | /*@{*/ | |
| 486 | ||
| 487 | /** | |
|
10447
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
9946
diff
changeset
|
488 | * Add a new directory to search for plugins |
| 5205 | 489 | * |
|
10448
4415ffba12e9
[gaim-migrate @ 11713]
Mark Doliner <markdoliner@pidgin.im>
parents:
10447
diff
changeset
|
490 | * @param path The new search path. |
| 5205 | 491 | */ |
| 15884 | 492 | void purple_plugins_add_search_path(const char *path); |
| 5205 | 493 | |
| 494 | /** | |
|
5242
155da5e9bbf0
[gaim-migrate @ 5613]
Christian Hammond <chipx86@chipx86.com>
parents:
5224
diff
changeset
|
495 | * Unloads all loaded plugins. |
| 5205 | 496 | */ |
| 15884 | 497 | void purple_plugins_unload_all(void); |
| 5205 | 498 | |
|
5242
155da5e9bbf0
[gaim-migrate @ 5613]
Christian Hammond <chipx86@chipx86.com>
parents:
5224
diff
changeset
|
499 | /** |
|
155da5e9bbf0
[gaim-migrate @ 5613]
Christian Hammond <chipx86@chipx86.com>
parents:
5224
diff
changeset
|
500 | * Destroys all registered plugins. |
|
155da5e9bbf0
[gaim-migrate @ 5613]
Christian Hammond <chipx86@chipx86.com>
parents:
5224
diff
changeset
|
501 | */ |
| 15884 | 502 | void purple_plugins_destroy_all(void); |
|
5242
155da5e9bbf0
[gaim-migrate @ 5613]
Christian Hammond <chipx86@chipx86.com>
parents:
5224
diff
changeset
|
503 | |
| 5205 | 504 | /** |
| 15357 | 505 | * Saves the list of loaded plugins to the specified preference key |
| 506 | * | |
| 507 | * @param key The preference key to save the list of plugins to. | |
| 508 | */ | |
| 15884 | 509 | void purple_plugins_save_loaded(const char *key); |
| 15357 | 510 | |
| 511 | /** | |
|
5949
bb7cbf02dda9
[gaim-migrate @ 6393]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
512 | * Attempts to load all the plugins in the specified preference key |
| 15884 | 513 | * that were loaded when purple last quit. |
|
5949
bb7cbf02dda9
[gaim-migrate @ 6393]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
514 | * |
|
bb7cbf02dda9
[gaim-migrate @ 6393]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
515 | * @param key The preference key containing the list of plugins. |
| 5838 | 516 | */ |
| 15884 | 517 | void purple_plugins_load_saved(const char *key); |
| 5838 | 518 | |
| 519 | /** | |
| 5205 | 520 | * Probes for plugins in the registered module paths. |
| 521 | * | |
| 522 | * @param ext The extension type to probe for, or @c NULL for all. | |
| 523 | * | |
| 15884 | 524 | * @see purple_plugin_set_probe_path() |
| 5205 | 525 | */ |
| 15884 | 526 | void purple_plugins_probe(const char *ext); |
| 5205 | 527 | |
| 528 | /** | |
| 529 | * Returns whether or not plugin support is enabled. | |
| 530 | * | |
| 531 | * @return TRUE if plugin support is enabled, or FALSE otherwise. | |
| 532 | */ | |
| 15884 | 533 | gboolean purple_plugins_enabled(void); |
| 5205 | 534 | |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20807
diff
changeset
|
535 | #ifndef PURPLE_DISABLE_DEPRECATED |
| 5205 | 536 | /** |
| 537 | * Registers a function that will be called when probing is finished. | |
| 538 | * | |
| 539 | * @param func The callback function. | |
| 540 | * @param data Data to pass to the callback. | |
|
20807
e9749eea6a46
Deprecate the purple_plugins_register_* and purple_plugins_unregister_* functions. We have plugin-load and plugin-unload signals.
Richard Laager <rlaager@pidgin.im>
parents:
20147
diff
changeset
|
541 | * @deprecated If you need this, ask for a plugin-probe signal to be added. |
| 5205 | 542 | */ |
| 15884 | 543 | void purple_plugins_register_probe_notify_cb(void (*func)(void *), void *data); |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20807
diff
changeset
|
544 | #endif |
| 5205 | 545 | |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20807
diff
changeset
|
546 | #ifndef PURPLE_DISABLE_DEPRECATED |
| 5205 | 547 | /** |
| 548 | * Unregisters a function that would be called when probing is finished. | |
| 549 | * | |
| 550 | * @param func The callback function. | |
|
20807
e9749eea6a46
Deprecate the purple_plugins_register_* and purple_plugins_unregister_* functions. We have plugin-load and plugin-unload signals.
Richard Laager <rlaager@pidgin.im>
parents:
20147
diff
changeset
|
551 | * @deprecated If you need this, ask for a plugin-probe signal to be added. |
| 5205 | 552 | */ |
| 15884 | 553 | void purple_plugins_unregister_probe_notify_cb(void (*func)(void *)); |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20807
diff
changeset
|
554 | #endif |
| 5205 | 555 | |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20807
diff
changeset
|
556 | #ifndef PURPLE_DISABLE_DEPRECATED |
| 5205 | 557 | /** |
| 558 | * Registers a function that will be called when a plugin is loaded. | |
| 559 | * | |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8713
diff
changeset
|
560 | * @param func The callback function. |
| 5205 | 561 | * @param data Data to pass to the callback. |
|
20807
e9749eea6a46
Deprecate the purple_plugins_register_* and purple_plugins_unregister_* functions. We have plugin-load and plugin-unload signals.
Richard Laager <rlaager@pidgin.im>
parents:
20147
diff
changeset
|
562 | * @deprecated Use the plugin-load signal instead. |
| 5205 | 563 | */ |
| 15884 | 564 | void purple_plugins_register_load_notify_cb(void (*func)(PurplePlugin *, void *), |
| 5205 | 565 | void *data); |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20807
diff
changeset
|
566 | #endif |
| 5205 | 567 | |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20807
diff
changeset
|
568 | #ifndef PURPLE_DISABLE_DEPRECATED |
| 5205 | 569 | /** |
| 570 | * Unregisters a function that would be called when a plugin is loaded. | |
| 571 | * | |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8713
diff
changeset
|
572 | * @param func The callback function. |
|
20807
e9749eea6a46
Deprecate the purple_plugins_register_* and purple_plugins_unregister_* functions. We have plugin-load and plugin-unload signals.
Richard Laager <rlaager@pidgin.im>
parents:
20147
diff
changeset
|
573 | * @deprecated Use the plugin-load signal instead. |
| 5205 | 574 | */ |
| 15884 | 575 | void purple_plugins_unregister_load_notify_cb(void (*func)(PurplePlugin *, void *)); |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20807
diff
changeset
|
576 | #endif |
| 5205 | 577 | |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20807
diff
changeset
|
578 | #ifndef PURPLE_DISABLE_DEPRECATED |
| 5205 | 579 | /** |
| 580 | * Registers a function that will be called when a plugin is unloaded. | |
| 581 | * | |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8713
diff
changeset
|
582 | * @param func The callback function. |
| 5205 | 583 | * @param data Data to pass to the callback. |
|
20807
e9749eea6a46
Deprecate the purple_plugins_register_* and purple_plugins_unregister_* functions. We have plugin-load and plugin-unload signals.
Richard Laager <rlaager@pidgin.im>
parents:
20147
diff
changeset
|
584 | * @deprecated Use the plugin-unload signal instead. |
| 5205 | 585 | */ |
| 15884 | 586 | void purple_plugins_register_unload_notify_cb(void (*func)(PurplePlugin *, void *), |
| 5205 | 587 | void *data); |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20807
diff
changeset
|
588 | #endif |
| 5205 | 589 | |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20807
diff
changeset
|
590 | #ifndef PURPLE_DISABLE_DEPRECATED |
| 5205 | 591 | /** |
| 592 | * Unregisters a function that would be called when a plugin is unloaded. | |
| 593 | * | |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8713
diff
changeset
|
594 | * @param func The callback function. |
|
20807
e9749eea6a46
Deprecate the purple_plugins_register_* and purple_plugins_unregister_* functions. We have plugin-load and plugin-unload signals.
Richard Laager <rlaager@pidgin.im>
parents:
20147
diff
changeset
|
595 | * @deprecated Use the plugin-unload signal instead. |
| 5205 | 596 | */ |
| 15884 | 597 | void purple_plugins_unregister_unload_notify_cb(void (*func)(PurplePlugin *, |
| 5205 | 598 | void *)); |
|
20808
e3524e9d502c
Honor a PURPLE_DISABLE_DEPRECATED define to allow plugins to catch
Richard Laager <rlaager@pidgin.im>
parents:
20807
diff
changeset
|
599 | #endif |
| 5205 | 600 | |
| 601 | /** | |
| 602 | * Finds a plugin with the specified name. | |
| 603 | * | |
| 604 | * @param name The plugin name. | |
| 605 | * | |
| 606 | * @return The plugin if found, or @c NULL if not found. | |
| 607 | */ | |
| 15884 | 608 | PurplePlugin *purple_plugins_find_with_name(const char *name); |
| 5205 | 609 | |
| 610 | /** | |
|
7034
b1d44fe5f072
[gaim-migrate @ 7597]
Christian Hammond <chipx86@chipx86.com>
parents:
7033
diff
changeset
|
611 | * Finds a plugin with the specified filename (filename with a path). |
| 5205 | 612 | * |
| 613 | * @param filename The plugin filename. | |
| 614 | * | |
| 615 | * @return The plugin if found, or @c NULL if not found. | |
| 616 | */ | |
| 15884 | 617 | PurplePlugin *purple_plugins_find_with_filename(const char *filename); |
| 5205 | 618 | |
| 619 | /** | |
|
7034
b1d44fe5f072
[gaim-migrate @ 7597]
Christian Hammond <chipx86@chipx86.com>
parents:
7033
diff
changeset
|
620 | * Finds a plugin with the specified basename (filename without a path). |
|
7033
f6096f69a11e
[gaim-migrate @ 7596]
Robert McQueen <robot101@debian.org>
parents:
6928
diff
changeset
|
621 | * |
|
7034
b1d44fe5f072
[gaim-migrate @ 7597]
Christian Hammond <chipx86@chipx86.com>
parents:
7033
diff
changeset
|
622 | * @param basename The plugin basename. |
|
7033
f6096f69a11e
[gaim-migrate @ 7596]
Robert McQueen <robot101@debian.org>
parents:
6928
diff
changeset
|
623 | * |
|
f6096f69a11e
[gaim-migrate @ 7596]
Robert McQueen <robot101@debian.org>
parents:
6928
diff
changeset
|
624 | * @return The plugin if found, or @c NULL if not found. |
|
f6096f69a11e
[gaim-migrate @ 7596]
Robert McQueen <robot101@debian.org>
parents:
6928
diff
changeset
|
625 | */ |
| 15884 | 626 | PurplePlugin *purple_plugins_find_with_basename(const char *basename); |
|
7033
f6096f69a11e
[gaim-migrate @ 7596]
Robert McQueen <robot101@debian.org>
parents:
6928
diff
changeset
|
627 | |
|
f6096f69a11e
[gaim-migrate @ 7596]
Robert McQueen <robot101@debian.org>
parents:
6928
diff
changeset
|
628 | /** |
| 5205 | 629 | * Finds a plugin with the specified plugin ID. |
| 630 | * | |
| 631 | * @param id The plugin ID. | |
| 632 | * | |
| 633 | * @return The plugin if found, or @c NULL if not found. | |
| 634 | */ | |
| 15884 | 635 | PurplePlugin *purple_plugins_find_with_id(const char *id); |
| 5205 | 636 | |
| 637 | /** | |
| 638 | * Returns a list of all loaded plugins. | |
| 639 | * | |
|
20971
b5e1eb080f33
Replace a bunch of @return markers with @constreturn markers. I believe these
Etan Reisner <deryni@pidgin.im>
parents:
20889
diff
changeset
|
640 | * @constreturn A list of all loaded plugins. |
| 5205 | 641 | */ |
| 15884 | 642 | GList *purple_plugins_get_loaded(void); |
| 5205 | 643 | |
| 644 | /** | |
|
11950
a522c2da66e5
[gaim-migrate @ 14241]
Evan Schoenberg <evands@pidgin.im>
parents:
11817
diff
changeset
|
645 | * Returns a list of all valid protocol plugins. A protocol |
|
a522c2da66e5
[gaim-migrate @ 14241]
Evan Schoenberg <evands@pidgin.im>
parents:
11817
diff
changeset
|
646 | * plugin is considered invalid if it does not contain the call |
| 15884 | 647 | * to the PURPLE_INIT_PLUGIN() macro, or if it was compiled |
|
11950
a522c2da66e5
[gaim-migrate @ 14241]
Evan Schoenberg <evands@pidgin.im>
parents:
11817
diff
changeset
|
648 | * against an incompatable API version. |
|
5573
633880e3f137
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5449
diff
changeset
|
649 | * |
|
20971
b5e1eb080f33
Replace a bunch of @return markers with @constreturn markers. I believe these
Etan Reisner <deryni@pidgin.im>
parents:
20889
diff
changeset
|
650 | * @constreturn A list of all protocol plugins. |
|
5573
633880e3f137
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5449
diff
changeset
|
651 | */ |
| 15884 | 652 | GList *purple_plugins_get_protocols(void); |
|
5573
633880e3f137
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5449
diff
changeset
|
653 | |
|
633880e3f137
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5449
diff
changeset
|
654 | /** |
| 5205 | 655 | * Returns a list of all plugins, whether loaded or not. |
| 656 | * | |
|
20971
b5e1eb080f33
Replace a bunch of @return markers with @constreturn markers. I believe these
Etan Reisner <deryni@pidgin.im>
parents:
20889
diff
changeset
|
657 | * @constreturn A list of all plugins. |
| 5205 | 658 | */ |
| 15884 | 659 | GList *purple_plugins_get_all(void); |
| 5205 | 660 | |
| 661 | /*@}*/ | |
| 662 | ||
| 10479 | 663 | /**************************************************************************/ |
| 664 | /** @name Plugins SubSytem API */ | |
| 665 | /**************************************************************************/ | |
| 666 | /*@{*/ | |
| 667 | ||
| 668 | /** | |
| 669 | * Returns the plugin subsystem handle. | |
| 670 | * | |
| 671 | * @return The plugin sybsystem handle. | |
| 672 | */ | |
| 15884 | 673 | void *purple_plugins_get_handle(void); |
| 10479 | 674 | |
| 675 | /** | |
| 676 | * Initializes the plugin subsystem | |
| 677 | */ | |
| 15884 | 678 | void purple_plugins_init(void); |
| 10479 | 679 | |
| 680 | /** | |
| 681 | * Uninitializes the plugin subsystem | |
| 682 | */ | |
| 15884 | 683 | void purple_plugins_uninit(void); |
| 10479 | 684 | |
| 685 | /*@}*/ | |
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
686 | |
|
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
687 | /** |
| 15884 | 688 | * Allocates and returns a new PurplePluginAction. |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12986
diff
changeset
|
689 | * |
|
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12986
diff
changeset
|
690 | * @param label The description of the action to show to the user. |
|
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12986
diff
changeset
|
691 | * @param callback The callback to call when the user selects this action. |
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
692 | */ |
| 15884 | 693 | PurplePluginAction *purple_plugin_action_new(const char* label, void (*callback)(PurplePluginAction *)); |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12986
diff
changeset
|
694 | |
|
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12986
diff
changeset
|
695 | /** |
| 15884 | 696 | * Frees a PurplePluginAction |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12986
diff
changeset
|
697 | * |
| 15884 | 698 | * @param action The PurplePluginAction to free. |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12986
diff
changeset
|
699 | */ |
| 15884 | 700 | void purple_plugin_action_free(PurplePluginAction *action); |
|
9015
3c27e9074fa2
[gaim-migrate @ 9791]
Christopher O'Brien <siege@pidgin.im>
parents:
8990
diff
changeset
|
701 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5840
diff
changeset
|
702 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5840
diff
changeset
|
703 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5840
diff
changeset
|
704 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5840
diff
changeset
|
705 | |
| 15884 | 706 | #endif /* _PURPLE_PLUGIN_H_ */ |