]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-individual-store.h
Updated Spanish Translation
[empathy.git] / libempathy-gtk / empathy-individual-store.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2005-2007 Imendio AB
4  * Copyright (C) 2007-2010 Collabora Ltd.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program 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  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public
17  * License along with this program; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19  * Boston, MA  02110-1301  USA
20  *
21  * Authors: Mikael Hallendal <micke@imendio.com>
22  *          Martyn Russell <martyn@imendio.com>
23  *          Xavier Claessens <xclaesse@gmail.com>
24  *          Travis Reitter <travis.reitter@collabora.co.uk>
25  */
26
27 #ifndef __EMPATHY_INDIVIDUAL_STORE_H__
28 #define __EMPATHY_INDIVIDUAL_STORE_H__
29
30 #include <gtk/gtk.h>
31 #include <folks/folks.h>
32
33 G_BEGIN_DECLS
34 #define EMPATHY_TYPE_INDIVIDUAL_STORE         (empathy_individual_store_get_type ())
35 #define EMPATHY_INDIVIDUAL_STORE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_INDIVIDUAL_STORE, EmpathyIndividualStore))
36 #define EMPATHY_INDIVIDUAL_STORE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_INDIVIDUAL_STORE, EmpathyIndividualStoreClass))
37 #define EMPATHY_IS_INDIVIDUAL_STORE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_INDIVIDUAL_STORE))
38 #define EMPATHY_IS_INDIVIDUAL_STORE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_INDIVIDUAL_STORE))
39 #define EMPATHY_INDIVIDUAL_STORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_INDIVIDUAL_STORE, EmpathyIndividualStoreClass))
40
41 typedef struct _EmpathyIndividualStore EmpathyIndividualStore;
42 typedef struct _EmpathyIndividualStoreClass EmpathyIndividualStoreClass;
43 typedef struct _EmpathyIndividualStorePriv EmpathyIndividualStorePriv;
44
45 typedef enum
46 {
47   EMPATHY_INDIVIDUAL_STORE_SORT_STATE,
48   EMPATHY_INDIVIDUAL_STORE_SORT_NAME
49 } EmpathyIndividualStoreSort;
50
51 typedef enum
52 {
53   EMPATHY_INDIVIDUAL_STORE_COL_ICON_STATUS,
54   EMPATHY_INDIVIDUAL_STORE_COL_PIXBUF_AVATAR,
55   EMPATHY_INDIVIDUAL_STORE_COL_PIXBUF_AVATAR_VISIBLE,
56   EMPATHY_INDIVIDUAL_STORE_COL_NAME,
57   EMPATHY_INDIVIDUAL_STORE_COL_PRESENCE_TYPE,
58   EMPATHY_INDIVIDUAL_STORE_COL_STATUS,
59   EMPATHY_INDIVIDUAL_STORE_COL_COMPACT,
60   EMPATHY_INDIVIDUAL_STORE_COL_INDIVIDUAL,
61   EMPATHY_INDIVIDUAL_STORE_COL_IS_GROUP,
62   EMPATHY_INDIVIDUAL_STORE_COL_IS_ACTIVE,
63   EMPATHY_INDIVIDUAL_STORE_COL_IS_ONLINE,
64   EMPATHY_INDIVIDUAL_STORE_COL_IS_SEPARATOR,
65   EMPATHY_INDIVIDUAL_STORE_COL_CAN_AUDIO_CALL,
66   EMPATHY_INDIVIDUAL_STORE_COL_CAN_VIDEO_CALL,
67   EMPATHY_INDIVIDUAL_STORE_COL_IS_FAKE_GROUP,
68   EMPATHY_INDIVIDUAL_STORE_COL_CLIENT_TYPES,
69   EMPATHY_INDIVIDUAL_STORE_COL_EVENT_COUNT,
70   EMPATHY_INDIVIDUAL_STORE_COL_COUNT,
71 } EmpathyIndividualStoreCol;
72
73 #define EMPATHY_INDIVIDUAL_STORE_UNGROUPED _("Ungrouped")
74 #define EMPATHY_INDIVIDUAL_STORE_FAVORITE  _("Favorite People")
75 #define EMPATHY_INDIVIDUAL_STORE_PEOPLE_NEARBY _("People Nearby")
76
77 struct _EmpathyIndividualStore
78 {
79   GtkTreeStore parent;
80   EmpathyIndividualStorePriv *priv;
81 };
82
83 struct _EmpathyIndividualStoreClass
84 {
85   GtkTreeStoreClass parent_class;
86
87   void (*reload_individuals) (EmpathyIndividualStore *self);
88   gboolean (*initial_loading) (EmpathyIndividualStore *self);
89 };
90
91 GType
92 empathy_individual_store_get_type (void) G_GNUC_CONST;
93
94 gboolean empathy_individual_store_get_show_avatars (
95     EmpathyIndividualStore *store);
96
97 void empathy_individual_store_set_show_avatars (EmpathyIndividualStore *store,
98     gboolean show_avatars);
99
100 gboolean empathy_individual_store_get_show_groups (
101     EmpathyIndividualStore *store);
102
103 void empathy_individual_store_set_show_groups (EmpathyIndividualStore *store,
104     gboolean show_groups);
105
106 gboolean empathy_individual_store_get_is_compact (
107     EmpathyIndividualStore *store);
108
109 void empathy_individual_store_set_is_compact (EmpathyIndividualStore *store,
110     gboolean is_compact);
111
112 gboolean empathy_individual_store_get_show_protocols (
113     EmpathyIndividualStore *store);
114
115 void empathy_individual_store_set_show_protocols (
116     EmpathyIndividualStore *store,
117     gboolean show_protocols);
118
119 EmpathyIndividualStoreSort empathy_individual_store_get_sort_criterium (
120     EmpathyIndividualStore *store);
121
122 void empathy_individual_store_set_sort_criterium (
123     EmpathyIndividualStore *store,
124     EmpathyIndividualStoreSort sort_criterium);
125
126 gboolean empathy_individual_store_row_separator_func (GtkTreeModel *model,
127     GtkTreeIter *iter,
128     gpointer data);
129
130 gchar *empathy_individual_store_get_parent_group (GtkTreeModel *model,
131     GtkTreePath *path,
132     gboolean *path_is_group,
133     gboolean *is_fake_group);
134
135 GdkPixbuf *empathy_individual_store_get_individual_status_icon (
136     EmpathyIndividualStore *store,
137     FolksIndividual *individual);
138
139 void individual_store_add_individual_and_connect (EmpathyIndividualStore *self,
140     FolksIndividual *individual);
141
142 void individual_store_remove_individual_and_disconnect (
143     EmpathyIndividualStore *self,
144     FolksIndividual *individual);
145
146 /* protected */
147
148 GList *empathy_individual_store_find_contact (EmpathyIndividualStore *self,
149     FolksIndividual *individual);
150
151 void empathy_individual_store_free_iters (GList *iters);
152
153 void empathy_individual_store_disconnect_individual (
154     EmpathyIndividualStore *self,
155     FolksIndividual *individual);
156
157 void empathy_individual_store_remove_individual (EmpathyIndividualStore *self,
158     FolksIndividual *individual);
159
160 void empathy_individual_store_add_individual (EmpathyIndividualStore *self,
161     FolksIndividual *individual);
162
163 void empathy_individual_store_refresh_individual (EmpathyIndividualStore *self,
164     FolksIndividual *individual);
165
166 G_END_DECLS
167 #endif /* __EMPATHY_INDIVIDUAL_STORE_H__ */