changeset 11772:d1d5f27de95d

[gaim-migrate @ 14063] Added a bunch of accessor functions for the PluginInfo struct off of the plugin... committer: Tailor Script <tailor@pidgin.im>
author Gary Kramlich <grim@reaperworld.com>
date Sun, 23 Oct 2005 23:26:14 +0000
parents 08b1dd8aa11c
children 92cf092f194e
files src/plugin.c src/plugin.h
diffstat 2 files changed, 119 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugin.c	Sun Oct 23 23:04:31 2005 +0000
+++ b/src/plugin.c	Sun Oct 23 23:26:14 2005 +0000
@@ -611,6 +611,62 @@
 	return plugin->loaded;
 }
 
+const gchar *
+gaim_plugin_get_id(const GaimPlugin *plugin) {
+	g_return_val_if_fail(plugin, NULL);
+	g_return_val_if_fail(plugin->info, NULL);
+
+	return plugin->info->id;
+}
+
+const gchar *
+gaim_plugin_get_name(const GaimPlugin *plugin) {
+	g_return_val_if_fail(plugin, NULL);
+	g_return_val_if_fail(plugin->info, NULL);
+
+	return plugin->info->name;
+}
+
+const gchar *
+gaim_plugin_get_version(const GaimPlugin *plugin) {
+	g_return_val_if_fail(plugin, NULL);
+	g_return_val_if_fail(plugin->info, NULL);
+
+	return plugin->info->version;
+}
+
+const gchar *
+gaim_plugin_get_summary(const GaimPlugin *plugin) {
+	g_return_val_if_fail(plugin, NULL);
+	g_return_val_if_fail(plugin->info, NULL);
+
+	return plugin->info->summary;
+}
+
+const gchar *
+gaim_plugin_get_description(const GaimPlugin *plugin) {
+	g_return_val_if_fail(plugin, NULL);
+	g_return_val_if_fail(plugin->info, NULL);
+
+	return plugin->info->description;
+}
+
+const gchar *
+gaim_plugin_get_author(const GaimPlugin *plugin) {
+	g_return_val_if_fail(plugin, NULL);
+	g_return_val_if_fail(plugin->info, NULL);
+
+	return plugin->info->author;
+}
+
+const gchar *
+gaim_plugin_get_homepage(const GaimPlugin *plugin) {
+	g_return_val_if_fail(plugin, NULL);
+	g_return_val_if_fail(plugin->info, NULL);
+
+	return plugin->info->homepage;
+}
+
 /**************************************************************************
  * Plugin IPC
  **************************************************************************/
--- a/src/plugin.h	Sun Oct 23 23:04:31 2005 +0000
+++ b/src/plugin.h	Sun Oct 23 23:26:14 2005 +0000
@@ -300,6 +300,69 @@
  */
 gboolean gaim_plugin_is_loaded(const GaimPlugin *plugin);
 
+/**
+ * Returns a plugin's id.
+ *
+ * @param plugin The plugin.
+ *
+ * @return The plugin's id.
+ */
+const gchar *gaim_plugin_get_id(const GaimPlugin *plugin);
+
+/**
+ * Returns a plugin's name.
+ *
+ * @param plugin The plugin.
+ * 
+ * @return THe name of the plugin, or @c NULL.
+ */
+const gchar *gaim_plugin_get_name(const GaimPlugin *plugin);
+
+/**
+ * Returns a plugin's version.
+ *
+ * @param plugin The plugin.
+ *
+ * @return The plugin's version or @c NULL.
+ */
+const gchar *gaim_plugin_get_version(const GaimPlugin *plugin);
+
+/**
+ * Returns a plugin's summary.
+ *
+ * @param plugin The plugin.
+ *
+ * @return The plugin's summary.
+ */
+const gchar *gaim_plugin_get_summary(const GaimPlugin *plugin);
+
+/**
+ * Returns a plugin's description.
+ *
+ * @param plugin The plugin.
+ *
+ * @return The plugin's description.
+ */
+const gchar *gaim_plugin_get_description(const GaimPlugin *plugin);
+
+/**
+ * Returns a plugin's author.
+ *
+ * @param plugin The plugin.
+ *
+ * @return The plugin's author.
+ */
+const gchar *gaim_plugin_get_author(const GaimPlugin *plugin);
+
+/**
+ * Returns a plugin's homepage.
+ *
+ * @param plugin The plugin.
+ *
+ * @return The plugin's homepage.
+ */
+const gchar *gaim_plugin_get_homepage(const GaimPlugin *plugin);
+
 /*@}*/
 
 /**************************************************************************/