1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 /* 3 * Copyright (C) 2013 Intel Corporation 4 * Copyright (C) 2017 Red Hat, Inc. (www.redhat.com) 5 * 6 * This library is free software: you can redistribute it and/or modify it 7 * under the terms of the GNU Lesser General Public License as published by 8 * the Free Software Foundation. 9 * 10 * This library is distributed in the hope that it will be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 13 * for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with this library. If not, see <http://www.gnu.org/licenses/>. 17 * 18 * Authors: Tristan Van Berkom <tristanvb@openismus.com> 19 */ 20 21 #if !defined (__LIBEDATA_BOOK_H_INSIDE__) && !defined (LIBEDATA_BOOK_COMPILATION) 22 #error "Only <libedata-book/libedata-book.h> should be included directly." 23 #endif 24 25 #ifndef E_DATA_BOOK_CURSOR_CACHE_H 26 #define E_DATA_BOOK_CURSOR_CACHE_H 27 28 #include <libedata-book/e-data-book-cursor.h> 29 #include <libedata-book/e-book-cache.h> 30 #include <libedata-book/e-book-backend.h> 31 32 #define E_TYPE_DATA_BOOK_CURSOR_CACHE (e_data_book_cursor_cache_get_type ()) 33 #define E_DATA_BOOK_CURSOR_CACHE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_DATA_BOOK_CURSOR_CACHE, EDataBookCursorCache)) 34 #define E_DATA_BOOK_CURSOR_CACHE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TYPE_DATA_BOOK_CURSOR_CACHE, EDataBookCursorCacheClass)) 35 #define E_IS_DATA_BOOK_CURSOR_CACHE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_DATA_BOOK_CURSOR_CACHE)) 36 #define E_IS_DATA_BOOK_CURSOR_CACHE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_DATA_BOOK_CURSOR_CACHE)) 37 #define E_DATA_BOOK_CURSOR_CACHE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), E_TYPE_DATA_BOOK_CURSOR_CACHE, EDataBookCursorCacheClass)) 38 39 G_BEGIN_DECLS 40 41 typedef struct _EDataBookCursorCache EDataBookCursorCache; 42 typedef struct _EDataBookCursorCacheClass EDataBookCursorCacheClass; 43 typedef struct _EDataBookCursorCachePrivate EDataBookCursorCachePrivate; 44 45 /** 46 * EDataBookCursorCache: 47 * 48 * An opaque handle for the #EBookCache cursor instance. 49 * 50 * Since: 3.26 51 */ 52 struct _EDataBookCursorCache { 53 /*< private >*/ 54 EDataBookCursor parent; 55 EDataBookCursorCachePrivate *priv; 56 }; 57 58 /** 59 * EDataBookCursorCacheClass: 60 * 61 * The #EBookCache cursor class structure. 62 * 63 * Since: 3.26 64 */ 65 struct _EDataBookCursorCacheClass { 66 /*< private >*/ 67 EDataBookCursorClass parent; 68 }; 69 70 GType e_data_book_cursor_cache_get_type (void); 71 EDataBookCursor * 72 e_data_book_cursor_cache_new (EBookBackend *book_backend, 73 EBookCache *book_cache, 74 const EContactField *sort_fields, 75 const EBookCursorSortType *sort_types, 76 guint n_fields, 77 GError **error); 78 79 G_END_DECLS 80 81 #endif /* E_DATA_BOOK_CURSOR_CACHE_H */ 82