/usr/include/evolution-data-server/libedata-book/e-book-backend-sqlitedb.h is in libedata-book1.2-dev 3.28.1-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | /*-*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* e-book-backend-sqlitedb.h
*
* Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
* Copyright (C) 2012 Intel Corporation
*
* This library is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Authors: Chenthill Palanisamy <pchenthill@novell.com>
* Tristan Van Berkom <tristanvb@openismus.com>
*/
#if !defined (__LIBEDATA_BOOK_H_INSIDE__) && !defined (LIBEDATA_BOOK_COMPILATION)
#error "Only <libedata-book/libedata-book.h> should be included directly."
#endif
#ifndef E_BOOK_BACKEND_SQLITEDB_H
#define E_BOOK_BACKEND_SQLITEDB_H
#ifndef EDS_DISABLE_DEPRECATED
#include <libebook-contacts/libebook-contacts.h>
/* Standard GObject macros */
#define E_TYPE_BOOK_BACKEND_SQLITEDB \
(e_book_backend_sqlitedb_get_type ())
#define E_BOOK_BACKEND_SQLITEDB(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_BOOK_BACKEND_SQLITEDB, EBookBackendSqliteDB))
#define E_BOOK_BACKEND_SQLITEDB_CLASS(cls) \
(G_TYPE_CHECK_CLASS_CAST \
((cls), E_TYPE_BOOK_BACKEND_SQLITEDB, EBookBackendSqliteDBClass))
#define E_IS_BOOK_BACKEND_SQLITEDB(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE \
((obj), E_TYPE_BOOK_BACKEND_SQLITEDB))
#define E_IS_BOOK_BACKEND_SQLITEDB_CLASS(cls) \
(G_TYPE_CHECK_CLASS_TYPE \
((cls), E_TYPE_BOOK_BACKEND_SQLITEDB))
#define E_BOOK_BACKEND_SQLITEDB_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS \
((obj), E_TYPE_BOOK_BACKEND_SQLITEDB, EBookBackendSqliteDBClass))
/**
* E_BOOK_SDB_ERROR:
*
* Error domain for #EBookBackendSqliteDB operations.
*
* Since: 3.8
*
* Deprecated: 3.12: Use #EBookSqlite instead
**/
#define E_BOOK_SDB_ERROR (e_book_backend_sqlitedb_error_quark ())
G_BEGIN_DECLS
typedef struct _EBookBackendSqliteDB EBookBackendSqliteDB;
typedef struct _EBookBackendSqliteDBClass EBookBackendSqliteDBClass;
typedef struct _EBookBackendSqliteDBPrivate EBookBackendSqliteDBPrivate;
/**
* EBookSDBError:
* @E_BOOK_SDB_ERROR_CONSTRAINT: The error occurred due to an explicit constraint
* @E_BOOK_SDB_ERROR_CONTACT_NOT_FOUND: A contact was not found by UID (this is different
* from a query that returns no results, which is not an error).
* @E_BOOK_SDB_ERROR_OTHER: Another error occurred
* @E_BOOK_SDB_ERROR_NOT_SUPPORTED: A query was not supported
* @E_BOOK_SDB_ERROR_INVALID_QUERY: A query was invalid. This can happen if the sexp could not be parsed
* or if a phone number query contained non-phonenumber input.
* @E_BOOK_SDB_ERROR_END_OF_LIST: An attempt was made to fetch results past the end of a contact list
*
* Defines the types of possible errors reported by the #EBookBackendSqliteDB
*
* Deprecated: 3.12: Use #EBookSqlite instead
*/
typedef enum {
E_BOOK_SDB_ERROR_CONSTRAINT,
E_BOOK_SDB_ERROR_CONTACT_NOT_FOUND,
E_BOOK_SDB_ERROR_OTHER,
E_BOOK_SDB_ERROR_NOT_SUPPORTED,
E_BOOK_SDB_ERROR_INVALID_QUERY,
E_BOOK_SDB_ERROR_END_OF_LIST
} EBookSDBError;
/**
* EBookBackendSqliteDB:
*
* Contains only private data that should be read and manipulated using the
* functions below.
*
* Since: 3.2
*
* Deprecated: 3.12: Use #EBookSqlite instead
**/
struct _EBookBackendSqliteDB {
/*< private >*/
GObject parent;
EBookBackendSqliteDBPrivate *priv;
};
/**
* EBookBackendSqliteDBClass:
*
* Class structure for the #EBookBackendSqlite class.
*
* Deprecated: 3.12: Use #EBookSqlite instead
*/
struct _EBookBackendSqliteDBClass {
/*< private >*/
GObjectClass parent_class;
};
/**
* EbSdbSearchData:
* @vcard: The the vcard string
* @uid: The %E_CONTACT_UID field of this contact
* @bdata: Extra data set for this contact.
*
* This structure is used to represent contacts returned
* by the EBookBackendSqliteDB from various functions
* such as e_book_backend_sqlitedb_search().
*
* The @bdata parameter will contain any data previously
* set for the given contact with e_book_backend_sqlitedb_set_contact_bdata().
*
* These should be freed with e_book_backend_sqlitedb_search_data_free().
*
* Since: 3.2
*
* Deprecated: 3.12: Use #EBookSqlite instead
**/
typedef struct {
gchar *vcard;
gchar *uid;
gchar *bdata;
} EbSdbSearchData;
/**
* EbSdbCuror:
*
* An opaque cursor pointer
*
* Since: 3.12
*
* Deprecated: 3.12: Use #EBookSqlite instead
*/
typedef struct _EbSdbCursor EbSdbCursor;
/**
* EbSdbCursorOrigin:
* @EBSDB_CURSOR_ORIGIN_CURRENT: The current cursor position
* @EBSDB_CURSOR_ORIGIN_BEGIN: The beginning of the cursor results.
* @EBSDB_CURSOR_ORIGIN_END: The ending of the cursor results.
*
* Specifies the start position to in the list of traversed contacts
* in calls to e_book_backend_sqlitedb_cursor_step().
*
* When an #EbSdbCuror is created, the current position implied by %EBSDB_CURSOR_ORIGIN_CURRENT
* is the same as %EBSDB_CURSOR_ORIGIN_BEGIN.
*
* Since: 3.12
*
* Deprecated: 3.12: Use #EBookSqlite instead
*/
typedef enum {
EBSDB_CURSOR_ORIGIN_CURRENT = 0,
EBSDB_CURSOR_ORIGIN_BEGIN,
EBSDB_CURSOR_ORIGIN_END
} EbSdbCursorOrigin;
/**
* EbSdbCursorStepFlags:
* @EBSDB_CURSOR_STEP_MOVE: The cursor position should be modified while stepping
* @EBSDB_CURSOR_STEP_FETCH: Traversed contacts should be listed and returned while stepping.
*
* Defines the behaviour of e_book_backend_sqlitedb_cursor_step().
*
* Since: 3.12
*
* Deprecated: 3.12: Use #EBookSqlite instead
*/
typedef enum {
EBSDB_CURSOR_STEP_MOVE = (1 << 0),
EBSDB_CURSOR_STEP_FETCH = (1 << 1)
} EbSdbCursorStepFlags;
GType e_book_backend_sqlitedb_get_type
(void) G_GNUC_CONST;
GQuark e_book_backend_sqlitedb_error_quark
(void);
EBookBackendSqliteDB *
e_book_backend_sqlitedb_new (const gchar *path,
const gchar *emailid,
const gchar *folderid,
const gchar *folder_name,
gboolean store_vcard,
GError **error);
EBookBackendSqliteDB *
e_book_backend_sqlitedb_new_full
(const gchar *path,
const gchar *emailid,
const gchar *folderid,
const gchar *folder_name,
gboolean store_vcard,
ESourceBackendSummarySetup *setup,
GError **error);
gboolean e_book_backend_sqlitedb_lock_updates
(EBookBackendSqliteDB *ebsdb,
GError **error);
gboolean e_book_backend_sqlitedb_unlock_updates
(EBookBackendSqliteDB *ebsdb,
gboolean do_commit,
GError **error);
ECollator *e_book_backend_sqlitedb_ref_collator
(EBookBackendSqliteDB *ebsdb);
gboolean e_book_backend_sqlitedb_new_contact
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
EContact *contact,
gboolean replace_existing,
GError **error);
gboolean e_book_backend_sqlitedb_new_contacts
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GSList *contacts,
gboolean replace_existing,
GError **error);
gboolean e_book_backend_sqlitedb_remove_contact
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
GError **error);
gboolean e_book_backend_sqlitedb_remove_contacts
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GSList *uids,
GError **error);
gboolean e_book_backend_sqlitedb_has_contact
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
gboolean *partial_content,
GError **error);
EContact * e_book_backend_sqlitedb_get_contact
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
GHashTable *fields_of_interest,
gboolean *with_all_required_fields,
GError **error);
gchar * e_book_backend_sqlitedb_get_vcard_string
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
GHashTable *fields_of_interest,
gboolean *with_all_required_fields,
GError **error);
GSList * e_book_backend_sqlitedb_search (EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *sexp,
GHashTable *fields_of_interest,
gboolean *searched,
gboolean *with_all_required_fields,
GError **error);
GSList * e_book_backend_sqlitedb_search_uids
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *sexp,
gboolean *searched,
GError **error);
GHashTable * e_book_backend_sqlitedb_get_uids_and_rev
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error);
gboolean e_book_backend_sqlitedb_get_is_populated
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error);
gboolean e_book_backend_sqlitedb_set_is_populated
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
gboolean populated,
GError **error);
gboolean e_book_backend_sqlitedb_get_revision
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
gchar **revision_out,
GError **error);
gboolean e_book_backend_sqlitedb_set_revision
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *revision,
GError **error);
gchar * e_book_backend_sqlitedb_get_sync_data
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error);
gboolean e_book_backend_sqlitedb_set_sync_data
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *sync_data,
GError **error);
gchar * e_book_backend_sqlitedb_get_key_value
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *key,
GError **error);
gboolean e_book_backend_sqlitedb_set_key_value
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *key,
const gchar *value,
GError **error);
gchar * e_book_backend_sqlitedb_get_contact_bdata
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
GError **error);
gboolean e_book_backend_sqlitedb_set_contact_bdata
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
const gchar *value,
GError **error);
gboolean e_book_backend_sqlitedb_get_has_partial_content
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error);
gboolean e_book_backend_sqlitedb_set_has_partial_content
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
gboolean partial_content,
GError **error);
GSList * e_book_backend_sqlitedb_get_partially_cached_ids
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error);
gboolean e_book_backend_sqlitedb_delete_addressbook
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error);
gboolean e_book_backend_sqlitedb_remove (EBookBackendSqliteDB *ebsdb,
GError **error);
void e_book_backend_sqlitedb_search_data_free
(EbSdbSearchData *s_data);
gboolean e_book_backend_sqlitedb_check_summary_query
(EBookBackendSqliteDB *ebsdb,
const gchar *query,
gboolean *with_list_attrs);
gboolean e_book_backend_sqlitedb_check_summary_fields
(EBookBackendSqliteDB *ebsdb,
GHashTable *fields_of_interest);
gboolean e_book_backend_sqlitedb_set_locale
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *lc_collate,
GError **error);
gboolean e_book_backend_sqlitedb_get_locale
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
gchar **locale_out,
GError **error);
/* Cursor API */
EbSdbCursor *e_book_backend_sqlitedb_cursor_new
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *sexp,
EContactField *sort_fields,
EBookCursorSortType *sort_types,
guint n_sort_fields,
GError **error);
void e_book_backend_sqlitedb_cursor_free
(EBookBackendSqliteDB *ebsdb,
EbSdbCursor *cursor);
gint e_book_backend_sqlitedb_cursor_step
(EBookBackendSqliteDB *ebsdb,
EbSdbCursor *cursor,
EbSdbCursorStepFlags flags,
EbSdbCursorOrigin origin,
gint count,
GSList **results,
GError **error);
void e_book_backend_sqlitedb_cursor_set_target_alphabetic_index
(EBookBackendSqliteDB *ebsdb,
EbSdbCursor *cursor,
gint index);
gboolean e_book_backend_sqlitedb_cursor_set_sexp
(EBookBackendSqliteDB *ebsdb,
EbSdbCursor *cursor,
const gchar *sexp,
GError **error);
gboolean e_book_backend_sqlitedb_cursor_calculate
(EBookBackendSqliteDB *ebsdb,
EbSdbCursor *cursor,
gint *total,
gint *position,
GError **error);
gint e_book_backend_sqlitedb_cursor_compare_contact
(EBookBackendSqliteDB *ebsdb,
EbSdbCursor *cursor,
EContact *contact,
gboolean *matches_sexp);
gboolean e_book_backend_sqlitedb_is_summary_query
(const gchar *query);
gboolean e_book_backend_sqlitedb_is_summary_fields
(GHashTable *fields_of_interest);
gboolean e_book_backend_sqlitedb_add_contact
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
EContact *contact,
gboolean partial_content,
GError **error);
gboolean e_book_backend_sqlitedb_add_contacts
(EBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GSList *contacts,
gboolean partial_content,
GError **error);
G_END_DECLS
#endif /* EDS_DISABLE_DEPRECATED */
#endif /* E_BOOK_BACKEND_SQLITEDB_H */
|