Assamese translation updated
[platform/upstream/evolution-data-server.git] / libedataserverui / e-destination-store.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
3 /* e-destination-store.h - EDestination store with GtkTreeModel interface.
4  *
5  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of version 2 of the GNU Lesser General Public
9  * License as published by the Free Software Foundation.
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
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  *
20  * Authors: Hans Petter Jansson <hpj@novell.com>
21  */
22
23 #if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
24 #error "Only <libedataserverui/libedataserverui.h> should be included directly."
25 #endif
26
27 #ifndef E_DESTINATION_STORE_H
28 #define E_DESTINATION_STORE_H
29
30 #include <gtk/gtk.h>
31 #include <libebook/libebook.h>
32
33 /* Standard GObject macros */
34 #define E_TYPE_DESTINATION_STORE \
35         (e_destination_store_get_type ())
36 #define E_DESTINATION_STORE(obj) \
37         (G_TYPE_CHECK_INSTANCE_CAST \
38         ((obj), E_TYPE_DESTINATION_STORE, EDestinationStore))
39 #define E_DESTINATION_STORE_CLASS(cls) \
40         (G_TYPE_CHECK_CLASS_CAST \
41         ((cls), E_TYPE_DESTINATION_STORE, EDestinationStoreClass))
42 #define E_IS_DESTINATION_STORE(obj) \
43         (G_TYPE_CHECK_INSTANCE_TYPE \
44         ((obj), E_TYPE_DESTINATION_STORE))
45 #define E_IS_DESTINATION_STORE_CLASS(cls) \
46         (G_TYPE_CHECK_CLASS_TYPE \
47         ((cls), E_TYPE_DESTINATION_STORE))
48 #define E_DESTINATION_STORE_GET_CLASS(obj) \
49         (G_TYPE_INSTANCE_GET_CLASS \
50         ((obj), E_TYPE_DESTINATION_STORE, EDestinationStoreClass))
51
52 G_BEGIN_DECLS
53
54 typedef struct _EDestinationStore EDestinationStore;
55 typedef struct _EDestinationStoreClass EDestinationStoreClass;
56 typedef struct _EDestinationStorePrivate EDestinationStorePrivate;
57
58 struct _EDestinationStore {
59         GObject parent;
60         EDestinationStorePrivate *priv;
61 };
62
63 struct _EDestinationStoreClass {
64         GObjectClass parent_class;
65 };
66
67 typedef enum {
68         E_DESTINATION_STORE_COLUMN_NAME,
69         E_DESTINATION_STORE_COLUMN_EMAIL,
70         E_DESTINATION_STORE_COLUMN_ADDRESS,
71         E_DESTINATION_STORE_NUM_COLUMNS
72 } EDestinationStoreColumnType;
73
74 GType           e_destination_store_get_type    (void);
75 EDestinationStore *
76                 e_destination_store_new         (void);
77 EDestination *  e_destination_store_get_destination
78                                                 (EDestinationStore *destination_store,
79                                                  GtkTreeIter *iter);
80
81 /* Returns a shallow copy; free the list when done, but don't unref elements */
82 GList *         e_destination_store_list_destinations
83                                                 (EDestinationStore *destination_store);
84
85 void            e_destination_store_insert_destination
86                                                 (EDestinationStore *destination_store,
87                                                  gint index,
88                                                  EDestination *destination);
89 void            e_destination_store_append_destination
90                                                 (EDestinationStore *destination_store,
91                                                  EDestination *destination);
92 void            e_destination_store_remove_destination
93                                                 (EDestinationStore *destination_store,
94                                                  EDestination *destination);
95 void            e_destination_store_remove_destination_nth
96                                                 (EDestinationStore *destination_store,
97                                                  gint n);
98 guint           e_destination_store_get_destination_count
99                                                 (EDestinationStore *destination_store);
100 GtkTreePath *   e_destination_store_get_path    (GtkTreeModel *tree_model,
101                                                  GtkTreeIter *iter);
102 gint            e_destination_store_get_stamp   (EDestinationStore *destination_store);
103
104 G_END_DECLS
105
106 #endif  /* E_DESTINATION_STORE_H */