[evolution-data-server/openismus-work: 47/52] e_book_backend_sqlitedb_new_full(): Simplified to take the extension directly.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work: 47/52] e_book_backend_sqlitedb_new_full(): Simplified to take the extension directly.
- Date: Thu, 22 Nov 2012 04:06:46 +0000 (UTC)
commit 6efa836af7039934b8a00d34f3fb5f6746169b07
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Tue Nov 20 16:42:27 2012 +0900
e_book_backend_sqlitedb_new_full(): Simplified to take the extension directly.
Conflicts:
addressbook/libedata-book/e-book-backend-sqlitedb.h
.../libedata-book/e-book-backend-sqlitedb.c | 31 ++++++++++++++-----
.../libedata-book/e-book-backend-sqlitedb.h | 6 +---
2 files changed, 24 insertions(+), 13 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-backend-sqlitedb.c b/addressbook/libedata-book/e-book-backend-sqlitedb.c
index f2a61c0..da2dd98 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.c
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.c
@@ -893,24 +893,33 @@ e_book_backend_sqlitedb_new_full (const gchar *path,
const gchar *folderid,
const gchar *folder_name,
gboolean store_vcard,
- EContactField *fields,
- gint n_fields,
- EContactField *indexed_fields,
- EBookIndexType *index_types,
- gint n_indexed_fields,
+ ESourceBackendSummarySetup *setup,
GError **error)
{
EBookBackendSqliteDB *ebsdb = NULL;
+ EContactField *fields;
+ EContactField *indexed_fields;
+ EBookIndexType *index_types;
gboolean have_attr_list = FALSE;
gboolean have_attr_list_prefix = FALSE;
gboolean have_attr_list_suffix = FALSE;
gboolean had_error = FALSE;
GArray *summary_fields;
- gint i;
+ gint n_fields, n_indexed_fields, i;
+
+ fields = e_source_backend_summary_setup_get_summary_fields (setup, &n_fields);
+ indexed_fields = e_source_backend_summary_setup_get_indexed_fields (setup, &index_types, &n_indexed_fields);
/* No specified summary fields indicates the default summary configuration should be used */
- if (n_fields <= 0)
- return e_book_backend_sqlitedb_new (path, emailid, folderid, folder_name, store_vcard, error);
+ if (n_fields <= 0) {
+
+ ebsdb = e_book_backend_sqlitedb_new (path, emailid, folderid, folder_name, store_vcard, error);
+ g_free (fields);
+ g_free (index_types);
+ g_free (indexed_fields);
+
+ return ebsdb;
+ }
summary_fields = g_array_new (FALSE, FALSE, sizeof (SummaryField));
@@ -927,6 +936,9 @@ e_book_backend_sqlitedb_new_full (const gchar *path,
if (had_error) {
g_array_free (summary_fields, TRUE);
+ g_free (fields);
+ g_free (index_types);
+ g_free (indexed_fields);
return NULL;
}
@@ -943,6 +955,9 @@ e_book_backend_sqlitedb_new_full (const gchar *path,
have_attr_list_suffix,
error);
+ g_free (fields);
+ g_free (index_types);
+ g_free (indexed_fields);
g_array_free (summary_fields, FALSE);
return ebsdb;
diff --git a/addressbook/libedata-book/e-book-backend-sqlitedb.h b/addressbook/libedata-book/e-book-backend-sqlitedb.h
index dfbc43c..f4156d2 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.h
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.h
@@ -101,11 +101,7 @@ EBookBackendSqliteDB *
const gchar *folderid,
const gchar *folder_name,
gboolean store_vcard,
- EContactField *fields,
- gint n_fields,
- EContactField *indexed_fields,
- EBookIndexType *index_types,
- gint n_indexed_fields,
+ ESourceBackendSummarySetup *setup,
GError **error);
gboolean e_book_backend_sqlitedb_lock_updates (EBookBackendSqliteDB *ebsdb,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]