]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-persona-store.h
Add EmpathyPersonaStore and EmpathyPersonaView
[empathy.git] / libempathy-gtk / empathy-persona-store.h
1 /*
2  * Copyright (C) 2005-2007 Imendio AB
3  * Copyright (C) 2007-2008, 2010 Collabora Ltd.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18  * Boston, MA  02110-1301  USA
19  *
20  * Authors: Mikael Hallendal <micke@imendio.com>
21  *          Martyn Russell <martyn@imendio.com>
22  *          Xavier Claessens <xclaesse@gmail.com>
23  *          Philip Withnall <philip.withnall@collabora.co.uk>
24  *
25  * Based off EmpathyContactListStore.
26  */
27
28 #ifndef __EMPATHY_PERSONA_STORE_H__
29 #define __EMPATHY_PERSONA_STORE_H__
30
31 #include <gtk/gtk.h>
32
33 #include <folks/folks.h>
34
35 G_BEGIN_DECLS
36
37 #define EMPATHY_TYPE_PERSONA_STORE (empathy_persona_store_get_type ())
38 #define EMPATHY_PERSONA_STORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
39     EMPATHY_TYPE_PERSONA_STORE, EmpathyPersonaStore))
40 #define EMPATHY_PERSONA_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
41     EMPATHY_TYPE_PERSONA_STORE, EmpathyPersonaStoreClass))
42 #define EMPATHY_IS_PERSONA_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
43     EMPATHY_TYPE_PERSONA_STORE))
44 #define EMPATHY_IS_PERSONA_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
45     EMPATHY_TYPE_PERSONA_STORE))
46 #define EMPATHY_PERSONA_STORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
47     EMPATHY_TYPE_PERSONA_STORE, EmpathyPersonaStoreClass))
48
49 typedef enum
50 {
51   EMPATHY_PERSONA_STORE_SORT_STATE,
52   EMPATHY_PERSONA_STORE_SORT_NAME
53 } EmpathyPersonaStoreSort;
54
55 typedef enum
56 {
57   EMPATHY_PERSONA_STORE_COL_ICON_STATUS,
58   EMPATHY_PERSONA_STORE_COL_PIXBUF_AVATAR,
59   EMPATHY_PERSONA_STORE_COL_PIXBUF_AVATAR_VISIBLE,
60   EMPATHY_PERSONA_STORE_COL_NAME,
61   EMPATHY_PERSONA_STORE_COL_DISPLAY_ID,
62   EMPATHY_PERSONA_STORE_COL_PRESENCE_TYPE,
63   EMPATHY_PERSONA_STORE_COL_STATUS,
64   EMPATHY_PERSONA_STORE_COL_PERSONA,
65   EMPATHY_PERSONA_STORE_COL_IS_ACTIVE,
66   EMPATHY_PERSONA_STORE_COL_IS_ONLINE,
67   EMPATHY_PERSONA_STORE_COL_CAN_AUDIO_CALL,
68   EMPATHY_PERSONA_STORE_COL_CAN_VIDEO_CALL,
69   EMPATHY_PERSONA_STORE_COL_COUNT,
70 } EmpathyPersonaStoreCol;
71
72 typedef struct
73 {
74   GtkListStore parent;
75   gpointer priv;
76 } EmpathyPersonaStore;
77
78 typedef struct
79 {
80   GtkListStoreClass parent_class;
81 } EmpathyPersonaStoreClass;
82
83 GType empathy_persona_store_get_type (void) G_GNUC_CONST;
84
85 EmpathyPersonaStore *empathy_persona_store_new (FolksIndividual *individual);
86
87 FolksIndividual *empathy_persona_store_get_individual (
88     EmpathyPersonaStore *self);
89 void empathy_persona_store_set_individual (EmpathyPersonaStore *self,
90     FolksIndividual *individual);
91
92 gboolean empathy_persona_store_get_show_avatars (EmpathyPersonaStore *self);
93 void empathy_persona_store_set_show_avatars (EmpathyPersonaStore *self,
94     gboolean show_avatars);
95
96 gboolean empathy_persona_store_get_show_protocols (EmpathyPersonaStore *self);
97 void empathy_persona_store_set_show_protocols   (EmpathyPersonaStore *self,
98     gboolean show_protocols);
99
100 EmpathyPersonaStoreSort empathy_persona_store_get_sort_criterion (
101     EmpathyPersonaStore *self);
102 void empathy_persona_store_set_sort_criterion (EmpathyPersonaStore *self,
103     EmpathyPersonaStoreSort sort_criterion);
104
105 G_END_DECLS
106
107 #endif /* __EMPATHY_PERSONA_STORE_H__ */