aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-08-08 16:37:07 +0800
committerLaurent Contzen <lcontzen@gmail.com>2012-08-09 18:51:40 +0800
commitc906321a8a61cf8d7a980dd088a751399bc2de7f (patch)
tree0087c839d7c09a94505e902ddb0d9a6aa794abbb /libempathy-gtk
parent20f50d596fa827b6d9852c8dc7bc0e8e8ca0af1d (diff)
downloadgsoc2013-empathy-c906321a8a61cf8d7a980dd088a751399bc2de7f.tar
gsoc2013-empathy-c906321a8a61cf8d7a980dd088a751399bc2de7f.tar.gz
gsoc2013-empathy-c906321a8a61cf8d7a980dd088a751399bc2de7f.tar.bz2
gsoc2013-empathy-c906321a8a61cf8d7a980dd088a751399bc2de7f.tar.lz
gsoc2013-empathy-c906321a8a61cf8d7a980dd088a751399bc2de7f.tar.xz
gsoc2013-empathy-c906321a8a61cf8d7a980dd088a751399bc2de7f.tar.zst
gsoc2013-empathy-c906321a8a61cf8d7a980dd088a751399bc2de7f.zip
add empathy-roster-model-aggregator
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/Makefile.am2
-rw-r--r--libempathy-gtk/empathy-roster-model-aggregator.c165
-rw-r--r--libempathy-gtk/empathy-roster-model-aggregator.h74
3 files changed, 241 insertions, 0 deletions
diff --git a/libempathy-gtk/Makefile.am b/libempathy-gtk/Makefile.am
index 87d787525..902a5e57f 100644
--- a/libempathy-gtk/Makefile.am
+++ b/libempathy-gtk/Makefile.am
@@ -77,6 +77,7 @@ libempathy_gtk_handwritten_source = \
empathy-roster-contact.c \
empathy-roster-group.c \
empathy-roster-model.c \
+ empathy-roster-model-aggregator.c \
empathy-roster-model-manager.c \
empathy-roster-view.c \
empathy-search-bar.c \
@@ -148,6 +149,7 @@ libempathy_gtk_headers = \
empathy-roster-contact.h \
empathy-roster-group.h \
empathy-roster-model.h \
+ empathy-roster-model-aggregator.h \
empathy-roster-model-manager.h \
empathy-roster-view.h \
empathy-search-bar.h \
diff --git a/libempathy-gtk/empathy-roster-model-aggregator.c b/libempathy-gtk/empathy-roster-model-aggregator.c
new file mode 100644
index 000000000..75289dc7d
--- /dev/null
+++ b/libempathy-gtk/empathy-roster-model-aggregator.c
@@ -0,0 +1,165 @@
+/*
+ * empathy-roster-model-aggregator.c
+ *
+ * Copyright (C) 2012 Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+#include "config.h"
+
+#include "empathy-roster-model-aggregator.h"
+
+/**
+ * SECTION: empathy-roster-model-aggregator
+ * @title: EmpathyRosterModelAggregator
+ * @short_description: TODO
+ *
+ * TODO
+ */
+
+/**
+ * EmpathyRosterModelAggregator:
+ *
+ * Data structure representing a #EmpathyRosterModelAggregator.
+ *
+ * Since: UNRELEASED
+ */
+
+/**
+ * EmpathyRosterModelAggregatorClass:
+ *
+ * The class of a #EmpathyRosterModelAggregator.
+ *
+ * Since: UNRELEASED
+ */
+
+G_DEFINE_TYPE (EmpathyRosterModelAggregator, empathy_roster_model_aggregator, G_TYPE_OBJECT)
+
+enum
+{
+ PROP_FIRST_PROP = 1,
+ N_PROPS
+};
+
+/*
+enum
+{
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+*/
+
+struct _EmpathyRosterModelAggregatorPriv
+{
+ gpointer badger;
+};
+
+static void
+empathy_roster_model_aggregator_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ //EmpathyRosterModelAggregator *self = EMPATHY_ROSTER_MODEL_AGGREGATOR (object);
+
+ switch (property_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+empathy_roster_model_aggregator_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ //EmpathyRosterModelAggregator *self = EMPATHY_ROSTER_MODEL_AGGREGATOR (object);
+
+ switch (property_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+empathy_roster_model_aggregator_constructed (GObject *object)
+{
+ //EmpathyRosterModelAggregator *self = EMPATHY_ROSTER_MODEL_AGGREGATOR (object);
+ void (*chain_up) (GObject *) =
+ ((GObjectClass *) empathy_roster_model_aggregator_parent_class)->constructed;
+
+ if (chain_up != NULL)
+ chain_up (object);
+}
+
+static void
+empathy_roster_model_aggregator_dispose (GObject *object)
+{
+ //EmpathyRosterModelAggregator *self = EMPATHY_ROSTER_MODEL_AGGREGATOR (object);
+ void (*chain_up) (GObject *) =
+ ((GObjectClass *) empathy_roster_model_aggregator_parent_class)->dispose;
+
+ if (chain_up != NULL)
+ chain_up (object);
+}
+
+static void
+empathy_roster_model_aggregator_finalize (GObject *object)
+{
+ //EmpathyRosterModelAggregator *self = EMPATHY_ROSTER_MODEL_AGGREGATOR (object);
+ void (*chain_up) (GObject *) =
+ ((GObjectClass *) empathy_roster_model_aggregator_parent_class)->finalize;
+
+ if (chain_up != NULL)
+ chain_up (object);
+}
+
+static void
+empathy_roster_model_aggregator_class_init (
+ EmpathyRosterModelAggregatorClass *klass)
+{
+ GObjectClass *oclass = G_OBJECT_CLASS (klass);
+ //GParamSpec *spec;
+
+ oclass->get_property = empathy_roster_model_aggregator_get_property;
+ oclass->set_property = empathy_roster_model_aggregator_set_property;
+ oclass->constructed = empathy_roster_model_aggregator_constructed;
+ oclass->dispose = empathy_roster_model_aggregator_dispose;
+ oclass->finalize = empathy_roster_model_aggregator_finalize;
+
+ g_type_class_add_private (klass, sizeof (EmpathyRosterModelAggregatorPriv));
+}
+
+static void
+empathy_roster_model_aggregator_init (EmpathyRosterModelAggregator *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
+ EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR, EmpathyRosterModelAggregatorPriv);
+}
+
+EmpathyRosterModelAggregator *
+empathy_roster_model_aggregator_new (void)
+{
+ return g_object_new (EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR,
+ NULL);
+}
diff --git a/libempathy-gtk/empathy-roster-model-aggregator.h b/libempathy-gtk/empathy-roster-model-aggregator.h
new file mode 100644
index 000000000..2beb3c00b
--- /dev/null
+++ b/libempathy-gtk/empathy-roster-model-aggregator.h
@@ -0,0 +1,74 @@
+/*
+ * empathy-roster-model-aggregator.h
+ *
+ * Copyright (C) 2012 Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+#ifndef __EMPATHY_ROSTER_MODEL_AGGREGATOR_H__
+#define __EMPATHY_ROSTER_MODEL_AGGREGATOR_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+typedef struct _EmpathyRosterModelAggregator EmpathyRosterModelAggregator;
+typedef struct _EmpathyRosterModelAggregatorClass EmpathyRosterModelAggregatorClass;
+typedef struct _EmpathyRosterModelAggregatorPriv EmpathyRosterModelAggregatorPriv;
+
+struct _EmpathyRosterModelAggregatorClass
+{
+ /*<private>*/
+ GObjectClass parent_class;
+};
+
+struct _EmpathyRosterModelAggregator
+{
+ /*<private>*/
+ GObject parent;
+ EmpathyRosterModelAggregatorPriv *priv;
+};
+
+GType empathy_roster_model_aggregator_get_type (void);
+
+/* TYPE MACROS */
+#define EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR \
+ (empathy_roster_model_aggregator_get_type ())
+#define EMPATHY_ROSTER_MODEL_AGGREGATOR(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), \
+ EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR, \
+ EmpathyRosterModelAggregator))
+#define EMPATHY_ROSTER_MODEL_AGGREGATOR_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), \
+ EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR, \
+ EmpathyRosterModelAggregatorClass))
+#define EMPATHY_IS_ROSTER_MODEL_AGGREGATOR(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
+ EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR))
+#define EMPATHY_IS_ROSTER_MODEL_AGGREGATOR_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass), \
+ EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR))
+#define EMPATHY_ROSTER_MODEL_AGGREGATOR_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR, \
+ EmpathyRosterModelAggregatorClass))
+
+EmpathyRosterModelAggregator * empathy_roster_model_aggregator_new (void);
+
+G_END_DECLS
+
+#endif /* #ifndef __EMPATHY_ROSTER_MODEL_AGGREGATOR_H__*/