1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2005-2007 Imendio AB
4 * Copyright (C) 2007-2010 Collabora Ltd.
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.
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.
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
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>
27 #ifndef __EMPATHY_INDIVIDUAL_STORE_H__
28 #define __EMPATHY_INDIVIDUAL_STORE_H__
32 #include <libempathy/empathy-individual-manager.h>
35 #define EMPATHY_TYPE_INDIVIDUAL_STORE (empathy_individual_store_get_type ())
36 #define EMPATHY_INDIVIDUAL_STORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_INDIVIDUAL_STORE, EmpathyIndividualStore))
37 #define EMPATHY_INDIVIDUAL_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_INDIVIDUAL_STORE, EmpathyIndividualStoreClass))
38 #define EMPATHY_IS_INDIVIDUAL_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_INDIVIDUAL_STORE))
39 #define EMPATHY_IS_INDIVIDUAL_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_INDIVIDUAL_STORE))
40 #define EMPATHY_INDIVIDUAL_STORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_INDIVIDUAL_STORE, EmpathyIndividualStoreClass))
42 typedef struct _EmpathyIndividualStore EmpathyIndividualStore;
43 typedef struct _EmpathyIndividualStoreClass EmpathyIndividualStoreClass;
44 typedef struct _EmpathyIndividualStorePriv EmpathyIndividualStorePriv;
48 EMPATHY_INDIVIDUAL_STORE_SORT_STATE,
49 EMPATHY_INDIVIDUAL_STORE_SORT_NAME
50 } EmpathyIndividualStoreSort;
54 EMPATHY_INDIVIDUAL_STORE_COL_ICON_STATUS,
55 EMPATHY_INDIVIDUAL_STORE_COL_PIXBUF_AVATAR,
56 EMPATHY_INDIVIDUAL_STORE_COL_PIXBUF_AVATAR_VISIBLE,
57 EMPATHY_INDIVIDUAL_STORE_COL_NAME,
58 EMPATHY_INDIVIDUAL_STORE_COL_PRESENCE_TYPE,
59 EMPATHY_INDIVIDUAL_STORE_COL_STATUS,
60 EMPATHY_INDIVIDUAL_STORE_COL_COMPACT,
61 EMPATHY_INDIVIDUAL_STORE_COL_INDIVIDUAL,
62 EMPATHY_INDIVIDUAL_STORE_COL_IS_GROUP,
63 EMPATHY_INDIVIDUAL_STORE_COL_IS_ACTIVE,
64 EMPATHY_INDIVIDUAL_STORE_COL_IS_ONLINE,
65 EMPATHY_INDIVIDUAL_STORE_COL_IS_SEPARATOR,
66 EMPATHY_INDIVIDUAL_STORE_COL_CAN_AUDIO_CALL,
67 EMPATHY_INDIVIDUAL_STORE_COL_CAN_VIDEO_CALL,
68 EMPATHY_INDIVIDUAL_STORE_COL_IS_FAKE_GROUP,
69 EMPATHY_INDIVIDUAL_STORE_COL_CLIENT_TYPES,
70 EMPATHY_INDIVIDUAL_STORE_COL_EVENT_COUNT,
71 EMPATHY_INDIVIDUAL_STORE_COL_COUNT,
72 } EmpathyIndividualStoreCol;
74 #define EMPATHY_INDIVIDUAL_STORE_UNGROUPED _("Ungrouped")
75 #define EMPATHY_INDIVIDUAL_STORE_FAVORITE _("Favorite People")
76 #define EMPATHY_INDIVIDUAL_STORE_PEOPLE_NEARBY _("People Nearby")
78 struct _EmpathyIndividualStore
81 EmpathyIndividualStorePriv *priv;
84 struct _EmpathyIndividualStoreClass
86 GtkTreeStoreClass parent_class;
90 empathy_individual_store_get_type (void) G_GNUC_CONST;
92 EmpathyIndividualStore *empathy_individual_store_new (
93 EmpathyIndividualManager *manager);
95 EmpathyIndividualManager *empathy_individual_store_get_manager (
96 EmpathyIndividualStore *store);
98 gboolean empathy_individual_store_get_show_avatars (
99 EmpathyIndividualStore *store);
101 void empathy_individual_store_set_show_avatars (EmpathyIndividualStore *store,
102 gboolean show_avatars);
104 gboolean empathy_individual_store_get_show_groups (
105 EmpathyIndividualStore *store);
107 void empathy_individual_store_set_show_groups (EmpathyIndividualStore *store,
108 gboolean show_groups);
110 gboolean empathy_individual_store_get_is_compact (
111 EmpathyIndividualStore *store);
113 void empathy_individual_store_set_is_compact (EmpathyIndividualStore *store,
114 gboolean is_compact);
116 gboolean empathy_individual_store_get_show_protocols (
117 EmpathyIndividualStore *store);
119 void empathy_individual_store_set_show_protocols (
120 EmpathyIndividualStore *store,
121 gboolean show_protocols);
123 EmpathyIndividualStoreSort empathy_individual_store_get_sort_criterium (
124 EmpathyIndividualStore *store);
126 void empathy_individual_store_set_sort_criterium (
127 EmpathyIndividualStore *store,
128 EmpathyIndividualStoreSort sort_criterium);
130 gboolean empathy_individual_store_row_separator_func (GtkTreeModel *model,
134 gchar *empathy_individual_store_get_parent_group (GtkTreeModel *model,
136 gboolean *path_is_group,
137 gboolean *is_fake_group);
139 GdkPixbuf *empathy_individual_store_get_individual_status_icon (
140 EmpathyIndividualStore *store,
141 FolksIndividual *individual);
143 void individual_store_add_individual_and_connect (EmpathyIndividualStore *self,
144 FolksIndividual *individual);
146 void individual_store_remove_individual_and_disconnect (
147 EmpathyIndividualStore *self,
148 FolksIndividual *individual);
151 #endif /* __EMPATHY_INDIVIDUAL_STORE_H__ */