]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-persona-store.h
factor out start_gnome_contacts()
[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_ACCOUNT_NAME,
62   EMPATHY_PERSONA_STORE_COL_DISPLAY_ID,
63   EMPATHY_PERSONA_STORE_COL_PRESENCE_TYPE,
64   EMPATHY_PERSONA_STORE_COL_STATUS,
65   EMPATHY_PERSONA_STORE_COL_PERSONA,
66   EMPATHY_PERSONA_STORE_COL_IS_ACTIVE,
67   EMPATHY_PERSONA_STORE_COL_IS_ONLINE,
68   EMPATHY_PERSONA_STORE_COL_CAN_AUDIO_CALL,
69   EMPATHY_PERSONA_STORE_COL_CAN_VIDEO_CALL,
70   EMPATHY_PERSONA_STORE_COL_COUNT,
71 } EmpathyPersonaStoreCol;
72
73 typedef struct
74 {
75   GtkListStore parent;
76   gpointer priv;
77 } EmpathyPersonaStore;
78
79 typedef struct
80 {
81   GtkListStoreClass parent_class;
82 } EmpathyPersonaStoreClass;
83
84 GType empathy_persona_store_get_type (void) G_GNUC_CONST;
85
86 EmpathyPersonaStore *empathy_persona_store_new (FolksIndividual *individual);
87
88 FolksIndividual *empathy_persona_store_get_individual (
89     EmpathyPersonaStore *self);
90 void empathy_persona_store_set_individual (EmpathyPersonaStore *self,
91     FolksIndividual *individual);
92
93 gboolean empathy_persona_store_get_show_avatars (EmpathyPersonaStore *self);
94 void empathy_persona_store_set_show_avatars (EmpathyPersonaStore *self,
95     gboolean show_avatars);
96
97 gboolean empathy_persona_store_get_show_protocols (EmpathyPersonaStore *self);
98 void empathy_persona_store_set_show_protocols   (EmpathyPersonaStore *self,
99     gboolean show_protocols);
100
101 EmpathyPersonaStoreSort empathy_persona_store_get_sort_criterion (
102     EmpathyPersonaStore *self);
103 void empathy_persona_store_set_sort_criterion (EmpathyPersonaStore *self,
104     EmpathyPersonaStoreSort sort_criterion);
105
106 G_END_DECLS
107
108 #endif /* __EMPATHY_PERSONA_STORE_H__ */