/soc/2013/ankitkv/gobjectification: b8ba53daa445: Updated libpur...

Ankit Vani a at nevitus.org
Sun Sep 1 14:06:02 EDT 2013


Changeset: b8ba53daa44589a572642651094c2c93f9b739f1
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-09-01 22:38 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/b8ba53daa445

Description:

Updated libpurple to use current GPlugin

diffstat:

 libpurple/plugins.c                          |  23 +++++++++++++---
 libpurple/plugins.h                          |  38 ++++++++++++++++++---------
 libpurple/plugins/keyrings/gnomekeyring.c    |   8 ++++-
 libpurple/plugins/keyrings/internalkeyring.c |   6 ++-
 libpurple/plugins/keyrings/kwallet.cpp       |   6 ++-
 libpurple/plugins/keyrings/secretservice.c   |   7 ++++-
 libpurple/plugins/keyrings/wincred.c         |   6 ++-
 libpurple/plugins/ssl/ssl-gnutls.c           |   7 ++++-
 libpurple/plugins/ssl/ssl-nss.c              |   7 ++++-
 libpurple/plugins/ssl/ssl.c                  |   7 ++++-
 libpurple/protocols/gg/gg.c                  |   7 ++++-
 libpurple/protocols/jabber/libfacebook.c     |   7 ++++-
 libpurple/protocols/jabber/libgtalk.c        |   7 ++++-
 libpurple/protocols/mxit/mxit.c              |   4 ++-
 libpurple/protocols/mxit/mxit.h              |   2 +-
 libpurple/protocols/myspace/myspace.c        |   7 ++++-
 libpurple/protocols/oscar/libicq.c           |   7 ++++-
 libpurple/protocols/sametime/sametime.c      |   7 +++-
 libpurple/protocols/silc/silc.c              |   7 ++++-
 libpurple/protocols/simple/simple.c          |   7 ++++-
 libpurple/protocols/yahoo/libyahoojp.c       |   7 ++++-
 21 files changed, 142 insertions(+), 42 deletions(-)

diffs (truncated from 609 to 300 lines):

diff --git a/libpurple/plugins.c b/libpurple/plugins.c
--- a/libpurple/plugins.c
+++ b/libpurple/plugins.c
@@ -568,13 +568,13 @@ purple_plugin_info_get_description(const
 #endif
 }
 
-const gchar *
-purple_plugin_info_get_author(const PurplePluginInfo *info)
+const gchar * const *
+purple_plugin_info_get_authors(const PurplePluginInfo *info)
 {
 #ifdef PURPLE_PLUGINS
 	g_return_val_if_fail(info != NULL, NULL);
 
-	return gplugin_plugin_info_get_author(GPLUGIN_PLUGIN_INFO(info));
+	return gplugin_plugin_info_get_authors(GPLUGIN_PLUGIN_INFO(info));
 
 #else
 	return NULL;
@@ -608,12 +608,12 @@ purple_plugin_info_get_icon(const Purple
 }
 
 const gchar *
-purple_plugin_info_get_license(const PurplePluginInfo *info)
+purple_plugin_info_get_license_id(const PurplePluginInfo *info)
 {
 #ifdef PURPLE_PLUGINS
 	g_return_val_if_fail(info != NULL, NULL);
 
-	return gplugin_plugin_info_get_license(GPLUGIN_PLUGIN_INFO(info));
+	return gplugin_plugin_info_get_license_id(GPLUGIN_PLUGIN_INFO(info));
 
 #else
 	return NULL;
@@ -646,6 +646,19 @@ purple_plugin_info_get_license_url(const
 #endif
 }
 
+const gchar * const *
+purple_plugin_info_get_dependencies(const PurplePluginInfo *info)
+{
+#ifdef PURPLE_PLUGINS
+	g_return_val_if_fail(info != NULL, NULL);
+
+	return gplugin_plugin_info_get_dependencies(GPLUGIN_PLUGIN_INFO(info));
+
+#else
+	return NULL;
+#endif
+}
+
 guint32
 purple_plugin_info_get_abi_version(const PurplePluginInfo *info)
 {
diff --git a/libpurple/plugins.h b/libpurple/plugins.h
--- a/libpurple/plugins.h
+++ b/libpurple/plugins.h
@@ -380,20 +380,21 @@ GType purple_plugin_info_get_type(void);
  * "category"           (string) Primary category of the plugin.             \n
  * "summary"            (string) Brief summary of the plugin.                \n
  * "description"        (string) Full description of the plugin.             \n
- * "author"             (string) Name and e-mail address of the author.
+ * "authors"            (const gchar * const *) A NULL-terminated list of
+ *                               plugin authors.
  *                               format: First Last <user at domain.com>        \n
  * "website"            (string) Website of the plugin.                      \n
  * "icon"               (string) Path to a plugin's icon.                    \n
- * "license"            (string) Short name of the plugin's license. This
- *                               should either be an identifier of the
- *                               license from http://spdx.org/licenses/ or
- *                               "Other" for custom licenses.                \n
+ * "license-id"         (string) Short name of the plugin's license. This
+ *                        should either be an identifier of the license from
+ *                        http://dep.debian.net/deps/dep5/#license-specification
+ *                        or "Other" for custom licenses.                    \n
  * "license-text"       (string) The text of the plugin's license, if
- *                               unlisted on SPDX.                           \n
+ *                               unlisted on DEP5.                           \n
  * "license-url"        (string) The plugin's license URL, if unlisted on
- *                               SPDX.                                       \n
- * "dependencies"       (string) Comma-seperated list of plugin IDs required
- *                               by the plugin.                              \n
+ *                               DEP5.                                       \n
+ * "dependencies"       (const gchar * const *) A NULL-terminated list of
+ *                               plugin IDs required by the plugin.          \n
  * "abi-version"        (guint32) The ABI version required by the plugin.    \n
  * "get-actions"        (PurplePluginGetActionsCallback) Callback that
  *                               returns a list of actions the plugin can
@@ -474,13 +475,14 @@ const gchar *purple_plugin_info_get_summ
 const gchar *purple_plugin_info_get_description(const PurplePluginInfo *info);
 
 /**
- * Returns a plugin's author.
+ * Returns a NULL-terminated list of the plugin's authors.
  *
  * @param info The plugin's info instance.
  *
- * @return The author of the plugin, or @c NULL.
+ * @return The authors of the plugin, or @c NULL.
  */
-const gchar *purple_plugin_info_get_author(const PurplePluginInfo *info);
+const gchar * const *
+purple_plugin_info_get_authors(const PurplePluginInfo *info);
 
 /**
  * Returns a plugin's website.
@@ -507,7 +509,7 @@ const gchar *purple_plugin_info_get_icon
  *
  * @return The license name of the plugin, or @c NULL.
  */
-const gchar *purple_plugin_info_get_license(const PurplePluginInfo *info);
+const gchar *purple_plugin_info_get_license_id(const PurplePluginInfo *info);
 
 /**
  * Returns the text of a plugin's license.
@@ -528,6 +530,16 @@ const gchar *purple_plugin_info_get_lice
 const gchar *purple_plugin_info_get_license_url(const PurplePluginInfo *info);
 
 /**
+ * Returns a NULL-terminated list of IDs of plugins required by a plugin.
+ *
+ * @param info The plugin's info instance.
+ *
+ * @return The dependencies of the plugin, or @c NULL.
+ */
+const gchar * const *
+purple_plugin_info_get_dependencies(const PurplePluginInfo *info);
+
+/**
  * Returns the required purple ABI version for a plugin.
  *
  * @param info The plugin's info instance.
diff --git a/libpurple/plugins/keyrings/gnomekeyring.c b/libpurple/plugins/keyrings/gnomekeyring.c
--- a/libpurple/plugins/keyrings/gnomekeyring.c
+++ b/libpurple/plugins/keyrings/gnomekeyring.c
@@ -37,8 +37,10 @@
 #define GNOMEKEYRING_NAME        N_("GNOME Keyring")
 #define GNOMEKEYRING_DESCRIPTION N_("This plugin will store passwords in " \
 	"GNOME Keyring.")
-#define GNOMEKEYRING_AUTHOR      "Tomek Wasilczyk (tomkiewicz at cpw.pidgin.im)"
 #define GNOMEKEYRING_ID          "keyring-gnomekeyring"
+#define GNOMEKEYRING_AUTHORS \
+	{ "Tomek Wasilczyk (tomkiewicz at cpw.pidgin.im)", NULL }
+
 #define GNOMEKEYRING_DOMAIN      (g_quark_from_static_string(GNOMEKEYRING_ID))
 
 static PurpleKeyring *keyring_handler = NULL;
@@ -381,6 +383,8 @@ gnomekeyring_close(void)
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
+	const gchar * const authors[] = GNOMEKEYRING_AUTHORS;
+
 	return purple_plugin_info_new(
 		"id",           GNOMEKEYRING_ID,
 		"name",         GNOMEKEYRING_NAME,
@@ -388,7 +392,7 @@ plugin_query(GError **error)
 		"category",     N_("Keyring"),
 		"summary",      "GNOME Keyring Plugin",
 		"description",  GNOMEKEYRING_DESCRIPTION,
-		"author",       GNOMEKEYRING_AUTHOR,
+		"authors",      authors,
 		"website",      PURPLE_WEBSITE,
 		"abi-version",  PURPLE_ABI_VERSION,
 		"flags",        GPLUGIN_PLUGIN_INFO_FLAGS_INTERNAL,
diff --git a/libpurple/plugins/keyrings/internalkeyring.c b/libpurple/plugins/keyrings/internalkeyring.c
--- a/libpurple/plugins/keyrings/internalkeyring.c
+++ b/libpurple/plugins/keyrings/internalkeyring.c
@@ -38,7 +38,7 @@
 #define INTKEYRING_NAME N_("Internal keyring")
 #define INTKEYRING_DESCRIPTION N_("This plugin provides the default password " \
 	"storage behaviour for libpurple.")
-#define INTKEYRING_AUTHOR "Tomek Wasilczyk (tomkiewicz at cpw.pidgin.im)"
+#define INTKEYRING_AUTHORS { "Tomek Wasilczyk (tomkiewicz at cpw.pidgin.im)",NULL }
 #define INTKEYRING_ID PURPLE_DEFAULT_KEYRING
 #define INTKEYRING_DOMAIN (g_quark_from_static_string(INTKEYRING_ID))
 
@@ -958,6 +958,8 @@ intkeyring_apply_settings(void *notify_h
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
+	const gchar * const authors[] = INTKEYRING_AUTHORS;
+
 	return purple_plugin_info_new(
 		"id",           INTKEYRING_ID,
 		"name",         INTKEYRING_NAME,
@@ -965,7 +967,7 @@ plugin_query(GError **error)
 		"category",     N_("Keyring"),
 		"summary",      "Internal Keyring Plugin",
 		"description",  INTKEYRING_DESCRIPTION,
-		"author",       INTKEYRING_AUTHOR,
+		"authors",      authors,
 		"website",      PURPLE_WEBSITE,
 		"abi-version",  PURPLE_ABI_VERSION,
 		"flags",        GPLUGIN_PLUGIN_INFO_FLAGS_INTERNAL,
diff --git a/libpurple/plugins/keyrings/kwallet.cpp b/libpurple/plugins/keyrings/kwallet.cpp
--- a/libpurple/plugins/keyrings/kwallet.cpp
+++ b/libpurple/plugins/keyrings/kwallet.cpp
@@ -38,7 +38,7 @@
 
 #define KWALLET_NAME        N_("KWallet")
 #define KWALLET_DESCRIPTION N_("This plugin will store passwords in KWallet.")
-#define KWALLET_AUTHOR      "QuLogic (qulogic[at]pidgin.im)"
+#define KWALLET_AUTHORS     { "QuLogic (qulogic[at]pidgin.im)", NULL }
 #define KWALLET_ID          "keyring-kwallet"
 #define KWALLET_DOMAIN      (g_quark_from_static_string(KWALLET_ID))
 
@@ -492,6 +492,8 @@ static const char *kwallet_get_ui_name(v
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
+	const gchar * const authors[] = KWALLET_AUTHORS;
+
 	return purple_plugin_info_new(
 		"id",           KWALLET_ID,
 		"name",         KWALLET_NAME,
@@ -499,7 +501,7 @@ plugin_query(GError **error)
 		"category",     N_("Keyring"),
 		"summary",      "KWallet Keyring Plugin",
 		"description",  KWALLET_DESCRIPTION,
-		"author",       KWALLET_AUTHOR,
+		"authors",      authors,
 		"website",      PURPLE_WEBSITE,
 		"abi-version",  PURPLE_ABI_VERSION,
 		"flags",        GPLUGIN_PLUGIN_INFO_FLAGS_INTERNAL,
diff --git a/libpurple/plugins/keyrings/secretservice.c b/libpurple/plugins/keyrings/secretservice.c
--- a/libpurple/plugins/keyrings/secretservice.c
+++ b/libpurple/plugins/keyrings/secretservice.c
@@ -285,6 +285,11 @@ ss_uninit(void)
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
+	const gchar * const authors[] = {
+		"Elliott Sales de Andrade (qulogic[at]pidgin.im)",
+		NULL
+	};
+
 	return purple_plugin_info_new(
 		"id",           SECRETSERVICE_ID,
 		"name",         SECRETSERVICE_NAME,
@@ -292,7 +297,7 @@ plugin_query(GError **error)
 		"category",     N_("Keyring"),
 		"summary",      "Secret Service Plugin",
 		"description",  N_("This plugin will store passwords in Secret Service."),
-		"author",       "Elliott Sales de Andrade (qulogic[at]pidgin.im)",
+		"authors",      authors,
 		"website",      PURPLE_WEBSITE,
 		"abi-version",  PURPLE_ABI_VERSION,
 		"flags",        GPLUGIN_PLUGIN_INFO_FLAGS_INTERNAL,
diff --git a/libpurple/plugins/keyrings/wincred.c b/libpurple/plugins/keyrings/wincred.c
--- a/libpurple/plugins/keyrings/wincred.c
+++ b/libpurple/plugins/keyrings/wincred.c
@@ -36,7 +36,7 @@
 #define WINCRED_SUMMARY     N_("Store passwords using Windows credentials")
 #define WINCRED_DESCRIPTION N_("This plugin stores passwords using Windows " \
 	"credentials.")
-#define WINCRED_AUTHOR      "Tomek Wasilczyk (tomkiewicz at cpw.pidgin.im)"
+#define WINCRED_AUTHORS     {"Tomek Wasilczyk (tomkiewicz at cpw.pidgin.im)", NULL}
 #define WINCRED_ID          "keyring-wincred"
 #define WINCRED_DOMAIN      (g_quark_from_static_string(WINCRED_ID))
 
@@ -259,6 +259,8 @@ wincred_save(PurpleAccount *account, con
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
+	const gchar * const authors[] = WINCRED_AUTHORS;
+
 	return purple_plugin_info_new(
 		"id",           WINCRED_ID,
 		"name",         WINCRED_NAME,
@@ -266,7 +268,7 @@ plugin_query(GError **error)
 		"category",     N_("Keyring"),
 		"summary",      WINCRED_SUMMARY,
 		"description",  WINCRED_DESCRIPTION,
-		"author",       WINCRED_AUTHOR,
+		"authors",      authors,
 		"website",      PURPLE_WEBSITE,
 		"abi-version",  PURPLE_ABI_VERSION,
 		"flags",        GPLUGIN_PLUGIN_INFO_FLAGS_INTERNAL,
diff --git a/libpurple/plugins/ssl/ssl-gnutls.c b/libpurple/plugins/ssl/ssl-gnutls.c
--- a/libpurple/plugins/ssl/ssl-gnutls.c
+++ b/libpurple/plugins/ssl/ssl-gnutls.c
@@ -1282,6 +1282,11 @@ static PurpleSslOps ssl_ops =
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
+	const gchar * const authors[] = {
+		"Christian Hammond <chipx86 at gnupdate.org>",
+		NULL
+	};
+
 	return purple_plugin_info_new(
 		"id",           SSL_GNUTLS_PLUGIN_ID,
 		"name",         N_("GNUTLS"),
@@ -1289,7 +1294,7 @@ plugin_query(GError **error)
 		"category",     N_("SSL"),
 		"summary",      N_("Provides SSL support through GNUTLS."),
 		"description",  N_("Provides SSL support through GNUTLS."),
-		"author",       "Christian Hammond <chipx86 at gnupdate.org>",



More information about the Commits mailing list