]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-roster-model.h
L10N: Updated Persian Translation
[empathy.git] / libempathy-gtk / empathy-roster-model.h
1 /*
2  * empathy-roster-model.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 #ifndef __EMPATHY_ROSTER_MODEL_H__
21 #define __EMPATHY_ROSTER_MODEL_H__
22
23 #include <glib-object.h>
24
25 #include <folks/folks.h>
26
27 G_BEGIN_DECLS
28
29 #define EMPATHY_ROSTER_MODEL_GROUP_TOP_GROUP _("Top Contacts")
30 #define EMPATHY_ROSTER_MODEL_GROUP_PEOPLE_NEARBY _("People Nearby")
31 #define EMPATHY_ROSTER_MODEL_GROUP_UNGROUPED _("Ungrouped")
32
33 typedef struct _EmpathyRosterModel EmpathyRosterModel;
34 typedef struct _EmpathyRosterModelInterface EmpathyRosterModelInterface;
35
36 struct _EmpathyRosterModelInterface
37 {
38   /*<private>*/
39   GTypeInterface g_iface;
40
41   /* Virtual table */
42   GList * (* get_individuals) (EmpathyRosterModel *self);
43   GList * (*dup_groups_for_individual) (EmpathyRosterModel *self,
44       FolksIndividual *individual);
45 };
46
47 GType empathy_roster_model_get_type (void);
48
49 /* TYPE MACROS */
50 #define EMPATHY_TYPE_ROSTER_MODEL \
51   (empathy_roster_model_get_type ())
52 #define EMPATHY_ROSTER_MODEL(obj) \
53   (G_TYPE_CHECK_INSTANCE_CAST((obj), \
54     EMPATHY_TYPE_ROSTER_MODEL, \
55     EmpathyRosterModel))
56 #define EMPATHY_IS_ROSTER_MODEL(obj) \
57   (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
58     EMPATHY_TYPE_ROSTER_MODEL))
59 #define EMPATHY_ROSTER_MODEL_GET_IFACE(obj) \
60   (G_TYPE_INSTANCE_GET_INTERFACE ((obj), \
61     EMPATHY_TYPE_ROSTER_MODEL, \
62     EmpathyRosterModelInterface))
63
64 /* Restricted */
65
66 void empathy_roster_model_fire_individual_added (EmpathyRosterModel *self,
67     FolksIndividual *individual);
68
69 void empathy_roster_model_fire_individual_removed (EmpathyRosterModel *self,
70     FolksIndividual *individual);
71
72 void empathy_roster_model_fire_groups_changed (EmpathyRosterModel *self,
73     FolksIndividual *individual,
74     const gchar *group,
75     gboolean is_member);
76
77 /* Public API */
78 GList * empathy_roster_model_get_individuals (EmpathyRosterModel *self);
79
80 GList * empathy_roster_model_dup_groups_for_individual (
81     EmpathyRosterModel *self,
82     FolksIndividual *individual);
83
84 G_END_DECLS
85
86 #endif /* #ifndef __EMPATHY_ROSTER_MODEL_H__*/