/soc/2012/michael/libpurple: 1e7aa4ac990d: Added purple_plugin_g...
Michael Zangl
michael at soc.pidgin.im
Thu May 9 05:53:20 EDT 2013
Changeset: 1e7aa4ac990d3bd20262c6d5320e58b5582f241e
Author: Michael Zangl <michael at soc.pidgin.im>
Date: 2013-05-09 10:29 +0200
Branch: default
URL: https://hg.pidgin.im/soc/2012/michael/libpurple/rev/1e7aa4ac990d
Description:
Added purple_plugin_get_type for getting the type of a plugin.
diffstat:
libpurple/plugin.c | 8 ++++++++
libpurple/plugin.h | 9 +++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diffs (37 lines):
diff --git a/libpurple/plugin.c b/libpurple/plugin.c
--- a/libpurple/plugin.c
+++ b/libpurple/plugin.c
@@ -899,6 +899,14 @@ purple_plugin_is_unloadable(const Purple
return plugin->unloadable;
}
+PurplePluginType
+purple_plugin_get_type(const PurplePlugin *plugin) {
+ g_return_val_if_fail(plugin, PURPLE_PLUGIN_UNKNOWN);
+ g_return_val_if_fail(plugin->info, PURPLE_PLUGIN_UNKNOWN);
+
+ return plugin->info->type;
+}
+
const gchar *
purple_plugin_get_id(const PurplePlugin *plugin) {
g_return_val_if_fail(plugin, NULL);
diff --git a/libpurple/plugin.h b/libpurple/plugin.h
--- a/libpurple/plugin.h
+++ b/libpurple/plugin.h
@@ -361,6 +361,15 @@ gboolean purple_plugin_is_loaded(const P
gboolean purple_plugin_is_unloadable(const PurplePlugin *plugin);
/**
+ * Returns a plugin's type.
+ *
+ * @param plugin The plugin.
+ *
+ * @return The plugin's type.
+ */
+PurplePluginType purple_plugin_get_type(const PurplePlugin *plugin);
+
+/**
* Returns a plugin's id.
*
* @param plugin The plugin.
More information about the Commits
mailing list