/pidgin/main: 78463057dd76: Box FinchBlistManager
Ankit Vani
a at nevitus.org
Wed Feb 19 06:43:24 EST 2014
Changeset: 78463057dd765cc431126474af7e59e41f93bdc1
Author: Ankit Vani <a at nevitus.org>
Date: 2014-02-19 16:59 +0530
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/78463057dd76
Description:
Box FinchBlistManager
diffstat:
finch/gntblist.c | 37 +++++++++++++++++++++++++++++++++++++
finch/gntblist.h | 12 +++++++++++-
2 files changed, 48 insertions(+), 1 deletions(-)
diffs (80 lines):
diff --git a/finch/gntblist.c b/finch/gntblist.c
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -3201,3 +3201,40 @@ GntTree * finch_blist_get_tree(void)
return ggblist ? GNT_TREE(ggblist->tree) : NULL;
}
+/**************************************************************************
+ * GBoxed code
+ **************************************************************************/
+static FinchBlistManager *
+finch_blist_manager_copy(FinchBlistManager *manager)
+{
+ FinchBlistManager *manager_new;
+
+ g_return_val_if_fail(manager != NULL, NULL);
+
+ manager_new = g_new(FinchBlistManager, 1);
+ *manager_new = *manager;
+
+ return manager_new;
+}
+
+static void
+finch_blist_manager_free(FinchBlistManager *manager)
+{
+ g_return_if_fail(manager != NULL);
+
+ g_free(manager);
+}
+
+GType
+finch_blist_manager_get_type(void)
+{
+ static GType type = 0;
+
+ if (type == 0) {
+ type = g_boxed_type_register_static("FinchBlistManager",
+ (GBoxedCopyFunc)finch_blist_manager_copy,
+ (GBoxedFreeFunc)finch_blist_manager_free);
+ }
+
+ return type;
+}
diff --git a/finch/gntblist.h b/finch/gntblist.h
--- a/finch/gntblist.h
+++ b/finch/gntblist.h
@@ -31,6 +31,8 @@
#include "buddylist.h"
#include "gnttree.h"
+#define FINCH_TYPE_BLIST_MANAGER (finch_blist_manager_get_type())
+
/**********************************************************************
* GNT BuddyList API
**********************************************************************/
@@ -65,6 +67,13 @@ struct _FinchBlistManager
};
/**
+ * finch_blist_manager_get_type:
+ *
+ * Returns: The #GType for the #FinchBlistManager boxed structure.
+ */
+GType finch_blist_manager_get_type(void);
+
+/**
* finch_blist_get_ui_ops:
*
* Get the ui-functions.
@@ -177,7 +186,8 @@ void finch_blist_uninstall_manager(const
*
* Find a buddy list manager.
*
- * Returns: The manager with the requested identifier, if available. %NULL otherwise.
+ * Returns: The manager with the requested identifier, if available. %NULL
+ * otherwise.
*/
FinchBlistManager * finch_blist_manager_find(const char *id);
More information about the Commits
mailing list