platform/upstream/evolution-data-server.git
11 years agoEBookBackendFile: Avoid lost data in contact modifications
Tristan Van Berkom [Thu, 24 Jan 2013 05:57:03 +0000 (14:57 +0900)]
EBookBackendFile: Avoid lost data in contact modifications

When modifying contacts, ensure that the contact revisions are in
sync with the existing ones, otherwise report the E_DATA_BOOK_STATUS_OUT_OF_SYNC
error. This indicates that the client should refresh it's local copy
of the contact before trying to modify it again.

Conflicts:

addressbook/backends/file/e-book-backend-file.c

11 years agoAdding test case proving there is a write-write race condition to fix
Tristan Van Berkom [Thu, 25 Oct 2012 07:51:32 +0000 (16:51 +0900)]
Adding test case proving there is a write-write race condition to fix

The test case creates a number of threads all trying to modify the
same contact in the same book each concurrently with a different field,
if the modification fails it retries. If all the fields (one for each
thread) are not properly set at the end of all thread execution, then
the test is a failure.

11 years agoAdding ESourceRevisionGuards
Tristan Van Berkom [Thu, 24 Jan 2013 07:07:27 +0000 (16:07 +0900)]
Adding ESourceRevisionGuards

The ESourceRevisionGuards extension configures whether an ESource backend
should check revisions on object modifications and produce an
E_CLIENT_ERROR_OUT_OF_SYNC error upon revision conflicts.

11 years agoEClient: Adding E_CLIENT_ERROR_OUT_OF_SYNC
Tristan Van Berkom [Thu, 24 Jan 2013 05:56:10 +0000 (14:56 +0900)]
EClient: Adding E_CLIENT_ERROR_OUT_OF_SYNC

An error to descibe out of sync data between the client and backend.

11 years agoClean up the mess that is CalObjModType.
Matthew Barnes [Mon, 28 Jan 2013 20:50:34 +0000 (15:50 -0500)]
Clean up the mess that is CalObjModType.

Deprecate both CalObjModType and EDataCalObjModType.

Introduce ECalObjModType with equivalent but properly namespaced enum
values, generate a GType for this enum, and swap out CalObjModType for
ECalObjModType throughout the calendar API.

Trying not to break the API here, but this is a freakin mess.

11 years agoDeprecate EDataCalObjType.
Matthew Barnes [Mon, 28 Jan 2013 20:32:56 +0000 (15:32 -0500)]
Deprecate EDataCalObjType.

No longer needed with the new D-Bus factory APIs.

11 years agoDeprecate CalMode and cal_mode_to_corba().
Matthew Barnes [Mon, 28 Jan 2013 20:26:12 +0000 (15:26 -0500)]
Deprecate CalMode and cal_mode_to_corba().

11 years agoe-cal-types.h cleanups.
Matthew Barnes [Mon, 28 Jan 2013 20:29:59 +0000 (15:29 -0500)]
e-cal-types.h cleanups.

11 years agoe-cal-util.h cleanups.
Matthew Barnes [Mon, 28 Jan 2013 20:23:44 +0000 (15:23 -0500)]
e-cal-util.h cleanups.

11 years agoUpdated Slovenian translation
Matej Urbančič [Mon, 28 Jan 2013 20:45:30 +0000 (21:45 +0100)]
Updated Slovenian translation

11 years agoBug #651399 - [maildir] Escape dots in folder display names
Milan Crha [Mon, 28 Jan 2013 18:09:46 +0000 (19:09 +0100)]
Bug #651399 - [maildir] Escape dots in folder display names

11 years agoGOA: Support the upcoming "imap_smtp" provider type.
Matthew Barnes [Mon, 28 Jan 2013 17:16:35 +0000 (12:16 -0500)]
GOA: Support the upcoming "imap_smtp" provider type.

11 years agognome_online_accounts_get_backend_name() cleanups.
Matthew Barnes [Mon, 28 Jan 2013 17:05:21 +0000 (12:05 -0500)]
gnome_online_accounts_get_backend_name() cleanups.

11 years agoMake ECollectionBackend and ECollectionBackendFactory instantiable.
Matthew Barnes [Mon, 28 Jan 2013 16:37:22 +0000 (11:37 -0500)]
Make ECollectionBackend and ECollectionBackendFactory instantiable.

ECollectionBackendFactory will use a backend name of "none" and will
instantiate an ECollectionBackend, which takes no action on its own.

Believe it or not, there's actually a use case for this.

GOA will soon add a provider for generic IMAP/SMTP accounts.  Our GOA
module will support these accounts by configuring a collection source
with a backend name of "none" as well as mail account, mail identity,
and mail transport sources.

The mechanics of ESourceRegistryServer do require a collection backend
to support a collection source but the backend will have nothing to do.

11 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 28 Jan 2013 10:44:27 +0000 (11:44 +0100)]
Updated Spanish translation

11 years agotests: Fix srcdir != builddir
Colin Walters [Sun, 27 Jan 2013 17:28:26 +0000 (12:28 -0500)]
tests: Fix srcdir != builddir

https://bugzilla.gnome.org/show_bug.cgi?id=692639

11 years agoECalClient: Add a "source-type" construct-only property.
Matthew Barnes [Sun, 27 Jan 2013 14:38:49 +0000 (09:38 -0500)]
ECalClient: Add a "source-type" construct-only property.

11 years agoRestore test case for bug 685986.
Matthew Barnes [Sun, 27 Jan 2013 12:47:34 +0000 (07:47 -0500)]
Restore test case for bug 685986.

11 years agoEClient: Remove unused 'uri' member.
Matthew Barnes [Sat, 26 Jan 2013 21:02:19 +0000 (16:02 -0500)]
EClient: Remove unused 'uri' member.

11 years agoEClient: Minor cleanups.
Matthew Barnes [Sat, 26 Jan 2013 19:08:57 +0000 (14:08 -0500)]
EClient: Minor cleanups.

11 years agoDeprecate e_cal_backend_sync_set_backend_property().
Matthew Barnes [Sat, 26 Jan 2013 15:17:54 +0000 (10:17 -0500)]
Deprecate e_cal_backend_sync_set_backend_property().

No longer used.

11 years agoDeprecate e_cal_backend_set_backend_property().
Matthew Barnes [Sat, 26 Jan 2013 14:47:31 +0000 (09:47 -0500)]
Deprecate e_cal_backend_set_backend_property().

No longer used.

11 years agoDeprecate e_data_cal_respond_set_backend_property().
Matthew Barnes [Sat, 26 Jan 2013 14:44:39 +0000 (09:44 -0500)]
Deprecate e_data_cal_respond_set_backend_property().

No longer used.

11 years agoEDataCal: Remove OP_SET_BACKEND_PROPERTY.
Matthew Barnes [Sat, 26 Jan 2013 14:42:25 +0000 (09:42 -0500)]
EDataCal: Remove OP_SET_BACKEND_PROPERTY.

No longer used.

11 years agoEDataCal: Remove "handle-set-backend-property" signal handler.
Matthew Barnes [Sat, 26 Jan 2013 14:41:29 +0000 (09:41 -0500)]
EDataCal: Remove "handle-set-backend-property" signal handler.

No longer used.

11 years agoDeprecate e_book_backend_sync_set_backend_property().
Matthew Barnes [Sat, 26 Jan 2013 14:19:30 +0000 (09:19 -0500)]
Deprecate e_book_backend_sync_set_backend_property().

No longer used.

11 years agoDeprecate e_book_backend_set_backend_property().
Matthew Barnes [Sat, 26 Jan 2013 14:06:12 +0000 (09:06 -0500)]
Deprecate e_book_backend_set_backend_property().

No longer used.

11 years agoDeprecate e_data_book_respond_set_backend_property().
Matthew Barnes [Sat, 26 Jan 2013 14:02:52 +0000 (09:02 -0500)]
Deprecate e_data_book_respond_set_backend_property().

No longer used.

11 years agoEDataBook: Remove OP_SET_BACKEND_PROPERTY.
Matthew Barnes [Sat, 26 Jan 2013 13:59:16 +0000 (08:59 -0500)]
EDataBook: Remove OP_SET_BACKEND_PROPERTY.

No longer used.

11 years agoEDataBook: Remove "handle-set-backend-property" signal handler.
Matthew Barnes [Sat, 26 Jan 2013 13:57:45 +0000 (08:57 -0500)]
EDataBook: Remove "handle-set-backend-property" signal handler.

No longer used.

11 years agoEClient: Deprecate e_client_set_backend_property_sync().
Matthew Barnes [Sat, 26 Jan 2013 13:56:21 +0000 (08:56 -0500)]
EClient: Deprecate e_client_set_backend_property_sync().

Clients cannot set backend properties.  Any attempt will fail with an
E_CLIENT_ERROR_NOT_SUPPORTED error.

Also deprecate the asynchronous variant:

    e_client_set_backend_property()
    e_client_set_backend_property_finish()

11 years agoECalClient: Handle set_backend_property() requests directly.
Matthew Barnes [Sat, 26 Jan 2013 13:42:01 +0000 (08:42 -0500)]
ECalClient: Handle set_backend_property() requests directly.

Neither ECalBackend itself nor any known ECalBackend subclass allows
clients to set backend properties, so forego the D-Bus message and fail
immediately on the client side with an E_CLIENT_ERROR_NOT_SUPPORTED.

11 years agoEBookClient: Handle set_backend_property() requests directly.
Matthew Barnes [Sat, 26 Jan 2013 13:34:23 +0000 (08:34 -0500)]
EBookClient: Handle set_backend_property() requests directly.

Neither EBookBackend itself nor any known EBookBackend subclass allows
clients to set backend properties, so forego the D-Bus message and fail
immediately on the client side with an E_CLIENT_ERROR_NOT_SUPPORTED.

11 years agoEClient: Add default implementations for async virtual methods.
Matthew Barnes [Sat, 26 Jan 2013 13:30:10 +0000 (08:30 -0500)]
EClient: Add default implementations for async virtual methods.

Subclasses will need only implement the synchronous virtual methods.

11 years agoUpdated Serbian translation
Мирослав Николић [Sat, 26 Jan 2013 09:18:14 +0000 (10:18 +0100)]
Updated Serbian translation

11 years agoDeprecate e_cal_backend_is_opening().
Matthew Barnes [Fri, 25 Jan 2013 21:12:51 +0000 (16:12 -0500)]
Deprecate e_cal_backend_is_opening().

This always returns FALSE now.

11 years agoDeprecate e_book_backend_is_opening().
Matthew Barnes [Fri, 25 Jan 2013 21:08:51 +0000 (16:08 -0500)]
Deprecate e_book_backend_is_opening().

This always returns FALSE now.

11 years agoDeprecate e_client_is_opened().
Matthew Barnes [Fri, 25 Jan 2013 20:04:32 +0000 (15:04 -0500)]
Deprecate e_client_is_opened().

This always returns TRUE now.

11 years agoDeprecate CLIENT_BACKEND_PROPERTY_OPENING.
Matthew Barnes [Fri, 25 Jan 2013 19:47:47 +0000 (14:47 -0500)]
Deprecate CLIENT_BACKEND_PROPERTY_OPENING.

Clients don't need to care if they're fully opened anymore.

11 years agoDeprecate CLIENT_BACKEND_PROPERTY_OPENED.
Matthew Barnes [Fri, 25 Jan 2013 19:35:49 +0000 (14:35 -0500)]
Deprecate CLIENT_BACKEND_PROPERTY_OPENED.

Clients don't need to care if they're fully opened anymore.

11 years agoECalBackend: Add a "writable" boolean property.
Matthew Barnes [Fri, 25 Jan 2013 17:57:10 +0000 (12:57 -0500)]
ECalBackend: Add a "writable" boolean property.

11 years agoEBookBackend: Remove redundant "online" flag.
Matthew Barnes [Fri, 25 Jan 2013 17:41:04 +0000 (12:41 -0500)]
EBookBackend: Remove redundant "online" flag.

11 years agoEBookBackend: Add a "writable" boolean property.
Matthew Barnes [Fri, 25 Jan 2013 17:37:43 +0000 (12:37 -0500)]
EBookBackend: Add a "writable" boolean property.

11 years agoEDataCal: Give OperationData a GDBusMethodInvocation.
Matthew Barnes [Fri, 25 Jan 2013 16:59:07 +0000 (11:59 -0500)]
EDataCal: Give OperationData a GDBusMethodInvocation.

Not used just yet, but will be.

11 years agoEDataBook: Give OperationData a GDBusMethodInvocation.
Matthew Barnes [Fri, 25 Jan 2013 16:55:23 +0000 (11:55 -0500)]
EDataBook: Give OperationData a GDBusMethodInvocation.

Not used just yet, but will be.

11 years agoEDataCal: operation_thread() cleanups.
Matthew Barnes [Fri, 25 Jan 2013 16:46:56 +0000 (11:46 -0500)]
EDataCal: operation_thread() cleanups.

11 years agoEDataBook: operation_thread() cleanups.
Matthew Barnes [Fri, 25 Jan 2013 16:37:04 +0000 (11:37 -0500)]
EDataBook: operation_thread() cleanups.

11 years agoEGdbusTemplates: Address crash on operation cancel
Milan Crha [Fri, 25 Jan 2013 16:21:31 +0000 (17:21 +0100)]
EGdbusTemplates: Address crash on operation cancel

In situations when a synchronous operation was cancelled, but the response
was already piled in main context the client could receive two replies, one
from the reply, the other from the cancelled operation, effectively accessing
invalid memory in the second response. This may address also other similar
situations caused by cancelled operations.

11 years agoEDataCal: Have pending_ops hold OperationData references.
Matthew Barnes [Fri, 25 Jan 2013 15:52:04 +0000 (10:52 -0500)]
EDataCal: Have pending_ops hold OperationData references.

11 years agoEDataBook: Have pending_ops hold OperationData references.
Matthew Barnes [Fri, 25 Jan 2013 15:45:23 +0000 (10:45 -0500)]
EDataBook: Have pending_ops hold OperationData references.

11 years agoEDataCal: Give OperationData a reference count.
Matthew Barnes [Fri, 25 Jan 2013 15:32:18 +0000 (10:32 -0500)]
EDataCal: Give OperationData a reference count.

11 years agoEDataBook: Give OperationData a reference count.
Matthew Barnes [Fri, 25 Jan 2013 14:45:19 +0000 (09:45 -0500)]
EDataBook: Give OperationData a reference count.

11 years agoEDataCal: Rename signal handlers.
Matthew Barnes [Fri, 25 Jan 2013 14:25:07 +0000 (09:25 -0500)]
EDataCal: Rename signal handlers.

11 years agoEDataBook: Rename signal handlers.
Matthew Barnes [Fri, 25 Jan 2013 14:14:39 +0000 (09:14 -0500)]
EDataBook: Rename signal handlers.

11 years agoAvoid crash in e_book_backend_file_load_revision()
Milan Crha [Fri, 25 Jan 2013 14:03:11 +0000 (15:03 +0100)]
Avoid crash in e_book_backend_file_load_revision()

There could happen a crash in e_book_backend_file_load_revision()
due to NULL 'error' when an application did a quick open/close
operations, in which case a backend was reused, with already set
priv::revision, and the call failed on a runtime constraint, but
didn't set the 'error', which led to the crash.

11 years agoEDataCal: Add argument guards where needed.
Matthew Barnes [Fri, 25 Jan 2013 13:55:37 +0000 (08:55 -0500)]
EDataCal: Add argument guards where needed.

11 years agoEDataBook: Add argument guards where needed.
Matthew Barnes [Fri, 25 Jan 2013 13:48:11 +0000 (08:48 -0500)]
EDataBook: Add argument guards where needed.

11 years agoUpdated Spanish translation
Daniel Mustieles [Fri, 25 Jan 2013 11:53:42 +0000 (12:53 +0100)]
Updated Spanish translation

11 years agoAssamese translation updated
Nilamdyuti Goswami [Fri, 25 Jan 2013 09:32:32 +0000 (15:02 +0530)]
Assamese translation updated

11 years agoReplace EGdbusCalFactory with EDBusCalendarFactory.
Matthew Barnes [Thu, 24 Jan 2013 18:16:46 +0000 (13:16 -0500)]
Replace EGdbusCalFactory with EDBusCalendarFactory.

11 years agoReplace EGdbusBookFactory with EDBusAddressBookFactory.
Matthew Barnes [Thu, 24 Jan 2013 18:06:24 +0000 (13:06 -0500)]
Replace EGdbusBookFactory with EDBusAddressBookFactory.

11 years agoGenerate D-Bus factory interfaces with gdbus-codegen.
Matthew Barnes [Thu, 24 Jan 2013 18:05:37 +0000 (13:05 -0500)]
Generate D-Bus factory interfaces with gdbus-codegen.

11 years agoBump D-Bus service names for new factory APIs.
Matthew Barnes [Wed, 28 Nov 2012 15:29:20 +0000 (10:29 -0500)]
Bump D-Bus service names for new factory APIs.

11 years agoUpdated POTFILES.in
Piotr Drąg [Thu, 24 Jan 2013 17:45:37 +0000 (18:45 +0100)]
Updated POTFILES.in

11 years agoE_CLIENT_ERROR_BUSY is no longer used.
Matthew Barnes [Thu, 24 Jan 2013 16:49:31 +0000 (11:49 -0500)]
E_CLIENT_ERROR_BUSY is no longer used.

11 years agoEDataCal: Queue operations while opening.
Matthew Barnes [Wed, 23 Jan 2013 17:09:10 +0000 (12:09 -0500)]
EDataCal: Queue operations while opening.

When an open operation is in progress, queue any subsequent operations
and dispatch them after the current open operation is complete.

The old behavior returned a BUSY error and forced the client to retry.
Clients are not involved in authentication anymore, so they should not
have to retry operations nor worry about whether the backend is opened.

This should really be handled directly by ECalBackend, but because of
the weird async semantics between ECalBackend and EDataCal, the queue
needs to live in EDataCal for now.

11 years agoEDataBook: Queue operations while opening.
Matthew Barnes [Wed, 23 Jan 2013 15:01:50 +0000 (10:01 -0500)]
EDataBook: Queue operations while opening.

When an open operation is in progress, queue any subsequent operations
and dispatch them after the current open operation is complete.

The old behavior returned a BUSY error and forced the client to retry.
Clients are not involved in authentication anymore, so they should not
have to retry operations nor worry about whether the backend is opened.

This should really be handled directly by EBookBackend, but because of
the weird async semantics between EBookBackend and EDataBook, the queue
needs to live in EDataBook for now.

11 years agoEDataBook/EDataCal: Minor cleanups.
Matthew Barnes [Wed, 23 Jan 2013 17:14:35 +0000 (12:14 -0500)]
EDataBook/EDataCal: Minor cleanups.

11 years agoEBookBackend: Initialize "cache-dir" from constructed().
Matthew Barnes [Tue, 22 Jan 2013 19:43:05 +0000 (14:43 -0500)]
EBookBackend: Initialize "cache-dir" from constructed().

Also tweak ECalBackend's constructed() method to match.

11 years agoUpdated Spanish translation
Daniel Mustieles [Thu, 24 Jan 2013 15:40:07 +0000 (16:40 +0100)]
Updated Spanish translation

11 years agoRevert accidential commit from a761eade
Mathias Hasselmann [Thu, 24 Jan 2013 12:29:27 +0000 (13:29 +0100)]
Revert accidential commit from a761eade

11 years agolibebook: Avoid accidental implicit const-cast
Mathias Hasselmann [Thu, 24 Jan 2013 11:01:14 +0000 (12:01 +0100)]
libebook: Avoid accidental implicit const-cast

Introduced by accident with 663c169e

11 years agoMake ETestServerFixture more reliable.
Tristan Van Berkom [Thu, 24 Jan 2013 10:02:37 +0000 (19:02 +0900)]
Make ETestServerFixture more reliable.

Since e_source_registry_commit_source_sync() does not delay execution
until the source is actually added, use the "source-added" signal instead
to wait for the source to actually be added.

Also, created loops in the fixture test and run more iterations
(should help to catch problems with the fixture early, in case
there are still races).

11 years agoMake use of G_DEFINE_QUARK()
Mathias Hasselmann [Wed, 23 Jan 2013 16:11:45 +0000 (17:11 +0100)]
Make use of G_DEFINE_QUARK()

This reduces boilerplate and ensures that quark definition functions make
proper use of the G_UNLIKELY macro.

https://bugzilla.gnome.org/show_bug.cgi?id=692398

11 years agoUpdated Lithuanian translation
Aurimas Černius [Wed, 23 Jan 2013 21:20:50 +0000 (23:20 +0200)]
Updated Lithuanian translation

11 years agolibebook: Support phone number specific queries
Mathias Hasselmann [Tue, 11 Dec 2012 23:09:24 +0000 (00:09 +0100)]
libebook: Support phone number specific queries

This adds new values to the EBookQueryTest enumeration:

 * E_BOOK_QUERY_EQUALS_PHONE_NUMBER
 * E_BOOK_QUERY_EQUALS_NATIONAL_PHONE_NUMBER
 * E_BOOK_QUERY_EQUALS_SHORT_PHONE_NUMBER

This values get translated to the binary sexp functions "eqphone",
"eqphone_national" and "eqphone_short".

See: https://bugzilla.gnome.org/show_bug.cgi?id=689622

11 years agolibebook: Add phone number utilities
Mathias Hasselmann [Tue, 4 Dec 2012 23:47:07 +0000 (00:47 +0100)]
libebook: Add phone number utilities

This functionality covers parsing, formatting and comparing
phone numbers.

Note that this commit introduces an optional depedency on C++.

See: https://bugzilla.gnome.org/show_bug.cgi?id=689622

11 years agoFixed regression in e_book_get_book_view_async().
Tristan Van Berkom [Wed, 23 Jan 2013 05:34:54 +0000 (14:34 +0900)]
Fixed regression in e_book_get_book_view_async().

The reference counting scheme on the returned view was changed while
porting the EBook apis to use EBookClient apis internally, the result
is that the async callback no longer receives ownership of the passed
EBookView (this commit reverts to the old behaviour).

11 years agotest-ecal-get-objects-for-uid: Fixed assertions in test case.
Tristan Van Berkom [Wed, 23 Jan 2013 08:49:49 +0000 (17:49 +0900)]
test-ecal-get-objects-for-uid: Fixed assertions in test case.

Similar to test-ecal-create-object, this test was comparing a component
built from scratch (with no UID) against a component fetched from
the calendar (with a UID).

Fixed test case to compare the components in the returned list against
a component fetched from the calendar (both with UIDs).

11 years agotest-ecal-create-object: Fixed to assert something that makes sense.
Tristan Van Berkom [Wed, 23 Jan 2013 08:35:07 +0000 (17:35 +0900)]
test-ecal-create-object: Fixed to assert something that makes sense.

The old assertions were broken in that it compares the scratch component
with no UID with the newly created and fetched component.

Now simply check that the newly created component can be fetched and that
it is 'valid'.

11 years agotest-ecal-get-ldap-attribute: Changing test to check the reported error code.
Tristan Van Berkom [Wed, 23 Jan 2013 08:19:06 +0000 (17:19 +0900)]
test-ecal-get-ldap-attribute: Changing test to check the reported error code.

As e_cal_get_ldap_attribute() docs mention that the function has been dropped
completely, this test (instead of removing) now simply tests for the expected
error code.

Additionally, the unused function ecal_test_utils_cal_get_ldap_attribute()
has been removed from in ecal-test-utils.[ch].

11 years agoECal test, test-ecal-get-free-busy: Create a valid user identity and account
Tristan Van Berkom [Wed, 23 Jan 2013 07:52:50 +0000 (16:52 +0900)]
ECal test, test-ecal-get-free-busy: Create a valid user identity and account

Without this, the backend does not report any free-busy information,
with this commit the backend actually reports the free-busy data.

NOTE: This test still fails, because e_cal_get_free_busy() does not report
free busy information from the ECalClient API properly (see FIXME comment
in e_cal_get_free_busy()).

11 years agoECalClient test, test-client-get-free-busy: Create a valid user identity and account
Tristan Van Berkom [Wed, 23 Jan 2013 07:49:19 +0000 (16:49 +0900)]
ECalClient test, test-client-get-free-busy: Create a valid user identity and account

Without this, the backend does not report any free-busy information,
with this commit the backend actually reports the free-busy data and
the test now additionally asserts that the free-busy data was reported.

11 years agoECalClient test test-client-refresh: Only test the refresh APIs if it is supported.
Tristan Van Berkom [Wed, 23 Jan 2013 06:33:01 +0000 (15:33 +0900)]
ECalClient test test-client-refresh: Only test the refresh APIs if it is supported.

Newer versions of the local calendar backend dont support the explicit refresh,
so failing the explicit refresh is not an error.

11 years agoEBookBackendFile: Report the proper error if a contact is not found by UID.
Tristan Van Berkom [Mon, 21 Jan 2013 09:06:15 +0000 (18:06 +0900)]
EBookBackendFile: Report the proper error if a contact is not found by UID.

Conflicts:

addressbook/backends/file/e-book-backend-file.c

11 years agoEBookBackendSqliteDB: Added contact-not-found error type.
Tristan Van Berkom [Mon, 21 Jan 2013 08:50:55 +0000 (17:50 +0900)]
EBookBackendSqliteDB: Added contact-not-found error type.

Report this error if a contact was requested by UID and not found.

11 years agoImproving test-client-remove-contact
Tristan Van Berkom [Mon, 21 Jan 2013 08:35:13 +0000 (17:35 +0900)]
Improving test-client-remove-contact

Check for error type is more clear and safe now.

11 years agoBug #692278 - LDAP backend mutex deadlock on finalize
Milan Crha [Tue, 22 Jan 2013 19:43:30 +0000 (20:43 +0100)]
Bug #692278 - LDAP backend mutex deadlock on finalize

11 years agoCamelIMAPXStore: Configure folder flags on folder creation.
Matthew Barnes [Tue, 22 Jan 2013 16:02:52 +0000 (11:02 -0500)]
CamelIMAPXStore: Configure folder flags on folder creation.

Immediately after CamelFolder creation, check whether the store is
configured to use real Junk/Trash folders and set CamelFolderFlags
appropriately.

This solves the problem of Evolution not displaying junk messages in a
real Junk folder.  This does NOT solve the restart problem, as noted in
the comment.

11 years agoCamelIMAPXStore: Pass a GError to get_folder_offline().
Matthew Barnes [Tue, 22 Jan 2013 15:12:38 +0000 (10:12 -0500)]
CamelIMAPXStore: Pass a GError to get_folder_offline().

This is just silly.  get_folder_offline() already sets the GError on
failure.  There's no reason for imapx_store_get_folder_sync() to not
pass the GError to get_folder_offline() and then set its own generic
error message on failure.

11 years agoCamelIMAPXStore: get_folder_offline() cleanups.
Matthew Barnes [Tue, 22 Jan 2013 15:10:53 +0000 (10:10 -0500)]
CamelIMAPXStore: get_folder_offline() cleanups.

11 years agoFixing test-ebook-get-supported-auth-methods.c
Tristan Van Berkom [Tue, 22 Jan 2013 08:36:28 +0000 (17:36 +0900)]
Fixing test-ebook-get-supported-auth-methods.c

This tests that unsupported code paths actually run as expected
(the problem was that the async callback was called before entering
the mainloop and waiting for a reply or timeout).

11 years agoAdded test case ensuring that new contacts have thier UID preserved.
Tristan Van Berkom [Fri, 18 Jan 2013 06:55:32 +0000 (15:55 +0900)]
Added test case ensuring that new contacts have thier UID preserved.

Asserts both that newly added contacts preserve the assigned UID and
also that 2 contacts with the same UID cannot be added.

11 years agoEBookBackendFile: Don't overwrite UIDs on incomming/new contacts.
Tristan Van Berkom [Fri, 18 Jan 2013 06:53:46 +0000 (15:53 +0900)]
EBookBackendFile: Don't overwrite UIDs on incomming/new contacts.

  o Only assign a generated UID if the new contact does not have any
  o If the UID already exists in the SQLite at creation time, then
    report an E_DATA_BOOK_STATUS_CONTACTID_ALREADY_EXISTS error.

11 years agoEBookBackendSqliteDB: Added e_book_backend_new_contact[s]() APIs
Tristan Van Berkom [Fri, 18 Jan 2013 06:50:04 +0000 (15:50 +0900)]
EBookBackendSqliteDB: Added e_book_backend_new_contact[s]() APIs

The new API allows control on whether or not to overwrite existing contacts
with the same UID.

Deprecated the older e_book_backend_add_contact[s]() apis which include
the unused 'partial_contact' parameter and have no control on whether
or not to overwrite existing contacts.

Additionally this patch exposes the E_BOOK_SDB_ERROR domain and a couple
of error codes to distinguish if an error occurred because of a constraint
or other errors (UID conflicts at contact addition time are constraint
errors).

Conflicts:

addressbook/libedata-book/e-book-backend-sqlitedb.c
addressbook/libedata-book/e-book-backend-sqlitedb.h

11 years agobuild: Fix parallel make issue in GResource change
Colin Walters [Tue, 22 Jan 2013 02:58:40 +0000 (21:58 -0500)]
build: Fix parallel make issue in GResource change

We need deps on the generated files for both header and source.

11 years agoBundle built-in data sources as a GResource.
Matthew Barnes [Mon, 21 Jan 2013 23:45:07 +0000 (18:45 -0500)]
Bundle built-in data sources as a GResource.

This was primarily meant to aid our test suite, whose goal is to run
successfully without requiring evolution-data-server (or its data files)
to be installed.  The tests inadvertently depend on these built-in data
sources being present.

But this is good to do anyway.  Bundling the data sources directly in
the evolution-source-registry binary guarantees they're always present,
which the E-D-S APIs already assume, and avoids the usual problems with
installed data files: I/O errors, user meddling, etc.

11 years agoDeprecate e_source_registry_server_load_all().
Matthew Barnes [Tue, 22 Jan 2013 00:02:34 +0000 (19:02 -0500)]
Deprecate e_source_registry_server_load_all().

It was a mistake to encode this much file location policy directly into
libebackend's API.  Instead, evolution-source-registry.c will implement
its own function that uses e_source_registry_server_load_resource().

11 years agoAdd e_source_registry_server_load_resource().
Matthew Barnes [Mon, 21 Jan 2013 23:45:17 +0000 (18:45 -0500)]
Add e_source_registry_server_load_resource().

Loads data source key files from a GResource by enumerating the children
at the given pathname and calling e_source_registry_server_load_file()
on each child.

11 years agoFix the copyright in test-client-custom-summary.c
Mathias Hasselmann [Mon, 21 Jan 2013 21:24:44 +0000 (22:24 +0100)]
Fix the copyright in test-client-custom-summary.c