]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-roster-model-aggregator.c
EmpathyRosterModelAggregator implements EmpathyRosterModel iface
[empathy.git] / libempathy-gtk / empathy-roster-model-aggregator.c
1 /*
2  * empathy-roster-model-aggregator.c
3  *
4  * Implementation of EmpathyRosterModel using FolksIndividualAggregator as
5  * source.
6  *
7  * Copyright (C) 2012 Collabora Ltd. <http://www.collabora.co.uk/>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22  */
23
24
25 #include "config.h"
26
27 #include "empathy-roster-model-aggregator.h"
28
29 #include "empathy-roster-model.h"
30
31 /**
32  * SECTION: empathy-roster-model-aggregator
33  * @title: EmpathyRosterModelAggregator
34  * @short_description: TODO
35  *
36  * TODO
37  */
38
39 /**
40  * EmpathyRosterModelAggregator:
41  *
42  * Data structure representing a #EmpathyRosterModelAggregator.
43  *
44  * Since: UNRELEASED
45  */
46
47 /**
48  * EmpathyRosterModelAggregatorClass:
49  *
50  * The class of a #EmpathyRosterModelAggregator.
51  *
52  * Since: UNRELEASED
53  */
54
55 static void roster_model_iface_init (EmpathyRosterModelInterface *iface);
56
57 G_DEFINE_TYPE_WITH_CODE (EmpathyRosterModelAggregator,
58     empathy_roster_model_aggregator,
59     G_TYPE_OBJECT,
60     G_IMPLEMENT_INTERFACE (EMPATHY_TYPE_ROSTER_MODEL, roster_model_iface_init))
61
62 enum
63 {
64   PROP_FIRST_PROP = 1,
65   N_PROPS
66 };
67
68 /*
69 enum
70 {
71   LAST_SIGNAL
72 };
73
74 static guint signals[LAST_SIGNAL];
75 */
76
77 struct _EmpathyRosterModelAggregatorPriv
78 {
79   gpointer badger;
80 };
81
82 static void
83 empathy_roster_model_aggregator_get_property (GObject *object,
84     guint property_id,
85     GValue *value,
86     GParamSpec *pspec)
87 {
88   //EmpathyRosterModelAggregator *self = EMPATHY_ROSTER_MODEL_AGGREGATOR (object);
89
90   switch (property_id)
91     {
92       default:
93         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
94         break;
95     }
96 }
97
98 static void
99 empathy_roster_model_aggregator_set_property (GObject *object,
100     guint property_id,
101     const GValue *value,
102     GParamSpec *pspec)
103 {
104   //EmpathyRosterModelAggregator *self = EMPATHY_ROSTER_MODEL_AGGREGATOR (object);
105
106   switch (property_id)
107     {
108       default:
109         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
110         break;
111     }
112 }
113
114 static void
115 empathy_roster_model_aggregator_constructed (GObject *object)
116 {
117   //EmpathyRosterModelAggregator *self = EMPATHY_ROSTER_MODEL_AGGREGATOR (object);
118   void (*chain_up) (GObject *) =
119       ((GObjectClass *) empathy_roster_model_aggregator_parent_class)->constructed;
120
121   if (chain_up != NULL)
122     chain_up (object);
123 }
124
125 static void
126 empathy_roster_model_aggregator_dispose (GObject *object)
127 {
128   //EmpathyRosterModelAggregator *self = EMPATHY_ROSTER_MODEL_AGGREGATOR (object);
129   void (*chain_up) (GObject *) =
130       ((GObjectClass *) empathy_roster_model_aggregator_parent_class)->dispose;
131
132   if (chain_up != NULL)
133     chain_up (object);
134 }
135
136 static void
137 empathy_roster_model_aggregator_finalize (GObject *object)
138 {
139   //EmpathyRosterModelAggregator *self = EMPATHY_ROSTER_MODEL_AGGREGATOR (object);
140   void (*chain_up) (GObject *) =
141       ((GObjectClass *) empathy_roster_model_aggregator_parent_class)->finalize;
142
143   if (chain_up != NULL)
144     chain_up (object);
145 }
146
147 static void
148 empathy_roster_model_aggregator_class_init (
149     EmpathyRosterModelAggregatorClass *klass)
150 {
151   GObjectClass *oclass = G_OBJECT_CLASS (klass);
152   //GParamSpec *spec;
153
154   oclass->get_property = empathy_roster_model_aggregator_get_property;
155   oclass->set_property = empathy_roster_model_aggregator_set_property;
156   oclass->constructed = empathy_roster_model_aggregator_constructed;
157   oclass->dispose = empathy_roster_model_aggregator_dispose;
158   oclass->finalize = empathy_roster_model_aggregator_finalize;
159
160   g_type_class_add_private (klass, sizeof (EmpathyRosterModelAggregatorPriv));
161 }
162
163 static void
164 empathy_roster_model_aggregator_init (EmpathyRosterModelAggregator *self)
165 {
166   self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
167       EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR, EmpathyRosterModelAggregatorPriv);
168 }
169
170 EmpathyRosterModelAggregator *
171 empathy_roster_model_aggregator_new (void)
172 {
173   return g_object_new (EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR,
174       NULL);
175 }
176
177 static void
178 roster_model_iface_init (EmpathyRosterModelInterface *iface)
179 {
180
181 }