/soc/2012/michael/android: 6ec4de91d403: Added purple_plugin_get...

Michael Zangl michael at soc.pidgin.im
Tue Jul 17 11:16:54 EDT 2012


Changeset: 6ec4de91d40355b03514523422c6fce4a8269f27
Author:	 Michael Zangl <michael at soc.pidgin.im>
Date:	 2012-07-17 17:07 +0200
Branch:	 default
URL: http://hg.pidgin.im/soc/2012/michael/android/rev/6ec4de91d403

Description:

Added purple_plugin_get_type

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