/soc/2012/michael/android: e165dd7eb658: added a purple_plugin_g...
Michael Zangl
michael at soc.pidgin.im
Sat Jul 7 03:34:15 EDT 2012
Changeset: e165dd7eb65882865751456e039c38dbe9789ff0
Author: Michael Zangl <michael at soc.pidgin.im>
Date: 2012-06-23 16:50 +0200
Branch: soc.2012.android
URL: http://hg.pidgin.im/soc/2012/michael/android/rev/e165dd7eb658
Description:
added a purple_plugin_get_type function
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
@@ -902,6 +902,14 @@
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_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