[evolution-ews] EBookBackendSqliteDB: add e_book_backend_sqlitedb_add_contact
- From: Chenthill Palanisamy <pchen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] EBookBackendSqliteDB: add e_book_backend_sqlitedb_add_contact
- Date: Thu, 19 May 2011 10:34:46 +0000 (UTC)
commit 89989454a3f44128684df11257fe45656e47a1eb
Author: Sean Finney <seanius seanius net>
Date: Thu May 19 15:43:07 2011 +0530
EBookBackendSqliteDB: add e_book_backend_sqlitedb_add_contact
src/addressbook/e-book-backend-sqlitedb.c | 28 ++++++++++++++++++++++++++++
src/addressbook/e-book-backend-sqlitedb.h | 5 +++++
2 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-sqlitedb.c b/src/addressbook/e-book-backend-sqlitedb.c
index e957d99..aa195fe 100644
--- a/src/addressbook/e-book-backend-sqlitedb.c
+++ b/src/addressbook/e-book-backend-sqlitedb.c
@@ -511,6 +511,34 @@ insert_stmt_from_contact (EContact *contact,
}
/**
+ * e_book_backend_sqlitedb_add_contact
+ * @ebsdb:
+ * @folderid: folder id
+ * @contact: EContact to be added
+ * @partial_content: contact does not contain full information. Used when
+ * the backend cache's partial information for auto-completion.
+ * @error:
+ *
+ * This is a convenience wrapper for e_book_backend_sqlitedb_add_contacts,
+ * which is the preferred means to add multiple contacts when possible.
+ *
+ * Returns: TRUE on success.
+ **/
+gboolean
+e_book_backend_sqlitedb_add_contact (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ EContact *contact,
+ gboolean partial_content,
+ GError **error)
+{
+ GSList l;
+ l.data = contact;
+ l.next = NULL;
+ return e_book_backend_sqlitedb_add_contacts (ebsdb, folderid, &l,
+ partial_content, error);
+}
+
+/**
* e_book_backend_sqlitedb_add_contacts
* @ebsdb:
* @folderid: folder id
diff --git a/src/addressbook/e-book-backend-sqlitedb.h b/src/addressbook/e-book-backend-sqlitedb.h
index b436243..d4ef140 100644
--- a/src/addressbook/e-book-backend-sqlitedb.h
+++ b/src/addressbook/e-book-backend-sqlitedb.h
@@ -72,6 +72,11 @@ EBookBackendSqliteDB *
const gchar *folder_name,
gboolean vcard_as_files,
GError **error);
+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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]