/soc/2013/ankitkv/gobjectification: d51a8507f4e0: Added purple_p...
Ankit Vani
a at nevitus.org
Mon Jul 29 18:36:40 EDT 2013
Changeset: d51a8507f4e094b71b32d9c7e23f02013fc8bf1e
Author: Ankit Vani <a at nevitus.org>
Date: 2013-07-30 04:05 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/d51a8507f4e0
Description:
Added purple_protocols_get_all()
diffstat:
libpurple/prpl.c | 14 ++++++++++++++
libpurple/prpl.h | 7 +++++++
2 files changed, 21 insertions(+), 0 deletions(-)
diffs (41 lines):
diff --git a/libpurple/prpl.c b/libpurple/prpl.c
--- a/libpurple/prpl.c
+++ b/libpurple/prpl.c
@@ -648,6 +648,20 @@ gboolean purple_protocols_remove(PurpleP
return TRUE;
}
+GList *
+purple_protocols_get_all(void)
+{
+ GList *ret = NULL;
+ PurplePluginProtocolInfo *prpl_info;
+ GHashTableIter iter;
+
+ g_hash_table_iter_init(&iter, protocols);
+ while (g_hash_table_iter_next(&iter, NULL, (gpointer *)&prpl_info))
+ ret = g_list_append(ret, prpl_info);
+
+ return ret;
+}
+
/**************************************************************************
* Protocols Subsystem API
**************************************************************************/
diff --git a/libpurple/prpl.h b/libpurple/prpl.h
--- a/libpurple/prpl.h
+++ b/libpurple/prpl.h
@@ -981,6 +981,13 @@ gboolean purple_protocols_add(PurplePlug
*/
gboolean purple_protocols_remove(PurplePluginProtocolInfo *prpl_info);
+/** TODO A sanity check is needed
+ * Returns a list of all loaded protocols.
+ *
+ * @constreturn A list of all loaded protocols.
+ */
+GList *purple_protocols_get_all(void);
+
/*@}*/
/**************************************************************************/
More information about the Commits
mailing list