]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-roster-model-aggregator.h
UOA: Do not segfault when "Done" or "Cancel" button clicked but widget is not ready yet
[empathy.git] / libempathy-gtk / empathy-roster-model-aggregator.h
1 /*
2  * empathy-roster-model-aggregator.h
3  *
4  * Copyright (C) 2012 Collabora Ltd. <http://www.collabora.co.uk/>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  */
20
21
22 #ifndef __EMPATHY_ROSTER_MODEL_AGGREGATOR_H__
23 #define __EMPATHY_ROSTER_MODEL_AGGREGATOR_H__
24
25 #include <glib-object.h>
26
27 #include <folks/folks.h>
28
29 #include "empathy-roster-model.h"
30
31 G_BEGIN_DECLS
32
33 typedef struct _EmpathyRosterModelAggregator EmpathyRosterModelAggregator;
34 typedef struct _EmpathyRosterModelAggregatorClass
35 EmpathyRosterModelAggregatorClass;
36 typedef struct _EmpathyRosterModelAggregatorPriv
37 EmpathyRosterModelAggregatorPriv;
38
39 struct _EmpathyRosterModelAggregatorClass
40 {
41   /*<private>*/
42   GObjectClass parent_class;
43 };
44
45 struct _EmpathyRosterModelAggregator
46 {
47   /*<private>*/
48   GObject parent;
49   EmpathyRosterModelAggregatorPriv *priv;
50 };
51
52 typedef gboolean (* EmpathyRosterModelAggregatorFilterFunc) (
53     EmpathyRosterModel *model,
54     FolksIndividual *individual,
55     gpointer user_data);
56
57 GType empathy_roster_model_aggregator_get_type (void);
58
59 /* TYPE MACROS */
60 #define EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR \
61   (empathy_roster_model_aggregator_get_type ())
62 #define EMPATHY_ROSTER_MODEL_AGGREGATOR(obj) \
63   (G_TYPE_CHECK_INSTANCE_CAST((obj), \
64     EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR, \
65     EmpathyRosterModelAggregator))
66 #define EMPATHY_ROSTER_MODEL_AGGREGATOR_CLASS(klass) \
67   (G_TYPE_CHECK_CLASS_CAST((klass), \
68     EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR, \
69     EmpathyRosterModelAggregatorClass))
70 #define EMPATHY_IS_ROSTER_MODEL_AGGREGATOR(obj) \
71   (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
72     EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR))
73 #define EMPATHY_IS_ROSTER_MODEL_AGGREGATOR_CLASS(klass) \
74   (G_TYPE_CHECK_CLASS_TYPE((klass), \
75     EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR))
76 #define EMPATHY_ROSTER_MODEL_AGGREGATOR_GET_CLASS(obj) \
77   (G_TYPE_INSTANCE_GET_CLASS ((obj), \
78     EMPATHY_TYPE_ROSTER_MODEL_AGGREGATOR, \
79     EmpathyRosterModelAggregatorClass))
80
81 EmpathyRosterModelAggregator * empathy_roster_model_aggregator_new (
82     EmpathyRosterModelAggregatorFilterFunc filter_func,
83     gpointer user_data);
84
85 EmpathyRosterModelAggregator *
86 empathy_roster_model_aggregator_new_with_aggregator (
87     FolksIndividualAggregator *aggregator,
88     EmpathyRosterModelAggregatorFilterFunc filter_func,
89     gpointer user_data);
90
91 G_END_DECLS
92
93 #endif /* #ifndef __EMPATHY_ROSTER_MODEL_AGGREGATOR_H__*/