annotate src/plugin.h @ 13974:e757e5d04846

[gaim-migrate @ 16532] On my system and in all the documentation I can find, the tm_zone field of the tm struct, if present, is a (char *), not a (const char *). This fixes two (harmless) compilation warnings resulting from the cast to (const char *). committer: Tailor Script <tailor@pidgin.im>
author Evan Schoenberg <evan.s@dreskin.net>
date Thu, 20 Jul 2006 18:54:26 +0000
parents f0577a01b2cf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file plugin.h Plugin API
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 * @ingroup core
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 * gaim
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 *
8046
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 8028
diff changeset
7 * Gaim is the legal property of its developers, whose names are too numerous
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 8028
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 8028
diff changeset
9 * source distribution.
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 5949
diff changeset
10 *
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * (at your option) any later version.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * GNU General Public License for more details.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 #ifndef _GAIM_PLUGIN_H_
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26 #define _GAIM_PLUGIN_H_
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
27
8986
8cf32769ba1b [gaim-migrate @ 9761]
Luke Schierer <lschiere@pidgin.im>
parents: 8814
diff changeset
28 #include <glib/glist.h>
5224
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5205
diff changeset
29 #include <gmodule.h>
6822
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
30 #include "signals.h"
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
31 #include "value.h"
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32
8749
d7b8eb1f0a18 [gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents: 8735
diff changeset
33 typedef struct _GaimPlugin GaimPlugin;
d7b8eb1f0a18 [gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents: 8735
diff changeset
34 typedef struct _GaimPluginInfo GaimPluginInfo;
d7b8eb1f0a18 [gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents: 8735
diff changeset
35 typedef struct _GaimPluginUiInfo GaimPluginUiInfo;
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36 typedef struct _GaimPluginLoaderInfo GaimPluginLoaderInfo;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37
9015
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
38 typedef struct _GaimPluginAction GaimPluginAction;
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
39
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40 typedef int GaimPluginPriority; /**< Plugin priority. */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41
8713
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents: 8082
diff changeset
42 #include "pluginpref.h"
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents: 8082
diff changeset
43
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45 * Plugin types.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46 */
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
47 typedef enum
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48 {
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49 GAIM_PLUGIN_UNKNOWN = -1, /**< Unknown type. */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50 GAIM_PLUGIN_STANDARD = 0, /**< Standard plugin. */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 GAIM_PLUGIN_LOADER, /**< Loader plugin. */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 GAIM_PLUGIN_PROTOCOL /**< Protocol plugin. */
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
53
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
54 } GaimPluginType;
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56 #define GAIM_PRIORITY_DEFAULT 0
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57 #define GAIM_PRIORITY_HIGHEST 9999
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
58 #define GAIM_PRIORITY_LOWEST -9999
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59
6928
6ed0a1c045b4 [gaim-migrate @ 7475]
Christian Hammond <chipx86@chipx86.com>
parents: 6822
diff changeset
60 #define GAIM_PLUGIN_FLAG_INVISIBLE 0x01
6ed0a1c045b4 [gaim-migrate @ 7475]
Christian Hammond <chipx86@chipx86.com>
parents: 6822
diff changeset
61
9946
fae50349fd42 [gaim-migrate @ 10841]
Nathan Walp <nwalp@pidgin.im>
parents: 9943
diff changeset
62 #define GAIM_PLUGIN_MAGIC 5 /* once we hit 6.0.0 I think we can remove this */
8749
d7b8eb1f0a18 [gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents: 8735
diff changeset
63
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 * Detailed information about a plugin.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67 * This is used in the version 2.0 API and up.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68 */
12986
4e9935a539db [gaim-migrate @ 15339]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12926
diff changeset
69 /* TODO We need to figure out exactly what parts of this are required. The
4e9935a539db [gaim-migrate @ 15339]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12926
diff changeset
70 * dependent plugin unloading stuff was causing crashes with perl and tcl
4e9935a539db [gaim-migrate @ 15339]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12926
diff changeset
71 * plugins because they didn't set ids and the dependency code was requiring
4e9935a539db [gaim-migrate @ 15339]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12926
diff changeset
72 * them. Then we need to actually make sure that plugins have all the right
4e9935a539db [gaim-migrate @ 15339]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12926
diff changeset
73 * parts before loading them. */
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
74 struct _GaimPluginInfo
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75 {
9943
f8e395a054e2 [gaim-migrate @ 10835]
Nathan Walp <nwalp@pidgin.im>
parents: 9015
diff changeset
76 unsigned int magic;
f8e395a054e2 [gaim-migrate @ 10835]
Nathan Walp <nwalp@pidgin.im>
parents: 9015
diff changeset
77 unsigned int major_version;
f8e395a054e2 [gaim-migrate @ 10835]
Nathan Walp <nwalp@pidgin.im>
parents: 9015
diff changeset
78 unsigned int minor_version;
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79 GaimPluginType type;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 char *ui_requirement;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81 unsigned long flags;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
82 GList *dependencies;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
83 GaimPluginPriority priority;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
84
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
85 char *id;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86 char *name;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
87 char *version;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
88 char *summary;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
89 char *description;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
90 char *author;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
91 char *homepage;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
92
11963
d8787960e398 [gaim-migrate @ 14254]
Mark Doliner <mark@kingant.net>
parents: 11950
diff changeset
93 /**
d8787960e398 [gaim-migrate @ 14254]
Mark Doliner <mark@kingant.net>
parents: 11950
diff changeset
94 * If a plugin defines a 'load' function, and it returns FALSE,
d8787960e398 [gaim-migrate @ 14254]
Mark Doliner <mark@kingant.net>
parents: 11950
diff changeset
95 * then the plugin will not be loaded.
10450
577fdf4110fc [gaim-migrate @ 11715]
Mark Doliner <mark@kingant.net>
parents: 10448
diff changeset
96 */
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97 gboolean (*load)(GaimPlugin *plugin);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
98 gboolean (*unload)(GaimPlugin *plugin);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
99 void (*destroy)(GaimPlugin *plugin);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
100
11817
1bb0efbd4394 [gaim-migrate @ 14108]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11772
diff changeset
101 void *ui_info; /**< Used only by UI-specific plugins to build a preference screen with a custom UI */
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
102 void *extra_info;
11817
1bb0efbd4394 [gaim-migrate @ 14108]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11772
diff changeset
103 GaimPluginUiInfo *prefs_info; /**< Used by any plugin to display preferences. If #ui_info has been specified, this will be ignored. */
9015
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
104 GList *(*actions)(GaimPlugin *plugin, gpointer context);
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
105 };
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
106
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
107 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
108 * Extra information for loader plugins.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
109 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
110 struct _GaimPluginLoaderInfo
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
111 {
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
112 GList *exts;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
113
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
114 gboolean (*probe)(GaimPlugin *plugin);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
115 gboolean (*load)(GaimPlugin *plugin);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
116 gboolean (*unload)(GaimPlugin *plugin);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
117 void (*destroy)(GaimPlugin *plugin);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
118 };
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
119
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
120 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
121 * A plugin handle.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
122 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123 struct _GaimPlugin
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
124 {
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
125 gboolean native_plugin; /**< Native C plugin. */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
126 gboolean loaded; /**< The loaded state. */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
127 void *handle; /**< The module handle. */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
128 char *path; /**< The path to the plugin. */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
129 GaimPluginInfo *info; /**< The plugin information. */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130 char *error;
6822
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
131 void *ipc_data; /**< IPC data. */
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
132 void *extra; /**< Plugin-specific data. */
12695
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
133 gboolean unloadable; /**< Unloadable */
12926
2c4f20ff387c [gaim-migrate @ 15279]
Richard Laager <rlaager@wiktel.com>
parents: 12695
diff changeset
134 GList *dependent_plugins; /**< Plugins depending on this */
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
135 };
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
137 #define GAIM_PLUGIN_LOADER_INFO(plugin) \
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
138 ((GaimPluginLoaderInfo *)(plugin)->info->extra_info)
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139
8713
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents: 8082
diff changeset
140 struct _GaimPluginUiInfo {
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents: 8082
diff changeset
141 GaimPluginPrefFrame *(*get_plugin_pref_frame)(GaimPlugin *plugin);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents: 8082
diff changeset
142
10759
56915e1b3ba3 [gaim-migrate @ 12362]
Mark Doliner <mark@kingant.net>
parents: 10710
diff changeset
143 int page_num; /**< Reserved */
8814
c61be128dff3 [gaim-migrate @ 9576]
Ethan Blanton <elb@pidgin.im>
parents: 8749
diff changeset
144 GaimPluginPrefFrame *frame; /**< Reserved */
8713
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents: 8082
diff changeset
145 };
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents: 8082
diff changeset
146
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents: 8082
diff changeset
147 #define GAIM_PLUGIN_HAS_PREF_FRAME(plugin) \
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents: 8082
diff changeset
148 ((plugin)->info != NULL && (plugin)->info->prefs_info != NULL)
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents: 8082
diff changeset
149
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents: 8082
diff changeset
150 #define GAIM_PLUGIN_UI_INFO(plugin) \
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents: 8082
diff changeset
151 ((GaimPluginUiInfo*)(plugin)->info->prefs_info)
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents: 8082
diff changeset
152
9015
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
153
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
154 /**
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
155 * The structure used in the actions member of GaimPluginInfo
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
156 */
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
157 struct _GaimPluginAction {
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
158 char *label;
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
159 void (*callback)(GaimPluginAction *);
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
160
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
161 /** set to the owning plugin */
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
162 GaimPlugin *plugin;
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
163
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
164 /** NULL for plugin actions menu, set to the GaimConnection for
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
165 account actions menu */
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
166 gpointer context;
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
167 };
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
168
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
169 #define GAIM_PLUGIN_HAS_ACTIONS(plugin) \
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
170 ((plugin)->info != NULL && (plugin)->info->actions != NULL)
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
171
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
172 #define GAIM_PLUGIN_ACTIONS(plugin, context) \
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
173 (GAIM_PLUGIN_HAS_ACTIONS(plugin)? \
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
174 (plugin)->info->actions(plugin, context): NULL)
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
175
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
176
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
177 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
178 * Handles the initialization of modules.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
179 */
8082
6b1ecf40f3ba [gaim-migrate @ 8781]
Nathan Walp <nwalp@pidgin.im>
parents: 8081
diff changeset
180 #if !defined(GAIM_PLUGINS) || defined(GAIM_STATIC_PRPL)
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
181 # define GAIM_INIT_PLUGIN(pluginname, initfunc, plugininfo) \
12323
fc464a0abccc [gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents: 12066
diff changeset
182 gboolean gaim_init_##pluginname##_plugin(void);\
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
183 gboolean gaim_init_##pluginname##_plugin(void) { \
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
184 GaimPlugin *plugin = gaim_plugin_new(TRUE, NULL); \
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
185 plugin->info = &(plugininfo); \
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
186 initfunc((plugin)); \
13166
f0577a01b2cf [gaim-migrate @ 15529]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13106
diff changeset
187 gaim_plugin_load((plugin)); \
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
188 return gaim_plugin_register(plugin); \
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
189 }
8082
6b1ecf40f3ba [gaim-migrate @ 8781]
Nathan Walp <nwalp@pidgin.im>
parents: 8081
diff changeset
190 #else /* GAIM_PLUGINS && !GAIM_STATIC_PRPL */
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
191 # define GAIM_INIT_PLUGIN(pluginname, initfunc, plugininfo) \
12323
fc464a0abccc [gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents: 12066
diff changeset
192 G_MODULE_EXPORT gboolean gaim_init_plugin(GaimPlugin *plugin); \
5224
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5205
diff changeset
193 G_MODULE_EXPORT gboolean gaim_init_plugin(GaimPlugin *plugin) { \
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
194 plugin->info = &(plugininfo); \
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
195 initfunc((plugin)); \
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
196 return gaim_plugin_register(plugin); \
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
197 }
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
198 #endif
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
199
9015
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
200
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
201 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
202 extern "C" {
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
203 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
204
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
205 /**************************************************************************/
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
206 /** @name Plugin API */
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
207 /**************************************************************************/
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
208 /*@{*/
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
209
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
210 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
211 * Creates a new plugin structure.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
212 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
213 * @param native Whether or not the plugin is native.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
214 * @param path The path to the plugin, or @c NULL if statically compiled.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
215 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
216 * @return A new GaimPlugin structure.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
217 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
218 GaimPlugin *gaim_plugin_new(gboolean native, const char *path);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
219
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
220 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
221 * Probes a plugin, retrieving the information on it and adding it to the
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
222 * list of available plugins.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
223 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
224 * @param filename The plugin's filename.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
225 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
226 * @return The plugin handle.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
227 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
228 * @see gaim_plugin_load()
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
229 * @see gaim_plugin_destroy()
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
230 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
231 GaimPlugin *gaim_plugin_probe(const char *filename);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
232
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
233 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
234 * Registers a plugin and prepares it for loading.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
235 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
236 * This shouldn't be called by anything but the internal module code.
10447
6feef0a9098a [gaim-migrate @ 11712]
Mark Doliner <mark@kingant.net>
parents: 9946
diff changeset
237 * Plugins should use the GAIM_INIT_PLUGIN() macro to register themselves
6feef0a9098a [gaim-migrate @ 11712]
Mark Doliner <mark@kingant.net>
parents: 9946
diff changeset
238 * with the core.
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
239 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
240 * @param plugin The plugin to register.
10447
6feef0a9098a [gaim-migrate @ 11712]
Mark Doliner <mark@kingant.net>
parents: 9946
diff changeset
241 *
6feef0a9098a [gaim-migrate @ 11712]
Mark Doliner <mark@kingant.net>
parents: 9946
diff changeset
242 * @return @c TRUE if the plugin was registered successfully. Otherwise
6feef0a9098a [gaim-migrate @ 11712]
Mark Doliner <mark@kingant.net>
parents: 9946
diff changeset
243 * @c FALSE is returned (this happens if the plugin does not contain
6feef0a9098a [gaim-migrate @ 11712]
Mark Doliner <mark@kingant.net>
parents: 9946
diff changeset
244 * the necessary information).
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
245 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
246 gboolean gaim_plugin_register(GaimPlugin *plugin);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
247
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
248 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
249 * Attempts to load a previously probed plugin.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
250 *
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6486
diff changeset
251 * @param plugin The plugin to load.
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
252 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
253 * @return @c TRUE if successful, or @c FALSE otherwise.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
254 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
255 * @see gaim_plugin_reload()
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
256 * @see gaim_plugin_unload()
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
257 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
258 gboolean gaim_plugin_load(GaimPlugin *plugin);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
259
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
260 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
261 * Unloads the specified plugin.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
262 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
263 * @param plugin The plugin handle.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
264 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
265 * @return @c TRUE if successful, or @c FALSE otherwise.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
266 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
267 * @see gaim_plugin_load()
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
268 * @see gaim_plugin_reload()
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
269 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
270 gboolean gaim_plugin_unload(GaimPlugin *plugin);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
271
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
272 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
273 * Reloads a plugin.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
274 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
275 * @param plugin The old plugin handle.
6486
fab81e4b885c [gaim-migrate @ 7000]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
276 *
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
277 * @return @c TRUE if successful, or @c FALSE otherwise.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
278 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
279 * @see gaim_plugin_load()
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
280 * @see gaim_plugin_unload()
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
281 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
282 gboolean gaim_plugin_reload(GaimPlugin *plugin);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
283
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
284 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
285 * Unloads a plugin and destroys the structure from memory.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
286 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
287 * @param plugin The plugin handle.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
288 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
289 void gaim_plugin_destroy(GaimPlugin *plugin);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
290
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
291 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
292 * Returns whether or not a plugin is currently loaded.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
293 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
294 * @param plugin The plugin.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
295 *
12695
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
296 * @return @c TRUE if loaded, or @c FALSE otherwise.
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
297 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
298 gboolean gaim_plugin_is_loaded(const GaimPlugin *plugin);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
299
11772
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
300 /**
12695
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
301 * Returns whether or not a plugin is unloadable.
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
302 *
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
303 * If this returns @c TRUE, the plugin is guaranteed to not
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
304 * be loadable. However, a return value of @c FALSE does not
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
305 * guarantee the plugin is loadable.
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
306 *
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
307 * @param plugin The plugin.
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
308 *
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
309 * @return @c TRUE if the plugin is known to be unloadable,\
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
310 * @c FALSE otherwise
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
311 */
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
312 gboolean gaim_plugin_is_unloadable(const GaimPlugin *plugin);
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
313
0bc110c7ab91 [gaim-migrate @ 15038]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
314 /**
11772
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
315 * Returns a plugin's id.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
316 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
317 * @param plugin The plugin.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
318 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
319 * @return The plugin's id.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
320 */
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
321 const gchar *gaim_plugin_get_id(const GaimPlugin *plugin);
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
322
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
323 /**
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
324 * Returns a plugin's name.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
325 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
326 * @param plugin The plugin.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
327 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
328 * @return THe name of the plugin, or @c NULL.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
329 */
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
330 const gchar *gaim_plugin_get_name(const GaimPlugin *plugin);
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
331
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
332 /**
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
333 * Returns a plugin's version.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
334 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
335 * @param plugin The plugin.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
336 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
337 * @return The plugin's version or @c NULL.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
338 */
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
339 const gchar *gaim_plugin_get_version(const GaimPlugin *plugin);
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
340
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
341 /**
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
342 * Returns a plugin's summary.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
343 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
344 * @param plugin The plugin.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
345 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
346 * @return The plugin's summary.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
347 */
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
348 const gchar *gaim_plugin_get_summary(const GaimPlugin *plugin);
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
349
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
350 /**
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
351 * Returns a plugin's description.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
352 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
353 * @param plugin The plugin.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
354 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
355 * @return The plugin's description.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
356 */
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
357 const gchar *gaim_plugin_get_description(const GaimPlugin *plugin);
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
358
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
359 /**
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
360 * Returns a plugin's author.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
361 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
362 * @param plugin The plugin.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
363 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
364 * @return The plugin's author.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
365 */
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
366 const gchar *gaim_plugin_get_author(const GaimPlugin *plugin);
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
367
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
368 /**
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
369 * Returns a plugin's homepage.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
370 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
371 * @param plugin The plugin.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
372 *
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
373 * @return The plugin's homepage.
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
374 */
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
375 const gchar *gaim_plugin_get_homepage(const GaimPlugin *plugin);
d1d5f27de95d [gaim-migrate @ 14063]
Gary Kramlich <grim@reaperworld.com>
parents: 10759
diff changeset
376
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
377 /*@}*/
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
378
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
379 /**************************************************************************/
6822
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
380 /** @name Plugin IPC API */
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
381 /**************************************************************************/
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
382 /*@{*/
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
383
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
384 /**
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
385 * Registers an IPC command in a plugin.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
386 *
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
387 * @param plugin The plugin to register the command with.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
388 * @param command The name of the command.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
389 * @param func The function to execute.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
390 * @param marshal The marshalling function.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
391 * @param ret_value The return value type.
7114
c47633e9e2a4 [gaim-migrate @ 7681]
Christian Hammond <chipx86@chipx86.com>
parents: 7034
diff changeset
392 * @param num_params The number of parameters.
6822
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
393 * @param ... The parameter types.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
394 *
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
395 * @return TRUE if the function was registered successfully, or
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
396 * FALSE otherwise.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
397 */
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
398 gboolean gaim_plugin_ipc_register(GaimPlugin *plugin, const char *command,
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
399 GaimCallback func,
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
400 GaimSignalMarshalFunc marshal,
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
401 GaimValue *ret_value, int num_params, ...);
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
402
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
403 /**
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
404 * Unregisters an IPC command in a plugin.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
405 *
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
406 * @param plugin The plugin to unregister the command from.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
407 * @param command The name of the command.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
408 */
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
409 void gaim_plugin_ipc_unregister(GaimPlugin *plugin, const char *command);
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
410
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
411 /**
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
412 * Unregisters all IPC commands in a plugin.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
413 *
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
414 * @param plugin The plugin to unregister the commands from.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
415 */
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
416 void gaim_plugin_ipc_unregister_all(GaimPlugin *plugin);
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
417
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
418 /**
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
419 * Returns a list of value types used for an IPC command.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
420 *
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
421 * @param plugin The plugin.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
422 * @param command The name of the command.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
423 * @param ret_value The returned return value.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
424 * @param num_params The returned number of parameters.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
425 * @param params The returned list of parameters.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
426 *
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
427 * @return TRUE if the command was found, or FALSE otherwise.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
428 */
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
429 gboolean gaim_plugin_ipc_get_params(GaimPlugin *plugin, const char *command,
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
430 GaimValue **ret_value, int *num_params,
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
431 GaimValue ***params);
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
432
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
433 /**
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
434 * Executes an IPC command.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
435 *
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
436 * @param plugin The plugin to execute the command on.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
437 * @param command The name of the command.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
438 * @param ok TRUE if the call was successful, or FALSE otherwise.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
439 * @param ... The parameters to pass.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
440 *
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
441 * @return The return value, which will be NULL if the command doesn't
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
442 * return a value.
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
443 */
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
444 void *gaim_plugin_ipc_call(GaimPlugin *plugin, const char *command,
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
445 gboolean *ok, ...);
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
446
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
447 /*@}*/
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
448
7dba3e17cb21 [gaim-migrate @ 7366]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
449 /**************************************************************************/
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
450 /** @name Plugins API */
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
451 /**************************************************************************/
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
452 /*@{*/
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
453
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
454 /**
10447
6feef0a9098a [gaim-migrate @ 11712]
Mark Doliner <mark@kingant.net>
parents: 9946
diff changeset
455 * Add a new directory to search for plugins
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
456 *
10448
6a20307ef8dc [gaim-migrate @ 11713]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
457 * @param path The new search path.
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
458 */
10447
6feef0a9098a [gaim-migrate @ 11712]
Mark Doliner <mark@kingant.net>
parents: 9946
diff changeset
459 void gaim_plugins_add_search_path(const char *path);
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
460
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
461 /**
5242
fd81a00480ac [gaim-migrate @ 5613]
Christian Hammond <chipx86@chipx86.com>
parents: 5224
diff changeset
462 * Unloads all loaded plugins.
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
463 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
464 void gaim_plugins_unload_all(void);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
465
5242
fd81a00480ac [gaim-migrate @ 5613]
Christian Hammond <chipx86@chipx86.com>
parents: 5224
diff changeset
466 /**
fd81a00480ac [gaim-migrate @ 5613]
Christian Hammond <chipx86@chipx86.com>
parents: 5224
diff changeset
467 * Destroys all registered plugins.
fd81a00480ac [gaim-migrate @ 5613]
Christian Hammond <chipx86@chipx86.com>
parents: 5224
diff changeset
468 */
fd81a00480ac [gaim-migrate @ 5613]
Christian Hammond <chipx86@chipx86.com>
parents: 5224
diff changeset
469 void gaim_plugins_destroy_all(void);
fd81a00480ac [gaim-migrate @ 5613]
Christian Hammond <chipx86@chipx86.com>
parents: 5224
diff changeset
470
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
471 /**
5949
90d0849abd3c [gaim-migrate @ 6393]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
472 * Attempts to load all the plugins in the specified preference key
90d0849abd3c [gaim-migrate @ 6393]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
473 * that were loaded when gaim last quit.
90d0849abd3c [gaim-migrate @ 6393]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
474 *
90d0849abd3c [gaim-migrate @ 6393]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
475 * @param key The preference key containing the list of plugins.
5838
6aa7651c7c15 [gaim-migrate @ 6269]
Nathan Walp <nwalp@pidgin.im>
parents: 5573
diff changeset
476 */
5949
90d0849abd3c [gaim-migrate @ 6393]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
477 void gaim_plugins_load_saved(const char *key);
5838
6aa7651c7c15 [gaim-migrate @ 6269]
Nathan Walp <nwalp@pidgin.im>
parents: 5573
diff changeset
478
6aa7651c7c15 [gaim-migrate @ 6269]
Nathan Walp <nwalp@pidgin.im>
parents: 5573
diff changeset
479 /**
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
480 * Probes for plugins in the registered module paths.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
481 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
482 * @param ext The extension type to probe for, or @c NULL for all.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
483 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
484 * @see gaim_plugin_set_probe_path()
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
485 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
486 void gaim_plugins_probe(const char *ext);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
487
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
488 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
489 * Returns whether or not plugin support is enabled.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
490 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
491 * @return TRUE if plugin support is enabled, or FALSE otherwise.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
492 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
493 gboolean gaim_plugins_enabled(void);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
494
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
495 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
496 * Registers a function that will be called when probing is finished.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
497 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
498 * @param func The callback function.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
499 * @param data Data to pass to the callback.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
500 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
501 void gaim_plugins_register_probe_notify_cb(void (*func)(void *), void *data);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
502
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
503 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
504 * Unregisters a function that would be called when probing is finished.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
505 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
506 * @param func The callback function.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
507 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
508 void gaim_plugins_unregister_probe_notify_cb(void (*func)(void *));
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
509
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
510 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
511 * Registers a function that will be called when a plugin is loaded.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
512 *
8735
92cbf9713795 [gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents: 8713
diff changeset
513 * @param func The callback function.
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
514 * @param data Data to pass to the callback.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
515 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
516 void gaim_plugins_register_load_notify_cb(void (*func)(GaimPlugin *, void *),
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
517 void *data);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
518
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
519 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
520 * Unregisters a function that would be called when a plugin is loaded.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
521 *
8735
92cbf9713795 [gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents: 8713
diff changeset
522 * @param func The callback function.
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
523 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
524 void gaim_plugins_unregister_load_notify_cb(void (*func)(GaimPlugin *, void *));
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
525
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
526 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
527 * Registers a function that will be called when a plugin is unloaded.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
528 *
8735
92cbf9713795 [gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents: 8713
diff changeset
529 * @param func The callback function.
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
530 * @param data Data to pass to the callback.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
531 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
532 void gaim_plugins_register_unload_notify_cb(void (*func)(GaimPlugin *, void *),
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
533 void *data);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
534
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
535 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
536 * Unregisters a function that would be called when a plugin is unloaded.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
537 *
8735
92cbf9713795 [gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents: 8713
diff changeset
538 * @param func The callback function.
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
539 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
540 void gaim_plugins_unregister_unload_notify_cb(void (*func)(GaimPlugin *,
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
541 void *));
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
542
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
543 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
544 * Finds a plugin with the specified name.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
545 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
546 * @param name The plugin name.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
547 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
548 * @return The plugin if found, or @c NULL if not found.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
549 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
550 GaimPlugin *gaim_plugins_find_with_name(const char *name);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
551
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
552 /**
7034
f7ff0dfa6b9f [gaim-migrate @ 7597]
Christian Hammond <chipx86@chipx86.com>
parents: 7033
diff changeset
553 * Finds a plugin with the specified filename (filename with a path).
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
554 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
555 * @param filename The plugin filename.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
556 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
557 * @return The plugin if found, or @c NULL if not found.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
558 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
559 GaimPlugin *gaim_plugins_find_with_filename(const char *filename);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
560
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
561 /**
7034
f7ff0dfa6b9f [gaim-migrate @ 7597]
Christian Hammond <chipx86@chipx86.com>
parents: 7033
diff changeset
562 * Finds a plugin with the specified basename (filename without a path).
7033
cf1126ba1834 [gaim-migrate @ 7596]
Christian Hammond <chipx86@chipx86.com>
parents: 6928
diff changeset
563 *
7034
f7ff0dfa6b9f [gaim-migrate @ 7597]
Christian Hammond <chipx86@chipx86.com>
parents: 7033
diff changeset
564 * @param basename The plugin basename.
7033
cf1126ba1834 [gaim-migrate @ 7596]
Christian Hammond <chipx86@chipx86.com>
parents: 6928
diff changeset
565 *
cf1126ba1834 [gaim-migrate @ 7596]
Christian Hammond <chipx86@chipx86.com>
parents: 6928
diff changeset
566 * @return The plugin if found, or @c NULL if not found.
cf1126ba1834 [gaim-migrate @ 7596]
Christian Hammond <chipx86@chipx86.com>
parents: 6928
diff changeset
567 */
cf1126ba1834 [gaim-migrate @ 7596]
Christian Hammond <chipx86@chipx86.com>
parents: 6928
diff changeset
568 GaimPlugin *gaim_plugins_find_with_basename(const char *basename);
cf1126ba1834 [gaim-migrate @ 7596]
Christian Hammond <chipx86@chipx86.com>
parents: 6928
diff changeset
569
cf1126ba1834 [gaim-migrate @ 7596]
Christian Hammond <chipx86@chipx86.com>
parents: 6928
diff changeset
570 /**
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
571 * Finds a plugin with the specified plugin ID.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
572 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
573 * @param id The plugin ID.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
574 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
575 * @return The plugin if found, or @c NULL if not found.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
576 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
577 GaimPlugin *gaim_plugins_find_with_id(const char *id);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
578
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
579 /**
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
580 * Returns a list of all loaded plugins.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
581 *
5573
5e7de337a053 [gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents: 5449
diff changeset
582 * @return A list of all loaded plugins.
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
583 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
584 GList *gaim_plugins_get_loaded(void);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
585
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
586 /**
11950
2b9ca8861ca5 [gaim-migrate @ 14241]
Mark Doliner <mark@kingant.net>
parents: 11817
diff changeset
587 * Returns a list of all valid protocol plugins. A protocol
2b9ca8861ca5 [gaim-migrate @ 14241]
Mark Doliner <mark@kingant.net>
parents: 11817
diff changeset
588 * plugin is considered invalid if it does not contain the call
2b9ca8861ca5 [gaim-migrate @ 14241]
Mark Doliner <mark@kingant.net>
parents: 11817
diff changeset
589 * to the GAIM_INIT_PLUGIN() macro, or if it was compiled
2b9ca8861ca5 [gaim-migrate @ 14241]
Mark Doliner <mark@kingant.net>
parents: 11817
diff changeset
590 * against an incompatable API version.
5573
5e7de337a053 [gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents: 5449
diff changeset
591 *
5e7de337a053 [gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents: 5449
diff changeset
592 * @return A list of all protocol plugins.
5e7de337a053 [gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents: 5449
diff changeset
593 */
5e7de337a053 [gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents: 5449
diff changeset
594 GList *gaim_plugins_get_protocols(void);
5e7de337a053 [gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents: 5449
diff changeset
595
5e7de337a053 [gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents: 5449
diff changeset
596 /**
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
597 * Returns a list of all plugins, whether loaded or not.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
598 *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
599 * @return A list of all plugins.
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
600 */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
601 GList *gaim_plugins_get_all(void);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
602
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
603 /*@}*/
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
604
10479
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
605 /**************************************************************************/
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
606 /** @name Plugins SubSytem API */
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
607 /**************************************************************************/
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
608 /*@{*/
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
609
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
610 /**
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
611 * Returns the plugin subsystem handle.
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
612 *
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
613 * @return The plugin sybsystem handle.
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
614 */
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
615 void *gaim_plugins_get_handle(void);
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
616
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
617 /**
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
618 * Initializes the plugin subsystem
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
619 */
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
620 void gaim_plugins_init(void);
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
621
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
622 /**
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
623 * Uninitializes the plugin subsystem
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
624 */
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
625 void gaim_plugins_uninit(void);
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
626
12460aa2c820 [gaim-migrate @ 11766]
Nathan Walp <nwalp@pidgin.im>
parents: 10450
diff changeset
627 /*@}*/
9015
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
628
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
629 /**
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
630 * Allocates and returns a new GaimPluginAction.
13106
a0a4b44239e8 [gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents: 12986
diff changeset
631 *
a0a4b44239e8 [gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents: 12986
diff changeset
632 * @param label The description of the action to show to the user.
a0a4b44239e8 [gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents: 12986
diff changeset
633 * @param callback The callback to call when the user selects this action.
9015
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
634 */
13106
a0a4b44239e8 [gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents: 12986
diff changeset
635 GaimPluginAction *gaim_plugin_action_new(const char* label, void (*callback)(GaimPluginAction *));
a0a4b44239e8 [gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents: 12986
diff changeset
636
a0a4b44239e8 [gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents: 12986
diff changeset
637 /**
a0a4b44239e8 [gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents: 12986
diff changeset
638 * Frees a GaimPluginAction
a0a4b44239e8 [gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents: 12986
diff changeset
639 *
a0a4b44239e8 [gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents: 12986
diff changeset
640 * @param action The GaimPluginAction to free.
a0a4b44239e8 [gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents: 12986
diff changeset
641 */
a0a4b44239e8 [gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents: 12986
diff changeset
642 void gaim_plugin_action_free(GaimPluginAction *action);
9015
67421e0dc497 [gaim-migrate @ 9791]
Luke Schierer <lschiere@pidgin.im>
parents: 8990
diff changeset
643
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
644 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
645 }
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
646 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5840
diff changeset
647
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
648 #endif /* _GAIM_PLUGIN_H_ */