1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * pas-backend-summary.h
4 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
7 * Chris Toshok <toshok@ximian.com>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License, version 2, as published by the Free Software Foundation.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 #ifndef E_BOOK_BACKEND_SUMMARY_H
25 #define E_BOOK_BACKEND_SUMMARY_H
27 #include <libedata-book/e-data-book-types.h>
28 #include <libebook/e-contact.h>
30 /* Standard GObject macros */
31 #define E_TYPE_BOOK_BACKEND_SUMMARY \
32 (e_book_backend_summary_get_type ())
33 #define E_BOOK_BACKEND_SUMMARY(obj) \
34 (G_TYPE_CHECK_INSTANCE_CAST \
35 ((obj), E_TYPE_BOOK_BACKEND_SUMMARY, EBookBackendSummary))
36 #define E_BOOK_BACKEND_SUMMARY_CLASS(cls) \
37 (G_TYPE_CHECK_CLASS_CAST \
38 ((cls), E_TYPE_BOOK_BACKEND_SUMMARY, EBookBackendSummaryClass))
39 #define E_IS_BOOK_BACKEND_SUMMARY(obj) \
40 (G_TYPE_CHECK_INSTANCE_TYPE \
41 ((obj), E_TYPE_BOOK_BACKEND_SUMMARY))
42 #define E_IS_BOOK_BACKEND_SUMMARY_CLASS(cls) \
43 (G_TYPE_CHECK_CLASS_TYPE \
44 ((cls), E_TYPE_BOOK_BACKEND_SUMMARY))
45 #define E_BOOK_BACKEND_SUMMARY_GET_CLASS(cls) \
46 (G_TYPE_INSTANCE_GET_CLASS \
47 ((obj), E_TYPE_BOOK_BACKEND_SUMMARY, EBookBackendSummaryClass))
51 typedef struct _EBookBackendSummary EBookBackendSummary;
52 typedef struct _EBookBackendSummaryClass EBookBackendSummaryClass;
53 typedef struct _EBookBackendSummaryPrivate EBookBackendSummaryPrivate;
55 struct _EBookBackendSummary{
56 GObject parent_object;
57 EBookBackendSummaryPrivate *priv;
60 struct _EBookBackendSummaryClass{
61 GObjectClass parent_class;
64 GType e_book_backend_summary_get_type (void) G_GNUC_CONST;
66 e_book_backend_summary_new (const gchar *summary_path,
67 gint flush_timeout_millis);
69 /* returns FALSE if the load fails for any reason (including that the
70 * summary is out of date), TRUE if it succeeds */
71 gboolean e_book_backend_summary_load (EBookBackendSummary *summary);
72 /* returns FALSE if the save fails, TRUE if it succeeds (or isn't required due to no changes) */
73 gboolean e_book_backend_summary_save (EBookBackendSummary *summary);
75 void e_book_backend_summary_add_contact
76 (EBookBackendSummary *summary,
78 void e_book_backend_summary_remove_contact
79 (EBookBackendSummary *summary,
81 gboolean e_book_backend_summary_check_contact
82 (EBookBackendSummary *summary,
85 void e_book_backend_summary_touch (EBookBackendSummary *summary);
87 /* returns TRUE if the summary's mtime is >= @t. */
88 gboolean e_book_backend_summary_is_up_to_date
89 (EBookBackendSummary *summary,
92 gboolean e_book_backend_summary_is_summary_query
93 (EBookBackendSummary *summary,
95 GPtrArray * e_book_backend_summary_search (EBookBackendSummary *summary,
97 gchar * e_book_backend_summary_get_summary_vcard
98 (EBookBackendSummary *summary,
103 #endif /* E_BOOK_BACKEND_SUMMARY_H */