[evolution-ews] Adapt to single-include E-D-S libraries.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Adapt to single-include E-D-S libraries.
- Date: Mon, 4 Jun 2012 00:05:01 +0000 (UTC)
commit a540949a1e3a4666d72172ae0d06517bc4ce5702
Author: Matthew Barnes <mbarnes redhat com>
Date: Sun Jun 3 15:55:06 2012 -0400
Adapt to single-include E-D-S libraries.
po/POTFILES.in | 2 +-
src/addressbook/Makefile.am | 18 +-
src/addressbook/e-book-backend-ews-factory.c | 2 +-
src/addressbook/e-book-backend-ews.c | 90 ++++-----
src/addressbook/e-book-backend-ews.h | 2 +-
...edb-test.c => ews-book-backend-sqlitedb-test.c} | 36 ++--
...kend-sqlitedb.c => ews-book-backend-sqlitedb.c} | 203 ++++++++++----------
...kend-sqlitedb.h => ews-book-backend-sqlitedb.h} | 149 +++++++-------
src/addressbook/ews-oab-decoder.c | 12 +-
src/addressbook/ews-oab-decoder.h | 3 +-
src/calendar/e-cal-backend-ews-factory.c | 2 +-
src/calendar/e-cal-backend-ews-utils.c | 3 +-
src/calendar/e-cal-backend-ews-utils.h | 2 +-
src/calendar/e-cal-backend-ews.c | 12 +-
src/calendar/e-cal-backend-ews.h | 2 +-
src/camel/camel-ews-folder.c | 1 -
src/camel/camel-ews-store.c | 2 -
src/modules/e-mail-config-ews-backend.c | 3 +-
src/modules/e-mail-config-ews-gal.h | 2 +-
src/modules/e-mail-config-ews-ooo-page.h | 2 +-
src/modules/module-ews-backend.c | 15 +--
src/server/camel-ews-settings.c | 2 +-
src/server/e-ews-connection.c | 4 +-
src/server/e-source-ews-folder.h | 2 +-
src/utils/e-ews-query-to-restriction.c | 6 +-
src/utils/e-sqlite3-vfs.c | 2 +-
26 files changed, 268 insertions(+), 311 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e054b90..a6f5e0a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,7 +6,7 @@ src/account-setup-eplugin/exchange-ews-account-out-of-office.c
src/account-setup-eplugin/exchange-ews-account-setup.c
src/account-setup-eplugin/org-gnome-exchange-ews.eplug.xml
src/addressbook/e-book-backend-ews.c
-src/addressbook/e-book-backend-sqlitedb.c
+src/addressbook/ews-book-backend-sqlitedb.c
src/calendar/e-cal-backend-ews.c
src/camel/camel-ews-folder.c
src/camel/camel-ews-provider.c
diff --git a/src/addressbook/Makefile.am b/src/addressbook/Makefile.am
index 1f27017..9da08be 100644
--- a/src/addressbook/Makefile.am
+++ b/src/addressbook/Makefile.am
@@ -21,8 +21,8 @@ libebookbackendews_la_CPPFLAGS = \
$(NULL)
libebookbackendews_la_SOURCES = \
- e-book-backend-sqlitedb.c \
- e-book-backend-sqlitedb.h \
+ ews-book-backend-sqlitedb.c \
+ ews-book-backend-sqlitedb.h \
ews-oab-props.h \
ews-oab-decoder.c \
ews-oab-decoder.h \
@@ -48,19 +48,19 @@ libebookbackendews_la_LIBADD = \
libebookbackendews_la_LDFLAGS = \
-module -avoid-version $(NO_UNDEFINED)
-noinst_PROGRAMS = e-book-backend-sqlitedb-test
+noinst_PROGRAMS = ews-book-backend-sqlitedb-test
-e_book_backend_sqlitedb_test_CPPFLAGS = \
+ews_book_backend_sqlitedb_test_CPPFLAGS = \
$(libebookbackendews_la_CPPFLAGS) \
$(NULL)
-e_book_backend_sqlitedb_test_SOURCES = \
- e-book-backend-sqlitedb-test.c \
- e-book-backend-sqlitedb.c \
- e-book-backend-sqlitedb.h \
+ews_book_backend_sqlitedb_test_SOURCES = \
+ ews-book-backend-sqlitedb-test.c \
+ ews-book-backend-sqlitedb.c \
+ ews-book-backend-sqlitedb.h \
$(NULL)
-e_book_backend_sqlitedb_test_LDADD = \
+ews_book_backend_sqlitedb_test_LDADD = \
$(libebookbackendews_la_LIBADD) \
$(NULL)
diff --git a/src/addressbook/e-book-backend-ews-factory.c b/src/addressbook/e-book-backend-ews-factory.c
index c928d4c..74d8049 100644
--- a/src/addressbook/e-book-backend-ews-factory.c
+++ b/src/addressbook/e-book-backend-ews-factory.c
@@ -25,7 +25,7 @@
#include <config.h>
#endif
-#include <libedata-book/e-book-backend-factory.h>
+#include <libedata-book/libedata-book.h>
#include "server/e-source-ews-folder.h"
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index d6396b1..679db3d 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -35,19 +35,7 @@
#include <glib/gstdio.h>
#include <glib/gi18n-lib.h>
-#include <libedataserver/e-data-server-util.h>
-#include <libedataserver/e-flag.h>
-#include <libedataserver/e-sexp.h>
-#include <libedataserver/e-source-camel.h>
-#include <libedataserver/e-source-offline.h>
-#include <libedataserver/e-url.h>
-
-#include <libebook/e-contact.h>
-#include <libebook/e-destination.h>
-
-#include <libedata-book/e-book-backend-sexp.h>
-#include <libedata-book/e-data-book.h>
-#include <libedata-book/e-data-book-view.h>
+/*#include <libedata-book/libedata-book.h>*/
#include "lzx/ews-oal-decompress.h"
@@ -60,7 +48,7 @@
#include "utils/e-ews-query-to-restriction.h"
#include "e-book-backend-ews.h"
-#include "e-book-backend-sqlitedb.h"
+#include "ews-book-backend-sqlitedb.h"
#include "ews-oab-decoder.h"
#define d(x) x
@@ -85,7 +73,7 @@ struct _EBookBackendEwsPrivate {
gchar *username;
gchar *password;
- EBookBackendSqliteDB *ebsdb;
+ EwsBookBackendSqliteDB *ebsdb;
gboolean only_if_exists;
gboolean is_writable;
@@ -945,7 +933,7 @@ ews_create_contact_cb (GObject *object,
e_contact_set (create_contact->contact, E_CONTACT_UID, item_id->id);
e_contact_set (create_contact->contact, E_CONTACT_REV, item_id->change_key);
- e_book_backend_sqlitedb_add_contact (ebews->priv->ebsdb, ebews->priv->folder_id, create_contact->contact, FALSE, &error);
+ ews_book_backend_sqlitedb_add_contact (ebews->priv->ebsdb, ebews->priv->folder_id, create_contact->contact, FALSE, &error);
if (error == NULL) {
GSList *contacts;
@@ -1063,7 +1051,7 @@ ews_book_remove_contact_cb (GObject *object,
simple = G_SIMPLE_ASYNC_RESULT (res);
if (!g_simple_async_result_propagate_error (simple, &error))
- deleted = e_book_backend_sqlitedb_remove_contacts (priv->ebsdb, priv->folder_id, remove_contact->sl_ids, &error);
+ deleted = ews_book_backend_sqlitedb_remove_contacts (priv->ebsdb, priv->folder_id, remove_contact->sl_ids, &error);
if (deleted)
e_data_book_respond_remove_contacts (remove_contact->book, remove_contact->opid, EDB_ERROR (SUCCESS), remove_contact->sl_ids);
@@ -1173,8 +1161,8 @@ ews_modify_contact_cb (GObject *object,
id = e_contact_get (modify_contact->old_contact, E_CONTACT_UID);
- e_book_backend_sqlitedb_remove_contact (priv->ebsdb, priv->folder_id, id, &error);
- e_book_backend_sqlitedb_add_contact (ebews->priv->ebsdb, ebews->priv->folder_id, modify_contact->new_contact, FALSE, &error);
+ ews_book_backend_sqlitedb_remove_contact (priv->ebsdb, priv->folder_id, id, &error);
+ ews_book_backend_sqlitedb_add_contact (ebews->priv->ebsdb, ebews->priv->folder_id, modify_contact->new_contact, FALSE, &error);
if (error == NULL) {
GSList *new_contacts;
@@ -1302,7 +1290,7 @@ e_book_backend_ews_modify_contacts (EBookBackend *backend,
return;
}
- old_contact = e_book_backend_sqlitedb_get_contact ( priv->ebsdb, priv->folder_id,
+ old_contact = ews_book_backend_sqlitedb_get_contact ( priv->ebsdb, priv->folder_id,
id->id, NULL, NULL, &error);
if (!old_contact) {
g_object_unref (contact);
@@ -1367,14 +1355,14 @@ e_book_backend_ews_get_contact_list (EBookBackend *backend,
priv = ebews->priv;
if (!e_backend_get_online (E_BACKEND (backend))) {
- if (e_book_backend_sqlitedb_get_is_populated (priv->ebsdb, priv->folder_id, NULL)) {
- list = e_book_backend_sqlitedb_search (priv->ebsdb, priv->folder_id, query, NULL, NULL, NULL, &error);
+ if (ews_book_backend_sqlitedb_get_is_populated (priv->ebsdb, priv->folder_id, NULL)) {
+ list = ews_book_backend_sqlitedb_search (priv->ebsdb, priv->folder_id, query, NULL, NULL, NULL, &error);
l = list;
while (l) {
- EbSdbSearchData *s_data = (EbSdbSearchData *) l->data;
+ EwsSdbSearchData *s_data = (EwsSdbSearchData *) l->data;
vcard_list = g_slist_append (vcard_list, g_strdup (s_data->vcard));
- e_book_backend_sqlitedb_search_data_free (s_data);
+ ews_book_backend_sqlitedb_search_data_free (s_data);
l = l->next;
}
convert_error_to_edb_error (&error);
@@ -1394,14 +1382,14 @@ e_book_backend_ews_get_contact_list (EBookBackend *backend,
return;
}
- if (e_book_backend_sqlitedb_get_is_populated (priv->ebsdb, priv->folder_id, NULL)) {
- list = e_book_backend_sqlitedb_search (priv->ebsdb, priv->folder_id, query, NULL, NULL, NULL, &error);
+ if (ews_book_backend_sqlitedb_get_is_populated (priv->ebsdb, priv->folder_id, NULL)) {
+ list = ews_book_backend_sqlitedb_search (priv->ebsdb, priv->folder_id, query, NULL, NULL, NULL, &error);
l = list;
while (l) {
- EbSdbSearchData *s_data = (EbSdbSearchData *) l->data;
+ EwsSdbSearchData *s_data = (EwsSdbSearchData *) l->data;
vcard_list = g_slist_append (vcard_list, g_strdup (s_data->vcard));
- e_book_backend_sqlitedb_search_data_free (s_data);
+ ews_book_backend_sqlitedb_search_data_free (s_data);
l = l->next;
}
@@ -1658,7 +1646,7 @@ ews_gal_needs_update (EBookBackendEws *cbews,
gboolean ret = FALSE;
gchar *tmp;
- tmp = e_book_backend_sqlitedb_get_key_value (priv->ebsdb, priv->folder_id, "seq", error);
+ tmp = ews_book_backend_sqlitedb_get_key_value (priv->ebsdb, priv->folder_id, "seq", error);
if (error)
goto exit;
@@ -1724,7 +1712,7 @@ ews_remove_old_gal_file (EBookBackendEws *cbews,
EBookBackendEwsPrivate *priv = cbews->priv;
gchar *filename;
- filename = e_book_backend_sqlitedb_get_key_value (priv->ebsdb, priv->folder_id, "oab-filename", error);
+ filename = ews_book_backend_sqlitedb_get_key_value (priv->ebsdb, priv->folder_id, "oab-filename", error);
if (*error)
return FALSE;
@@ -1764,7 +1752,7 @@ ews_gal_store_contact (EContact *contact,
g_free (status_message);
data->contact_collector = g_slist_reverse (data->contact_collector);
- e_book_backend_sqlitedb_add_contacts (priv->ebsdb, priv->folder_id, data->contact_collector, FALSE, error);
+ ews_book_backend_sqlitedb_add_contacts (priv->ebsdb, priv->folder_id, data->contact_collector, FALSE, error);
for (l = data->contact_collector; l != NULL; l = g_slist_next (l))
e_book_backend_notify_update (E_BOOK_BACKEND (data->cbews), E_CONTACT (l->data));
@@ -1791,11 +1779,11 @@ ews_replace_gal_in_db (EBookBackendEws *cbews,
struct _db_data data;
/* remove the old address-book and create a new one in db */
- if (e_book_backend_sqlitedb_get_is_populated (priv->ebsdb, priv->folder_id, NULL)) {
- ret = e_book_backend_sqlitedb_delete_addressbook (priv->ebsdb, priv->folder_id, error);
+ if (ews_book_backend_sqlitedb_get_is_populated (priv->ebsdb, priv->folder_id, NULL)) {
+ ret = ews_book_backend_sqlitedb_delete_addressbook (priv->ebsdb, priv->folder_id, error);
ews_remove_attachments (priv->attachment_dir);
if (ret)
- ret = e_book_backend_sqlitedb_create_addressbook (priv->ebsdb, priv->folder_id, priv->folder_name, TRUE, error);
+ ret = ews_book_backend_sqlitedb_create_addressbook (priv->ebsdb, priv->folder_id, priv->folder_name, TRUE, error);
}
if (!ret)
@@ -1814,7 +1802,7 @@ ews_replace_gal_in_db (EBookBackendEws *cbews,
return ret;
/* mark the db as populated */
- ret = e_book_backend_sqlitedb_set_is_populated (priv->ebsdb, priv->folder_id, TRUE, error);
+ ret = ews_book_backend_sqlitedb_set_is_populated (priv->ebsdb, priv->folder_id, TRUE, error);
return ret;
}
@@ -1847,7 +1835,7 @@ ebews_start_gal_sync (gpointer data)
full = (EwsOALDetails *) full_l->data;
/* TODO fetch differential updates if available instead of downloading the whole GAL */
- if (!e_book_backend_sqlitedb_get_is_populated (priv->ebsdb, priv->folder_id, NULL) || ews_gal_needs_update (cbews, full, &error)) {
+ if (!ews_book_backend_sqlitedb_get_is_populated (priv->ebsdb, priv->folder_id, NULL) || ews_gal_needs_update (cbews, full, &error)) {
gchar *seq;
d(printf ("Ewsgal: Downloading full gal \n");)
@@ -1870,11 +1858,11 @@ ebews_start_gal_sync (gpointer data)
goto exit;
seq = g_strdup_printf ("%"G_GUINT32_FORMAT, full->seq);
- ret = e_book_backend_sqlitedb_set_key_value (priv->ebsdb, priv->folder_id, "seq", seq, &error);
+ ret = ews_book_backend_sqlitedb_set_key_value (priv->ebsdb, priv->folder_id, "seq", seq, &error);
g_free (seq);
if (!ret) {
- e_book_backend_sqlitedb_delete_addressbook (priv->ebsdb, priv->folder_id, &error);
+ ews_book_backend_sqlitedb_delete_addressbook (priv->ebsdb, priv->folder_id, &error);
goto exit;
}
}
@@ -1926,8 +1914,8 @@ ebews_sync_deleted_items (EBookBackendEws *ebews,
gchar *id = (gchar *) l->data;
gboolean partial_content;
- if (e_book_backend_sqlitedb_has_contact (priv->ebsdb, priv->folder_id, id, &partial_content, NULL))
- e_book_backend_sqlitedb_remove_contact (priv->ebsdb, priv->folder_id, id, error);
+ if (ews_book_backend_sqlitedb_has_contact (priv->ebsdb, priv->folder_id, id, &partial_content, NULL))
+ ews_book_backend_sqlitedb_remove_contact (priv->ebsdb, priv->folder_id, id, error);
e_book_backend_notify_remove (E_BOOK_BACKEND (ebews), id);
}
@@ -1975,7 +1963,7 @@ ebews_store_contact_items (EBookBackendEws *ebews,
/* store display_name, fileas, item id */
}
- e_book_backend_sqlitedb_add_contact (priv->ebsdb, priv->folder_id, contact, FALSE, error);
+ ews_book_backend_sqlitedb_add_contact (priv->ebsdb, priv->folder_id, contact, FALSE, error);
e_book_backend_notify_update (E_BOOK_BACKEND (ebews), contact);
g_object_unref (item);
@@ -2082,7 +2070,7 @@ ebews_store_distribution_list_items (EBookBackendEws *ebews,
}
g_slist_free (members);
- e_book_backend_sqlitedb_add_contact (ebews->priv->ebsdb, ebews->priv->folder_id, contact, FALSE, error);
+ ews_book_backend_sqlitedb_add_contact (ebews->priv->ebsdb, ebews->priv->folder_id, contact, FALSE, error);
e_book_backend_notify_update (E_BOOK_BACKEND (ebews), contact);
g_object_unref (contact);
@@ -2268,7 +2256,7 @@ ebews_start_sync (gpointer data)
e_book_backend_foreach_view (E_BOOK_BACKEND (ebews), book_view_notify_status, status_message);
g_free (status_message);
- sync_state = e_book_backend_sqlitedb_get_sync_data (priv->ebsdb, priv->folder_id, NULL);
+ sync_state = ews_book_backend_sqlitedb_get_sync_data (priv->ebsdb, priv->folder_id, NULL);
do
{
GSList *items_created = NULL, *items_updated = NULL;
@@ -2306,11 +2294,11 @@ ebews_start_sync (gpointer data)
if (error)
break;
- e_book_backend_sqlitedb_set_sync_data (priv->ebsdb, priv->folder_id, sync_state, &error);
+ ews_book_backend_sqlitedb_set_sync_data (priv->ebsdb, priv->folder_id, sync_state, &error);
} while (!error && !includes_last_item);
if (!error)
- e_book_backend_sqlitedb_set_is_populated (priv->ebsdb, priv->folder_id, TRUE, &error);
+ ews_book_backend_sqlitedb_set_is_populated (priv->ebsdb, priv->folder_id, TRUE, &error);
g_free (sync_state);
@@ -2420,15 +2408,15 @@ fetch_from_offline (EBookBackendEws *ews,
return;
}
- contacts = e_book_backend_sqlitedb_search (priv->ebsdb, priv->folder_id, query, NULL, NULL, NULL, &error);
+ contacts = ews_book_backend_sqlitedb_search (priv->ebsdb, priv->folder_id, query, NULL, NULL, NULL, &error);
for (l = contacts; l != NULL; l = g_slist_next (l)) {
- EbSdbSearchData *s_data = (EbSdbSearchData *) l->data;
+ EwsSdbSearchData *s_data = (EwsSdbSearchData *) l->data;
/* reset vcard to NULL as it would be free'ed in prefiltered_vcard function */
e_data_book_view_notify_update_prefiltered_vcard (book_view, s_data->uid, s_data->vcard);
s_data->vcard = NULL;
- e_book_backend_sqlitedb_search_data_free (s_data);
+ ews_book_backend_sqlitedb_search_data_free (s_data);
}
if (contacts)
@@ -2467,7 +2455,7 @@ e_book_backend_ews_start_book_view (EBookBackend *backend,
e_data_book_view_notify_progress (book_view, -1, _("Searching..."));
if (!e_backend_get_online (E_BACKEND (backend))) {
- if (priv->ebsdb && e_book_backend_sqlitedb_get_is_populated (priv->ebsdb, priv->folder_id, NULL)) {
+ if (priv->ebsdb && ews_book_backend_sqlitedb_get_is_populated (priv->ebsdb, priv->folder_id, NULL)) {
fetch_from_offline (ebews, book_view, query, error);
return;
}
@@ -2499,7 +2487,7 @@ e_book_backend_ews_start_book_view (EBookBackend *backend,
ebews_start_refreshing (ebews);
if (priv->ebsdb &&
- e_book_backend_sqlitedb_get_is_populated (priv->ebsdb, priv->folder_id, NULL)) {
+ ews_book_backend_sqlitedb_get_is_populated (priv->ebsdb, priv->folder_id, NULL)) {
fetch_from_offline (ebews, book_view, query, error);
return;
}
@@ -2642,7 +2630,7 @@ e_book_backend_ews_load_source (EBookBackend *backend,
priv->folder_id = e_source_ews_folder_dup_id (
E_SOURCE_EWS_FOLDER (extension));
- priv->ebsdb = e_book_backend_sqlitedb_new (
+ priv->ebsdb = ews_book_backend_sqlitedb_new (
cache_dir, email, priv->folder_id,
display_name, TRUE, perror);
diff --git a/src/addressbook/e-book-backend-ews.h b/src/addressbook/e-book-backend-ews.h
index 57ed825..ba1133f 100644
--- a/src/addressbook/e-book-backend-ews.h
+++ b/src/addressbook/e-book-backend-ews.h
@@ -23,7 +23,7 @@
#ifndef __E_BOOK_BACKEND_EWS_H__
#define __E_BOOK_BACKEND_EWS_H__
-#include <libedata-book/e-book-backend-sync.h>
+#include <libedata-book/libedata-book.h>
#define E_TYPE_BOOK_BACKEND_EWS (e_book_backend_ews_get_type ())
#define E_BOOK_BACKEND_EWS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_BOOK_BACKEND_EWS, EBookBackendEws))
diff --git a/src/addressbook/e-book-backend-sqlitedb-test.c b/src/addressbook/ews-book-backend-sqlitedb-test.c
similarity index 80%
rename from src/addressbook/e-book-backend-sqlitedb-test.c
rename to src/addressbook/ews-book-backend-sqlitedb-test.c
index 2525268..9751388 100644
--- a/src/addressbook/e-book-backend-sqlitedb-test.c
+++ b/src/addressbook/ews-book-backend-sqlitedb-test.c
@@ -1,5 +1,5 @@
/*-*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-book-backend-sqlitedb.c
+/* ews-book-backend-sqlitedb-test.c
*
* Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
@@ -20,10 +20,8 @@
*/
#include <config.h>
-#include <glib.h>
-#include <glib-object.h>
-#include <libebook/e-book-query.h>
-#include "e-book-backend-sqlitedb.h"
+#include <libebook/libebook.h>
+#include "ews-book-backend-sqlitedb.h"
static GMainLoop *main_loop;
static gchar *cache_path;
@@ -73,7 +71,7 @@ quit_tests (void)
}
static void
-add_contacts (EBookBackendSqliteDB *ebsdb)
+add_contacts (EwsBookBackendSqliteDB *ebsdb)
{
GSList *contacts = NULL;
EContact *con;
@@ -83,34 +81,34 @@ add_contacts (EBookBackendSqliteDB *ebsdb)
con = e_contact_new_from_vcard (vcard_str);
contacts = g_slist_append (contacts, con);
- e_book_backend_sqlitedb_add_contacts (ebsdb, folderid, contacts, FALSE, &error);
+ ews_book_backend_sqlitedb_add_contacts (ebsdb, folderid, contacts, FALSE, &error);
g_object_unref (con);
}
static void
-search_db (EBookBackendSqliteDB *ebsdb,
+search_db (EwsBookBackendSqliteDB *ebsdb,
const gchar *type,
const gchar *sexp)
{
GSList *vcards;
- EbSdbSearchData *s_data;
+ EwsSdbSearchData *s_data;
g_print ("%s - query: %s \n", type, sexp);
op = type;
- vcards = e_book_backend_sqlitedb_search (ebsdb, folderid, sexp, NULL, NULL, NULL, &error);
+ vcards = ews_book_backend_sqlitedb_search (ebsdb, folderid, sexp, NULL, NULL, NULL, &error);
if (error)
return;
s_data = vcards->data;
g_print ("Result: %s \n", s_data->vcard);
- e_book_backend_sqlitedb_search_data_free (s_data);
+ ews_book_backend_sqlitedb_search_data_free (s_data);
}
static gboolean
start_tests (gpointer data)
{
- EBookBackendSqliteDB *ebsdb;
+ EwsBookBackendSqliteDB *ebsdb;
gboolean populated = FALSE;
gchar *vcard_str = NULL, *sexp;
EBookQuery *q;
@@ -119,7 +117,7 @@ start_tests (gpointer data)
g_print ("Creating the sqlitedb \n");
op = "create sqlitedb";
- ebsdb = e_book_backend_sqlitedb_new
+ ebsdb = ews_book_backend_sqlitedb_new
(cache_path, email, folderid, folder_name,
store_vcard, &error);
if (error)
@@ -131,26 +129,26 @@ start_tests (gpointer data)
g_print ("Getting is_populated \n");
op = "set is_populated";
- e_book_backend_sqlitedb_set_is_populated (ebsdb, folderid, TRUE, &error);
+ ews_book_backend_sqlitedb_set_is_populated (ebsdb, folderid, TRUE, &error);
if (error)
goto exit;
g_print ("Setting is_populated \n");
op = "set is_populated";
- populated = e_book_backend_sqlitedb_get_is_populated (ebsdb, folderid, &error);
+ populated = ews_book_backend_sqlitedb_get_is_populated (ebsdb, folderid, &error);
if (error)
goto exit;
g_print ("Populated: %d \n", populated);
g_print ("Setting key value \n");
op = "set key/value";
- e_book_backend_sqlitedb_set_key_value (ebsdb, folderid, "customkey", "stored", &error);
+ ews_book_backend_sqlitedb_set_key_value (ebsdb, folderid, "customkey", "stored", &error);
if (error)
goto exit;
g_print ("Get Vcard string \n");
op = "get vcard string";
- vcard_str = e_book_backend_sqlitedb_get_vcard_string (ebsdb, folderid, uid, NULL, NULL, &error);
+ vcard_str = ews_book_backend_sqlitedb_get_vcard_string (ebsdb, folderid, uid, NULL, NULL, &error);
if (error)
goto exit;
g_print ("VCard: %s \n", vcard_str);
@@ -177,14 +175,14 @@ start_tests (gpointer data)
g_print ("Delete contact \n");
op = "delete contact";
uids = g_slist_append (uids, (gchar *) uid);
- e_book_backend_sqlitedb_remove_contacts (ebsdb, folderid, uids, &error);
+ ews_book_backend_sqlitedb_remove_contacts (ebsdb, folderid, uids, &error);
g_slist_free (uids);
if (error)
goto exit;
g_print ("Delete addressbook \n");
op = "delete addressbook";
- e_book_backend_sqlitedb_delete_addressbook (ebsdb, folderid, &error);
+ ews_book_backend_sqlitedb_delete_addressbook (ebsdb, folderid, &error);
exit:
g_object_unref (ebsdb);
diff --git a/src/addressbook/e-book-backend-sqlitedb.c b/src/addressbook/ews-book-backend-sqlitedb.c
similarity index 89%
rename from src/addressbook/e-book-backend-sqlitedb.c
rename to src/addressbook/ews-book-backend-sqlitedb.c
index 4be8ab1..ec54189 100644
--- a/src/addressbook/e-book-backend-sqlitedb.c
+++ b/src/addressbook/ews-book-backend-sqlitedb.c
@@ -1,5 +1,5 @@
/*-*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-book-backend-sqlitedb.c
+/* ews-book-backend-sqlitedb.c
*
* Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
@@ -33,12 +33,11 @@
#include <sqlite3.h>
-#include <libedataserver/e-sexp.h>
-#include <libedata-book/e-book-backend-sexp.h>
+#include <libedata-book/libedata-book.h>
#include "utils/e-sqlite3-vfs.h"
-#include "e-book-backend-sqlitedb.h"
+#include "ews-book-backend-sqlitedb.h"
#define d(x)
@@ -50,7 +49,7 @@
#define WRITER_LOCK(ebssdb) g_static_rw_lock_writer_lock (&ebsdb->priv->rwlock)
#define WRITER_UNLOCK(ebssdb) g_static_rw_lock_writer_unlock (&ebsdb->priv->rwlock)
-struct _EBookBackendSqliteDBPrivate {
+struct _EwsBookBackendSqliteDBPrivate {
sqlite3 *db;
gchar *path;
gchar *hash_key;
@@ -59,10 +58,10 @@ struct _EBookBackendSqliteDBPrivate {
GStaticRWLock rwlock;
};
-G_DEFINE_TYPE (EBookBackendSqliteDB, e_book_backend_sqlitedb, G_TYPE_OBJECT)
+G_DEFINE_TYPE (EwsBookBackendSqliteDB, ews_book_backend_sqlitedb, G_TYPE_OBJECT)
#define E_BOOK_SDB_ERROR \
- (e_book_backend_sqlitedb_error_quark ())
+ (ews_book_backend_sqlitedb_error_quark ())
static GHashTable *db_connections = NULL;
static GStaticMutex dbcon_lock = G_STATIC_MUTEX_INIT;
@@ -106,7 +105,7 @@ static gint
store_data_to_vcard (gpointer ref, gint ncol, gchar **cols, gchar **name);
static GQuark
-e_book_backend_sqlitedb_error_quark (void)
+ews_book_backend_sqlitedb_error_quark (void)
{
static GQuark quark = 0;
@@ -119,11 +118,11 @@ e_book_backend_sqlitedb_error_quark (void)
}
static void
-e_book_backend_sqlitedb_finalize (GObject *object)
+ews_book_backend_sqlitedb_finalize (GObject *object)
{
- EBookBackendSqliteDBPrivate *priv;
+ EwsBookBackendSqliteDBPrivate *priv;
- priv = E_BOOK_BACKEND_SQLITEDB (object)->priv;
+ priv = EWS_BOOK_BACKEND_SQLITEDB (object)->priv;
g_static_rw_lock_free (&priv->rwlock);
@@ -151,24 +150,24 @@ e_book_backend_sqlitedb_finalize (GObject *object)
priv = NULL;
/* Chain up to parent's finalize() method. */
- G_OBJECT_CLASS (e_book_backend_sqlitedb_parent_class)->finalize (object);
+ G_OBJECT_CLASS (ews_book_backend_sqlitedb_parent_class)->finalize (object);
}
static void
-e_book_backend_sqlitedb_class_init (EBookBackendSqliteDBClass *class)
+ews_book_backend_sqlitedb_class_init (EwsBookBackendSqliteDBClass *class)
{
GObjectClass *object_class;
- g_type_class_add_private (class, sizeof (EBookBackendSqliteDBPrivate));
+ g_type_class_add_private (class, sizeof (EwsBookBackendSqliteDBPrivate));
object_class = G_OBJECT_CLASS (class);
- object_class->finalize = e_book_backend_sqlitedb_finalize;
+ object_class->finalize = ews_book_backend_sqlitedb_finalize;
}
static void
-e_book_backend_sqlitedb_init (EBookBackendSqliteDB *ebsdb)
+ews_book_backend_sqlitedb_init (EwsBookBackendSqliteDB *ebsdb)
{
- ebsdb->priv = g_new0 (EBookBackendSqliteDBPrivate, 1);
+ ebsdb->priv = g_new0 (EwsBookBackendSqliteDBPrivate, 1);
ebsdb->priv->store_vcard = TRUE;
g_static_rw_lock_init (&ebsdb->priv->rwlock);
@@ -263,14 +262,14 @@ book_backend_sql_exec (sqlite3 *db,
}
static void
-book_backend_sqlitedb_start_transaction (EBookBackendSqliteDB *ebsdb,
+book_backend_sqlitedb_start_transaction (EwsBookBackendSqliteDB *ebsdb,
GError **error)
{
book_backend_sql_exec (ebsdb->priv->db, "BEGIN", NULL, NULL, error);
}
static void
-book_backend_sqlitedb_end_transaction (EBookBackendSqliteDB *ebsdb,
+book_backend_sqlitedb_end_transaction (EwsBookBackendSqliteDB *ebsdb,
GError **error)
{
if (!error || !*error)
@@ -280,7 +279,7 @@ book_backend_sqlitedb_end_transaction (EBookBackendSqliteDB *ebsdb,
}
static void
-create_folders_table (EBookBackendSqliteDB *ebsdb,
+create_folders_table (EwsBookBackendSqliteDB *ebsdb,
GError **error)
{
GError *err = NULL;
@@ -343,7 +342,7 @@ folder_found_cb (gpointer ref,
}
static gboolean
-folder_exists (EBookBackendSqliteDB *ebsdb,
+folder_exists (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error)
{
@@ -362,7 +361,7 @@ folder_exists (EBookBackendSqliteDB *ebsdb,
}
static void
-add_folder_into_db (EBookBackendSqliteDB *ebsdb,
+add_folder_into_db (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *folder_name,
GError **error)
@@ -396,7 +395,7 @@ add_folder_into_db (EBookBackendSqliteDB *ebsdb,
/* The column names match the fields used in book-backend-sexp */
static gint
-create_contacts_table (EBookBackendSqliteDB *ebsdb,
+create_contacts_table (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error)
{
@@ -456,11 +455,11 @@ create_contacts_table (EBookBackendSqliteDB *ebsdb,
}
static gboolean
-book_backend_sqlitedb_load (EBookBackendSqliteDB *ebsdb,
+book_backend_sqlitedb_load (EwsBookBackendSqliteDB *ebsdb,
const gchar *filename,
GError **error)
{
- EBookBackendSqliteDBPrivate *priv;
+ EwsBookBackendSqliteDBPrivate *priv;
gint ret;
priv = ebsdb->priv;
@@ -501,7 +500,7 @@ book_backend_sqlitedb_load (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_new
+ * ews_book_backend_sqlitedb_new
* @path: location where the db would be created
* @emailid: email id of the user
* @folderid: folder id of the address-book
@@ -516,15 +515,15 @@ book_backend_sqlitedb_load (EBookBackendSqliteDB *ebsdb,
*
* Since: 3.2
**/
-EBookBackendSqliteDB *
-e_book_backend_sqlitedb_new (const gchar *path,
+EwsBookBackendSqliteDB *
+ews_book_backend_sqlitedb_new (const gchar *path,
const gchar *emailid,
const gchar *folderid,
const gchar *folder_name,
gboolean store_vcard,
GError **error)
{
- EBookBackendSqliteDB *ebsdb;
+ EwsBookBackendSqliteDB *ebsdb;
gchar *hash_key, *filename;
GError *err = NULL;
@@ -542,7 +541,7 @@ e_book_backend_sqlitedb_new (const gchar *path,
}
}
- ebsdb = g_object_new (E_TYPE_BOOK_BACKEND_SQLITEDB, NULL);
+ ebsdb = g_object_new (EWS_TYPE_BOOK_BACKEND_SQLITEDB, NULL);
ebsdb->priv->path = g_strdup (path);
ebsdb->priv->store_vcard = store_vcard;
if (g_mkdir_with_parents (path, 0777) < 0) {
@@ -626,7 +625,7 @@ insert_stmt_from_contact (EContact *contact,
}
/**
- * e_book_backend_sqlitedb_add_contact
+ * ews_book_backend_sqlitedb_add_contact
* @ebsdb:
* @folderid: folder id
* @contact: EContact to be added
@@ -634,7 +633,7 @@ insert_stmt_from_contact (EContact *contact,
* the backend cache's partial information for auto-completion.
* @error:
*
- * This is a convenience wrapper for e_book_backend_sqlitedb_add_contacts,
+ * This is a convenience wrapper for ews_book_backend_sqlitedb_add_contacts,
* which is the preferred means to add multiple contacts when possible.
*
* Returns: TRUE on success.
@@ -642,7 +641,7 @@ insert_stmt_from_contact (EContact *contact,
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_add_contact (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_add_contact (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
EContact *contact,
gboolean partial_content,
@@ -651,12 +650,12 @@ e_book_backend_sqlitedb_add_contact (EBookBackendSqliteDB *ebsdb,
GSList l;
l.data = contact;
l.next = NULL;
- return e_book_backend_sqlitedb_add_contacts (ebsdb, folderid, &l,
+ return ews_book_backend_sqlitedb_add_contacts (ebsdb, folderid, &l,
partial_content, error);
}
/**
- * e_book_backend_sqlitedb_add_contacts
+ * ews_book_backend_sqlitedb_add_contacts
* @ebsdb:
* @folderid: folder id
* @contacts: list of EContacts
@@ -670,7 +669,7 @@ e_book_backend_sqlitedb_add_contact (EBookBackendSqliteDB *ebsdb,
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_add_contacts (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_add_contacts (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GSList *contacts,
gboolean partial_content,
@@ -679,7 +678,7 @@ e_book_backend_sqlitedb_add_contacts (EBookBackendSqliteDB *ebsdb,
GSList *l;
GError *err = NULL;
gboolean ret = TRUE;
- EBookBackendSqliteDBPrivate *priv;
+ EwsBookBackendSqliteDBPrivate *priv;
priv = ebsdb->priv;
@@ -708,14 +707,14 @@ e_book_backend_sqlitedb_add_contacts (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_remove_contact:
+ * ews_book_backend_sqlitedb_remove_contact:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_remove_contact (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_remove_contact (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
GError **error)
@@ -723,19 +722,19 @@ e_book_backend_sqlitedb_remove_contact (EBookBackendSqliteDB *ebsdb,
GSList l;
l.data = (gchar *) uid; /* Won't modify it, I promise :) */
l.next = NULL;
- return e_book_backend_sqlitedb_remove_contacts (ebsdb, folderid, &l,
+ return ews_book_backend_sqlitedb_remove_contacts (ebsdb, folderid, &l,
error);
}
/**
- * e_book_backend_sqlitedb_remove_contacts:
+ * ews_book_backend_sqlitedb_remove_contacts:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_remove_contacts (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_remove_contacts (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GSList *uids,
GError **error)
@@ -744,7 +743,7 @@ e_book_backend_sqlitedb_remove_contacts (EBookBackendSqliteDB *ebsdb,
GError *err = NULL;
GString *str;
gchar *tmp;
- EBookBackendSqliteDBPrivate *priv;
+ EwsBookBackendSqliteDBPrivate *priv;
priv = ebsdb->priv;
str = g_string_new ("DELETE FROM ");
@@ -804,14 +803,14 @@ contact_found_cb (gpointer ref,
}
/**
- * e_book_backend_sqlitedb_has_contact:
+ * ews_book_backend_sqlitedb_has_contact:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_has_contact (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_has_contact (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
gboolean *partial_content,
@@ -855,14 +854,14 @@ get_vcard_cb (gpointer ref,
}
/**
- * e_book_backend_sqlitedb_get_contact:
+ * ews_book_backend_sqlitedb_get_contact:
*
* FIXME: Document me.
*
* Since: 3.2
**/
EContact *
-e_book_backend_sqlitedb_get_contact (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_get_contact (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
GHashTable *fields_of_interest,
@@ -871,7 +870,7 @@ e_book_backend_sqlitedb_get_contact (EBookBackendSqliteDB *ebsdb,
{
GError *err = NULL;
EContact *contact = NULL;
- gchar *vcard = e_book_backend_sqlitedb_get_vcard_string (ebsdb, folderid, uid,
+ gchar *vcard = ews_book_backend_sqlitedb_get_vcard_string (ebsdb, folderid, uid,
fields_of_interest, with_all_required_fields, &err);
if (!err) {
contact = e_contact_new_from_vcard (vcard);
@@ -918,14 +917,14 @@ check_field_foreach (const gchar *field_name,
}
/**
- * e_book_backend_sqlitedb_is_summary_fields:
+ * ews_book_backend_sqlitedb_is_summary_fields:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_is_summary_fields (GHashTable *fields_of_interest)
+ews_book_backend_sqlitedb_is_summary_fields (GHashTable *fields_of_interest)
{
gboolean summary_fields = TRUE;
@@ -951,7 +950,7 @@ summary_select_stmt (const gchar *folderid,
/* If filtering by fields of interest, only query those and include the 'uid'
*
*/
- if (fields_of_interest && e_book_backend_sqlitedb_is_summary_fields (fields_of_interest)) {
+ if (fields_of_interest && ews_book_backend_sqlitedb_is_summary_fields (fields_of_interest)) {
g_hash_table_foreach (fields_of_interest, (GHFunc) accumulate_fields_select_stmt, string);
/* The query should return all the required information */
@@ -972,8 +971,8 @@ summary_select_stmt (const gchar *folderid,
}
/**
- * e_book_backend_sqlitedb_get_vcard_string:
- * @ebsdb: An #EBookBackendSqliteDB
+ * ews_book_backend_sqlitedb_get_vcard_string:
+ * @ebsdb: An #EwsBookBackendSqliteDB
* @folderid: The folder id
* @uid: The uid to fetch a vcard for
* @fields_of_interest: The required fields for this vcard, or %NULL to require all fields.
@@ -994,7 +993,7 @@ summary_select_stmt (const gchar *folderid,
* Since: 3.2
*/
gchar *
-e_book_backend_sqlitedb_get_vcard_string (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_get_vcard_string (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
GHashTable *fields_of_interest,
@@ -1019,12 +1018,12 @@ e_book_backend_sqlitedb_get_vcard_string (EBookBackendSqliteDB *ebsdb,
g_free (select_stmt);
if (vcards) {
- EbSdbSearchData *s_data = (EbSdbSearchData *) vcards->data;
+ EwsSdbSearchData *s_data = (EwsSdbSearchData *) vcards->data;
vcard_str = s_data->vcard;
s_data->vcard = NULL;
- e_book_backend_sqlitedb_search_data_free (s_data);
+ ews_book_backend_sqlitedb_search_data_free (s_data);
g_slist_free (vcards);
vcards = NULL;
@@ -1094,14 +1093,14 @@ static const struct {
};
/**
- * e_book_backend_sqlitedb_is_summary_query:
+ * ews_book_backend_sqlitedb_is_summary_query:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_is_summary_query (const gchar *query)
+ews_book_backend_sqlitedb_is_summary_query (const gchar *query)
{
ESExp *sexp;
ESExpResult *r;
@@ -1373,7 +1372,7 @@ addto_vcard_list_cb (gpointer ref,
gchar **name)
{
GSList **vcard_data = ref;
- EbSdbSearchData *s_data = g_new0 (EbSdbSearchData, 1);
+ EwsSdbSearchData *s_data = g_new0 (EwsSdbSearchData, 1);
if (cols[0])
s_data->uid = g_strdup (cols[0]);
@@ -1410,7 +1409,7 @@ store_data_to_vcard (gpointer ref,
gchar **name)
{
GSList **vcard_data = ref;
- EbSdbSearchData *search_data = g_new0 (EbSdbSearchData, 1);
+ EwsSdbSearchData *search_data = g_new0 (EwsSdbSearchData, 1);
EContact *contact = e_contact_new ();
gchar *vcard;
gint i, j;
@@ -1459,7 +1458,7 @@ store_data_to_vcard (gpointer ref,
}
static GSList *
-book_backend_sqlitedb_search_query (EBookBackendSqliteDB *ebsdb,
+book_backend_sqlitedb_search_query (EwsBookBackendSqliteDB *ebsdb,
const gchar *sql,
const gchar *folderid,
/* const */ GHashTable *fields_of_interest,
@@ -1516,7 +1515,7 @@ book_backend_sqlitedb_search_query (EBookBackendSqliteDB *ebsdb,
}
static GSList *
-book_backend_sqlitedb_search_full (EBookBackendSqliteDB *ebsdb,
+book_backend_sqlitedb_search_full (EwsBookBackendSqliteDB *ebsdb,
const gchar *sexp,
const gchar *folderid,
gboolean return_uids,
@@ -1539,17 +1538,17 @@ book_backend_sqlitedb_search_full (EBookBackendSqliteDB *ebsdb,
bsexp = e_book_backend_sexp_new (sexp);
for (l = all; l != NULL; l = g_slist_next (l)) {
- EbSdbSearchData *s_data = (EbSdbSearchData *) l->data;
+ EwsSdbSearchData *s_data = (EwsSdbSearchData *) l->data;
if (e_book_backend_sexp_match_vcard (bsexp, s_data->vcard)) {
if (!return_uids)
r_list = g_slist_prepend (r_list, s_data);
else {
r_list = g_slist_prepend (r_list, g_strdup (s_data->uid));
- e_book_backend_sqlitedb_search_data_free (s_data);
+ ews_book_backend_sqlitedb_search_data_free (s_data);
}
} else
- e_book_backend_sqlitedb_search_data_free (s_data);
+ ews_book_backend_sqlitedb_search_data_free (s_data);
}
g_object_unref (bsexp);
@@ -1561,7 +1560,7 @@ book_backend_sqlitedb_search_full (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_search
+ * ews_book_backend_sqlitedb_search
* @ebsdb:
* @folderid:
* @sexp: search expression; use NULL or an empty string to get all stored contacts.
@@ -1584,12 +1583,12 @@ book_backend_sqlitedb_search_full (EBookBackendSqliteDB *ebsdb,
* when a summary query succeeds and the returned list can be used to iterate
* and fetch for full required data from another persistance.
*
- * Returns: List of EbSdbSearchData.
+ * Returns: List of EwsSdbSearchData.
*
* Since: 3.2
**/
GSList *
-e_book_backend_sqlitedb_search (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_search (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *sexp,
/* const */ GHashTable *fields_of_interest,
@@ -1604,7 +1603,7 @@ e_book_backend_sqlitedb_search (EBookBackendSqliteDB *ebsdb,
if (sexp && !*sexp)
sexp = NULL;
- if (!sexp || e_book_backend_sqlitedb_is_summary_query (sexp)) {
+ if (!sexp || ews_book_backend_sqlitedb_is_summary_query (sexp)) {
gchar *sql_query;
sql_query = sexp ? sexp_to_sql_query (sexp) : NULL;
@@ -1633,14 +1632,14 @@ e_book_backend_sqlitedb_search (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_search_uids:
+ * ews_book_backend_sqlitedb_search_uids:
*
* FIXME: Document me.
*
* Since: 3.2
**/
GSList *
-e_book_backend_sqlitedb_search_uids (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_search_uids (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *sexp,
gboolean *searched,
@@ -1652,7 +1651,7 @@ e_book_backend_sqlitedb_search_uids (EBookBackendSqliteDB *ebsdb,
if (sexp && !*sexp)
sexp = NULL;
- if (!sexp || e_book_backend_sqlitedb_is_summary_query (sexp)) {
+ if (!sexp || ews_book_backend_sqlitedb_is_summary_query (sexp)) {
gchar *stmt;
gchar *sql_query = sexp ? sexp_to_sql_query (sexp) : NULL;
@@ -1696,14 +1695,14 @@ get_bool_cb (gpointer ref,
}
/**
- * e_book_backend_sqlitedb_get_is_populated:
+ * ews_book_backend_sqlitedb_get_is_populated:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_get_is_populated (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_get_is_populated (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error)
{
@@ -1723,14 +1722,14 @@ e_book_backend_sqlitedb_get_is_populated (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_set_is_populated:
+ * ews_book_backend_sqlitedb_set_is_populated:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_set_is_populated (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_set_is_populated (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
gboolean populated,
GError **error)
@@ -1758,7 +1757,7 @@ e_book_backend_sqlitedb_set_is_populated (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_get_has_partial_content
+ * ews_book_backend_sqlitedb_get_has_partial_content
* @ebsdb:
* @folderid:
* @error:
@@ -1770,7 +1769,7 @@ e_book_backend_sqlitedb_set_is_populated (EBookBackendSqliteDB *ebsdb,
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_get_has_partial_content (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_get_has_partial_content (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error)
{
@@ -1789,14 +1788,14 @@ e_book_backend_sqlitedb_get_has_partial_content (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_set_has_partial_content:
+ * ews_book_backend_sqlitedb_set_has_partial_content:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_set_has_partial_content (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_set_has_partial_content (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
gboolean partial_content,
GError **error)
@@ -1837,14 +1836,14 @@ get_string_cb (gpointer ref,
}
/**
- * e_book_backend_sqlitedb_get_contact_bdata:
+ * ews_book_backend_sqlitedb_get_contact_bdata:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gchar *
-e_book_backend_sqlitedb_get_contact_bdata (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_get_contact_bdata (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
GError **error)
@@ -1863,14 +1862,14 @@ e_book_backend_sqlitedb_get_contact_bdata (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_set_contact_bdata:
+ * ews_book_backend_sqlitedb_set_contact_bdata:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_set_contact_bdata (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_set_contact_bdata (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
const gchar *value,
@@ -1899,14 +1898,14 @@ e_book_backend_sqlitedb_set_contact_bdata (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_get_sync_data:
+ * ews_book_backend_sqlitedb_get_sync_data:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gchar *
-e_book_backend_sqlitedb_get_sync_data (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_get_sync_data (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error)
{
@@ -1924,14 +1923,14 @@ e_book_backend_sqlitedb_get_sync_data (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_set_sync_data:
+ * ews_book_backend_sqlitedb_set_sync_data:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_set_sync_data (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_set_sync_data (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *sync_data,
GError **error)
@@ -1959,14 +1958,14 @@ e_book_backend_sqlitedb_set_sync_data (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_get_key_value:
+ * ews_book_backend_sqlitedb_get_key_value:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gchar *
-e_book_backend_sqlitedb_get_key_value (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_get_key_value (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *key,
GError **error)
@@ -1986,14 +1985,14 @@ e_book_backend_sqlitedb_get_key_value (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_set_key_value:
+ * ews_book_backend_sqlitedb_set_key_value:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_set_key_value (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_set_key_value (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *key,
const gchar *value,
@@ -2022,14 +2021,14 @@ e_book_backend_sqlitedb_set_key_value (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_get_partially_cached_ids:
+ * ews_book_backend_sqlitedb_get_partially_cached_ids:
*
* FIXME: Document me.
*
* Since: 3.2
**/
GSList *
-e_book_backend_sqlitedb_get_partially_cached_ids (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_get_partially_cached_ids (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error)
{
@@ -2049,14 +2048,14 @@ e_book_backend_sqlitedb_get_partially_cached_ids (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_delete_addressbook:
+ * ews_book_backend_sqlitedb_delete_addressbook:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_delete_addressbook (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_delete_addressbook (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error)
{
@@ -2097,14 +2096,14 @@ e_book_backend_sqlitedb_delete_addressbook (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_search_data_free:
+ * ews_book_backend_sqlitedb_search_data_free:
*
* FIXME: Document me.
*
* Since: 3.2
**/
void
-e_book_backend_sqlitedb_search_data_free (EbSdbSearchData *s_data)
+ews_book_backend_sqlitedb_search_data_free (EwsSdbSearchData *s_data)
{
if (s_data) {
g_free (s_data->uid);
@@ -2115,7 +2114,7 @@ e_book_backend_sqlitedb_search_data_free (EbSdbSearchData *s_data)
}
gboolean
-e_book_backend_sqlitedb_create_addressbook (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_create_addressbook (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *folder_name,
gboolean store_vcard,
@@ -2137,17 +2136,17 @@ e_book_backend_sqlitedb_create_addressbook (EBookBackendSqliteDB *ebsdb,
}
/**
- * e_book_backend_sqlitedb_remove:
+ * ews_book_backend_sqlitedb_remove:
*
* FIXME: Document me.
*
* Since: 3.2
**/
gboolean
-e_book_backend_sqlitedb_remove (EBookBackendSqliteDB *ebsdb,
+ews_book_backend_sqlitedb_remove (EwsBookBackendSqliteDB *ebsdb,
GError **error)
{
- EBookBackendSqliteDBPrivate *priv;
+ EwsBookBackendSqliteDBPrivate *priv;
gchar *filename;
gint ret;
diff --git a/src/addressbook/e-book-backend-sqlitedb.h b/src/addressbook/ews-book-backend-sqlitedb.h
similarity index 51%
rename from src/addressbook/e-book-backend-sqlitedb.h
rename to src/addressbook/ews-book-backend-sqlitedb.h
index ed815e2..d2d8301 100644
--- a/src/addressbook/e-book-backend-sqlitedb.h
+++ b/src/addressbook/ews-book-backend-sqlitedb.h
@@ -1,5 +1,5 @@
/*-*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-book-backend-sqlitedb.h
+/* ews-book-backend-sqlitedb.h
*
* Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
@@ -19,59 +19,57 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef E_BOOK_BACKEND_SQLITEDB_H
-#define E_BOOK_BACKEND_SQLITEDB_H
+#ifndef EWS_BOOK_BACKEND_SQLITEDB_H
+#define EWS_BOOK_BACKEND_SQLITEDB_H
-#include <glib.h>
-#include <glib-object.h>
-#include <libebook/e-contact.h>
+#include <libebook/libebook.h>
/* Standard GObject macros */
-#define E_TYPE_BOOK_BACKEND_SQLITEDB \
- (e_book_backend_sqlitedb_get_type ())
-#define E_BOOK_BACKEND_SQLITEDB(obj) \
+#define EWS_TYPE_BOOK_BACKEND_SQLITEDB \
+ (ews_book_backend_sqlitedb_get_type ())
+#define EWS_BOOK_BACKEND_SQLITEDB(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), E_TYPE_BOOK_BACKEND_SQLITEDB, EBookBackendSqliteDB))
-#define E_BOOK_BACKEND_SQLITEDB_CLASS(cls) \
+ ((obj), EWS_TYPE_BOOK_BACKEND_SQLITEDB, EwsBookBackendSqliteDB))
+#define EWS_BOOK_BACKEND_SQLITEDB_CLASS(cls) \
(G_TYPE_CHECK_CLASS_CAST \
- ((cls), E_TYPE_BOOK_BACKEND_SQLITEDB, EBookBackendSqliteDBClass))
-#define E_IS_BOOK_BACKEND_SQLITEDB(obj) \
+ ((cls), EWS_TYPE_BOOK_BACKEND_SQLITEDB, EwsBookBackendSqliteDBClass))
+#define EWS_IS_BOOK_BACKEND_SQLITEDB(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), E_TYPE_BOOK_BACKEND_SQLITEDB))
-#define E_IS_BOOK_BACKEND_SQLITEDB_CLASS(cls) \
+ ((obj), EWS_TYPE_BOOK_BACKEND_SQLITEDB))
+#define EWS_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) \
+ ((cls), EWS_TYPE_BOOK_BACKEND_SQLITEDB))
+#define EWS_BOOK_BACKEND_SQLITEDB_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS \
- ((obj), E_TYPE_BOOK_BACKEND_SQLITEDB, EBookBackendSqliteDBClass))
+ ((obj), EWS_TYPE_BOOK_BACKEND_SQLITEDB, EwsBookBackendSqliteDBClass))
G_BEGIN_DECLS
-typedef struct _EBookBackendSqliteDB EBookBackendSqliteDB;
-typedef struct _EBookBackendSqliteDBClass EBookBackendSqliteDBClass;
-typedef struct _EBookBackendSqliteDBPrivate EBookBackendSqliteDBPrivate;
+typedef struct _EwsBookBackendSqliteDB EwsBookBackendSqliteDB;
+typedef struct _EwsBookBackendSqliteDBClass EwsBookBackendSqliteDBClass;
+typedef struct _EwsBookBackendSqliteDBPrivate EwsBookBackendSqliteDBPrivate;
/**
- * EBookBackendSqliteDB:
+ * EwsBookBackendSqliteDB:
*
* Contains only private data that should be read and manipulated using the
* functions below.
*
* Since: 3.2
**/
-struct _EBookBackendSqliteDB {
+struct _EwsBookBackendSqliteDB {
GObject parent;
- EBookBackendSqliteDBPrivate *priv;
+ EwsBookBackendSqliteDBPrivate *priv;
};
-struct _EBookBackendSqliteDBClass {
+struct _EwsBookBackendSqliteDBClass {
GObjectClass parent_class;
/* virtual methods */
};
/**
- * EbSdbSearchData:
+ * EwsSdbSearchData:
*
* FIXME: Document me.
*
@@ -81,55 +79,57 @@ typedef struct {
gchar *vcard;
gchar *uid;
gchar *bdata;
-} EbSdbSearchData;
+} EwsSdbSearchData;
-GType e_book_backend_sqlitedb_get_type (void);
+GType ews_book_backend_sqlitedb_get_type (void);
-EBookBackendSqliteDB *
- e_book_backend_sqlitedb_new (const gchar *path,
+EwsBookBackendSqliteDB *
+ ews_book_backend_sqlitedb_new (const gchar *path,
const gchar *email_id,
const gchar *folderid,
const gchar *folder_name,
gboolean store_vcard,
GError **error);
-gboolean e_book_backend_sqlitedb_add_contact (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_add_contact (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
EContact *contact,
gboolean partial_content,
GError **error);
-gboolean e_book_backend_sqlitedb_add_contacts (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_add_contacts (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GSList *contacts,
gboolean partial_content,
GError **error);
-gboolean e_book_backend_sqlitedb_remove_contact (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_remove_contact
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
GError **error);
-gboolean e_book_backend_sqlitedb_remove_contacts (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_remove_contacts
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GSList *uids,
GError **error);
-gboolean e_book_backend_sqlitedb_has_contact (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_has_contact (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
gboolean *partial_content,
GError **error);
-EContact * e_book_backend_sqlitedb_get_contact (EBookBackendSqliteDB *ebsdb,
+EContact * ews_book_backend_sqlitedb_get_contact (EwsBookBackendSqliteDB *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,
+gchar * ews_book_backend_sqlitedb_get_vcard_string
+ (EwsBookBackendSqliteDB *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,
+GSList * ews_book_backend_sqlitedb_search (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *sexp,
/* const */ GHashTable *fields_of_interest,
@@ -137,86 +137,87 @@ GSList * e_book_backend_sqlitedb_search (EBookBackendSqliteDB *ebsdb,
gboolean *with_all_required_fields,
GError **error);
-GSList * e_book_backend_sqlitedb_search_uids
- (EBookBackendSqliteDB *ebsdb,
+GSList * ews_book_backend_sqlitedb_search_uids (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *sexp,
- gboolean *searched,
+ gboolean *searched,
GError **error);
-gboolean e_book_backend_sqlitedb_get_is_populated
- (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_get_is_populated
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error);
-gboolean e_book_backend_sqlitedb_set_is_populated
- (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_set_is_populated
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
gboolean populated,
GError **error);
-gchar * e_book_backend_sqlitedb_get_sync_data
- (EBookBackendSqliteDB *ebsdb,
+gchar * ews_book_backend_sqlitedb_get_sync_data
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error);
-gboolean e_book_backend_sqlitedb_set_sync_data
- (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_set_sync_data
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *sync_data,
GError **error);
-gchar * e_book_backend_sqlitedb_get_key_value
- (EBookBackendSqliteDB *ebsdb,
+gchar * ews_book_backend_sqlitedb_get_key_value
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *key,
GError **error);
-gboolean e_book_backend_sqlitedb_set_key_value
- (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_set_key_value
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *key,
const gchar *value,
GError **error);
-gchar * e_book_backend_sqlitedb_get_contact_bdata
- (EBookBackendSqliteDB *ebsdb,
+gchar * ews_book_backend_sqlitedb_get_contact_bdata
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
GError **error);
-gboolean e_book_backend_sqlitedb_set_contact_bdata
- (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_set_contact_bdata
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
const gchar *uid,
const gchar *value,
GError **error);
-gboolean e_book_backend_sqlitedb_get_has_partial_content
- (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_get_has_partial_content
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error);
-gboolean e_book_backend_sqlitedb_set_has_partial_content
- (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_set_has_partial_content
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
gboolean partial_content,
GError **error);
-GSList * e_book_backend_sqlitedb_get_partially_cached_ids
- (EBookBackendSqliteDB *ebsdb,
+GSList * ews_book_backend_sqlitedb_get_partially_cached_ids
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error);
-gboolean e_book_backend_sqlitedb_delete_addressbook
- (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_delete_addressbook
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folderid,
GError **error);
-gboolean e_book_backend_sqlitedb_create_addressbook
- (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_create_addressbook
+ (EwsBookBackendSqliteDB *ebsdb,
const gchar *folder_id,
const gchar *folder_name,
gboolean store_vcard,
GError **error);
-gboolean e_book_backend_sqlitedb_remove (EBookBackendSqliteDB *ebsdb,
+gboolean ews_book_backend_sqlitedb_remove (EwsBookBackendSqliteDB *ebsdb,
GError **error);
-void e_book_backend_sqlitedb_search_data_free
- (EbSdbSearchData *s_data);
+void ews_book_backend_sqlitedb_search_data_free
+ (EwsSdbSearchData *s_data);
-gboolean e_book_backend_sqlitedb_is_summary_query (const gchar *query);
-gboolean e_book_backend_sqlitedb_is_summary_fields (GHashTable *fields_of_interest);
+gboolean ews_book_backend_sqlitedb_is_summary_query
+ (const gchar *query);
+gboolean ews_book_backend_sqlitedb_is_summary_fields
+ (GHashTable *fields_of_interest);
G_END_DECLS
-#endif /* E_BOOK_BACKEND_SQLITEDB_H */
+#endif /* EWS_BOOK_BACKEND_SQLITEDB_H */
diff --git a/src/addressbook/ews-oab-decoder.c b/src/addressbook/ews-oab-decoder.c
index 1811b1e..8fbd791 100644
--- a/src/addressbook/ews-oab-decoder.c
+++ b/src/addressbook/ews-oab-decoder.c
@@ -24,7 +24,7 @@
#include <string.h>
#include <glib/gstdio.h>
-#include <libebook/e-vcard.h>
+#include <libebook/libebook.h>
#include "ews-oab-decoder.h"
#include "ews-oab-props.h"
@@ -1025,12 +1025,12 @@ ews_oab_decoder_get_contact_from_offset (EwsOabDecoder *eod,
return contact;
}
-#include "e-book-backend-sqlitedb.h"
+#include "ews-book-backend-sqlitedb.h"
struct _db_data {
GSList *contact_collector;
guint collected_length;
- EBookBackendSqliteDB *ebsdb;
+ EwsBookBackendSqliteDB *ebsdb;
const gchar *folderid;
};
@@ -1048,7 +1048,7 @@ ews_test_store_contact (EContact *contact,
if (data->collected_length == 1000 || percent >= 100) {
data->contact_collector = g_slist_reverse (data->contact_collector);
- e_book_backend_sqlitedb_add_contacts (data->ebsdb, data->folderid, data->contact_collector, FALSE, error);
+ ews_book_backend_sqlitedb_add_contacts (data->ebsdb, data->folderid, data->contact_collector, FALSE, error);
g_print ("percent complete %d \n", percent);
g_slist_foreach (data->contact_collector, (GFunc) g_object_unref, NULL);
@@ -1062,7 +1062,7 @@ gint
main (gint argc,
gchar *argv[])
{
- EBookBackendSqliteDB *ebsdb;
+ EwsBookBackendSqliteDB *ebsdb;
EwsOabDecoder *eod;
GError *err = NULL;
GTimer *timer;
@@ -1075,7 +1075,7 @@ main (gint argc,
return -1;
}
- ebsdb = e_book_backend_sqlitedb_new (argv [2], "dum", "de", "dum", TRUE, NULL);
+ ebsdb = ews_book_backend_sqlitedb_new (argv [2], "dum", "de", "dum", TRUE, NULL);
eod = ews_oab_decoder_new (argv[1], argv[2], &err);
data.contact_collector = NULL;
diff --git a/src/addressbook/ews-oab-decoder.h b/src/addressbook/ews-oab-decoder.h
index cfc6551..f9ccba5 100644
--- a/src/addressbook/ews-oab-decoder.h
+++ b/src/addressbook/ews-oab-decoder.h
@@ -22,8 +22,7 @@
#ifndef _EWS_OAB_DECODER
#define _EWS_OAB_DECODER
-#include <gio/gio.h>
-#include <libebook/e-contact.h>
+#include <libebook/libebook.h>
G_BEGIN_DECLS
diff --git a/src/calendar/e-cal-backend-ews-factory.c b/src/calendar/e-cal-backend-ews-factory.c
index e9996d3..aa9e576 100644
--- a/src/calendar/e-cal-backend-ews-factory.c
+++ b/src/calendar/e-cal-backend-ews-factory.c
@@ -11,7 +11,7 @@
#include <string.h>
-#include <libedata-cal/e-cal-backend-factory.h>
+#include <libedata-cal/libedata-cal.h>
#include "server/e-source-ews-folder.h"
diff --git a/src/calendar/e-cal-backend-ews-utils.c b/src/calendar/e-cal-backend-ews-utils.c
index 78f6134..9ded66b 100644
--- a/src/calendar/e-cal-backend-ews-utils.c
+++ b/src/calendar/e-cal-backend-ews-utils.c
@@ -32,8 +32,7 @@
#include <glib/gstdio.h>
#include <gio/gio.h>
-#include <libecal/e-cal-recur.h>
-#include <libecal/e-cal-time-util.h>
+#include <libecal/libecal.h>
#include <libsoup/soup-misc.h>
#include "server/e-ews-connection.h"
diff --git a/src/calendar/e-cal-backend-ews-utils.h b/src/calendar/e-cal-backend-ews-utils.h
index c28826c..e370dd4 100644
--- a/src/calendar/e-cal-backend-ews-utils.h
+++ b/src/calendar/e-cal-backend-ews-utils.h
@@ -21,7 +21,7 @@
#ifndef E_CAL_BACKEND_EWS_UTILS_H
#define E_CAL_BACKEND_EWS_UTILS_H
-#include <libecal/e-cal-component.h>
+#include <libecal/libecal.h>
#include <libical/icaltime.h>
#include <libical/icaltimezone.h>
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 40c2e2e..3bfcbde 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -33,17 +33,7 @@
#include <camel/camel.h>
-#include <libedataserver/eds-version.h>
-#include <libedataserver/e-source-camel.h>
-#include <libedataserver/e-xml-hash-utils.h>
-#include <libedataserver/e-url.h>
-
-#include <libedata-cal/e-cal-backend-cache.h>
-#include <libedata-cal/e-cal-backend-file-store.h>
-#include <libedata-cal/e-cal-backend-util.h>
-
-#include <libecal/e-cal-component.h>
-#include <libecal/e-cal-time-util.h>
+#include <libedata-cal/libedata-cal.h>
#include <libical/icaltz-util.h>
#include <libical/icalcomponent.h>
diff --git a/src/calendar/e-cal-backend-ews.h b/src/calendar/e-cal-backend-ews.h
index 3c22df3..0959405 100644
--- a/src/calendar/e-cal-backend-ews.h
+++ b/src/calendar/e-cal-backend-ews.h
@@ -21,7 +21,7 @@
#ifndef E_CAL_BACKEND_EWS_H
#define E_CAL_BACKEND_EWS_H
-#include <libedata-cal/e-cal-backend-sync.h>
+#include <libedata-cal/libedata-cal.h>
#include "server/e-ews-connection.h"
diff --git a/src/camel/camel-ews-folder.c b/src/camel/camel-ews-folder.c
index 3027c79..fdee495 100644
--- a/src/camel/camel-ews-folder.c
+++ b/src/camel/camel-ews-folder.c
@@ -41,7 +41,6 @@ which needs to be better organized via functions */
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
-#include <libedataserver/e-flag.h>
#include <libical/icalcomponent.h>
#include <libical/icalparser.h>
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index f7881e3..859c854 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -36,8 +36,6 @@
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
-#include <libedataserver/e-flag.h>
-
#include "server/camel-ews-settings.h"
#include "server/e-ews-item-change.h"
#include "server/e-ews-message.h"
diff --git a/src/modules/e-mail-config-ews-backend.c b/src/modules/e-mail-config-ews-backend.c
index 7352269..24dda21 100644
--- a/src/modules/e-mail-config-ews-backend.c
+++ b/src/modules/e-mail-config-ews-backend.c
@@ -22,8 +22,7 @@
#include <glib/gi18n-lib.h>
#include <camel/camel.h>
-#include <libebackend/e-extension.h>
-#include <libedataserver/e-source-collection.h>
+#include <libebackend/libebackend.h>
#include <mail/e-mail-config-auth-check.h>
#include <mail/e-mail-config-receiving-page.h>
diff --git a/src/modules/e-mail-config-ews-gal.h b/src/modules/e-mail-config-ews-gal.h
index 2ab1db7..60ee20b 100644
--- a/src/modules/e-mail-config-ews-gal.h
+++ b/src/modules/e-mail-config-ews-gal.h
@@ -19,7 +19,7 @@
#ifndef E_MAIL_CONFIG_EWS_GAL_H
#define E_MAIL_CONFIG_EWS_GAL_H
-#include <libebackend/e-extension.h>
+#include <libebackend/libebackend.h>
/* Standard GObject macros */
#define E_TYPE_MAIL_CONFIG_EWS_GAL \
diff --git a/src/modules/e-mail-config-ews-ooo-page.h b/src/modules/e-mail-config-ews-ooo-page.h
index 86e5cf9..22c9ae8 100644
--- a/src/modules/e-mail-config-ews-ooo-page.h
+++ b/src/modules/e-mail-config-ews-ooo-page.h
@@ -22,7 +22,7 @@
#define E_MAIL_CONFIG_EWS_OOO_PAGE_H
#include <gtk/gtk.h>
-#include <libedataserver/e-source.h>
+#include <libedataserver/libedataserver.h>
#include <mail/e-mail-config-page.h>
diff --git a/src/modules/module-ews-backend.c b/src/modules/module-ews-backend.c
index df680b9..7d4cce7 100644
--- a/src/modules/module-ews-backend.c
+++ b/src/modules/module-ews-backend.c
@@ -19,20 +19,7 @@
#include <config.h>
#include <glib/gi18n-lib.h>
-#include <libedataserver/e-source-address-book.h>
-#include <libedataserver/e-source-authentication.h>
-#include <libedataserver/e-source-autocomplete.h>
-#include <libedataserver/e-source-calendar.h>
-#include <libedataserver/e-source-camel.h>
-#include <libedataserver/e-source-collection.h>
-#include <libedataserver/e-source-mail-account.h>
-#include <libedataserver/e-source-mail-identity.h>
-#include <libedataserver/e-source-mail-transport.h>
-#include <libedataserver/e-source-offline.h>
-
-#include <libebackend/e-collection-backend.h>
-#include <libebackend/e-collection-backend-factory.h>
-#include <libebackend/e-source-registry-server.h>
+#include <libebackend/libebackend.h>
#include "server/e-ews-connection.h"
#include "server/e-source-ews-folder.h"
diff --git a/src/server/camel-ews-settings.c b/src/server/camel-ews-settings.c
index 6ac8645..681c05f 100644
--- a/src/server/camel-ews-settings.c
+++ b/src/server/camel-ews-settings.c
@@ -18,7 +18,7 @@
#include "camel-ews-settings.h"
-#include <libedataserver/e-data-server-util.h>
+#include <libedataserver/libedataserver.h>
#define CAMEL_EWS_SETTINGS_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index eef5564..d7b01ee 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -33,9 +33,9 @@
#include <libical/icalcomponent.h>
#include <libical/icalproperty.h>
#include <libical/ical.h>
+#include <libedataserver/libedataserver.h>
+
#include "e-ews-connection.h"
-#include <libedataserver/e-flag.h>
-#include <libedataserver/e-data-server-util.h>
#include "e-ews-message.h"
#include "e-ews-item-change.h"
#include "ews-marshal.h"
diff --git a/src/server/e-source-ews-folder.h b/src/server/e-source-ews-folder.h
index 3dd30e4..65e8035 100644
--- a/src/server/e-source-ews-folder.h
+++ b/src/server/e-source-ews-folder.h
@@ -19,7 +19,7 @@
#ifndef E_SOURCE_EWS_FOLDER_H
#define E_SOURCE_EWS_FOLDER_H
-#include <libedataserver/e-source-extension.h>
+#include <libedataserver/libedataserver.h>
/* Standard GObject macros */
#define E_TYPE_SOURCE_EWS_FOLDER \
diff --git a/src/utils/e-ews-query-to-restriction.c b/src/utils/e-ews-query-to-restriction.c
index ec6cae1..a45dff0 100644
--- a/src/utils/e-ews-query-to-restriction.c
+++ b/src/utils/e-ews-query-to-restriction.c
@@ -25,10 +25,10 @@
#include <string.h>
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
-#include <libedata-cal/e-cal-backend-sexp.h>
-#include "libedataserver/e-sexp.h"
-#include "e-ews-query-to-restriction.h"
#include <camel/camel.h>
+#include <libedata-cal/libedata-cal.h>
+
+#include "e-ews-query-to-restriction.h"
#include "server/e-ews-message.h"
diff --git a/src/utils/e-sqlite3-vfs.c b/src/utils/e-sqlite3-vfs.c
index ea767d5..080180f 100644
--- a/src/utils/e-sqlite3-vfs.c
+++ b/src/utils/e-sqlite3-vfs.c
@@ -27,7 +27,7 @@
#include <string.h>
#include <glib/gi18n-lib.h>
-#include <libedataserver/e-flag.h>
+#include <libedataserver/libedataserver.h>
#include "e-sqlite3-vfs.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]