1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 /* e-destination-store.h - EDestination store with GtkTreeModel interface.
5 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
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.
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.
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.
20 * Authors: Hans Petter Jansson <hpj@novell.com>
23 #if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
24 #error "Only <libedataserverui/libedataserverui.h> should be included directly."
27 #ifndef E_DESTINATION_STORE_H
28 #define E_DESTINATION_STORE_H
31 #include <libebook/libebook.h>
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))
54 typedef struct _EDestinationStore EDestinationStore;
55 typedef struct _EDestinationStoreClass EDestinationStoreClass;
56 typedef struct _EDestinationStorePrivate EDestinationStorePrivate;
58 struct _EDestinationStore {
60 EDestinationStorePrivate *priv;
63 struct _EDestinationStoreClass {
64 GObjectClass parent_class;
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;
74 GType e_destination_store_get_type (void);
76 e_destination_store_new (void);
77 EDestination * e_destination_store_get_destination
78 (EDestinationStore *destination_store,
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);
85 void e_destination_store_insert_destination
86 (EDestinationStore *destination_store,
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,
98 guint e_destination_store_get_destination_count
99 (EDestinationStore *destination_store);
100 GtkTreePath * e_destination_store_get_path (GtkTreeModel *tree_model,
102 gint e_destination_store_get_stamp (EDestinationStore *destination_store);
106 #endif /* E_DESTINATION_STORE_H */