Milan Crha [Mon, 25 Feb 2013 09:03:39 +0000 (10:03 +0100)]
Do not update EBackend::online in a separate thread
Let the backend decide whether update its online state in a separate thread
or not. The initial idea was to have this done on a central place, but
it seems to be useless for most of the backends, thus do not do that.
Gheyret Kenji [Mon, 25 Feb 2013 06:56:50 +0000 (15:56 +0900)]
Updated Uyghur translation
Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
Matthew Barnes [Mon, 25 Feb 2013 03:36:47 +0000 (22:36 -0500)]
ECalClient: Remove global "cal_factory" variable.
Have cal_client_init_in_dbus_thread() create its own factory proxy,
obtain an object path for the desired backend, and then immediately
destroy the factory proxy object.
This eliminates the global EDBusCalendarFactory and associated
variables and macros and reduces the potential for reference leaks.
Matthew Barnes [Mon, 25 Feb 2013 03:18:48 +0000 (22:18 -0500)]
EBookClient: Remove global "book_factory" variable.
Have book_client_init_in_dbus_thread() create its own factory proxy,
obtain an object path for the desired backend, and then immediately
destroy the factory proxy object.
This eliminates the global EDBusAddressBookFactory and associated
variables and macros and reduces the potential for reference leaks.
Matthew Barnes [Mon, 25 Feb 2013 00:07:24 +0000 (19:07 -0500)]
EBookBackendWebdav: Make error msgs with HTTP status more consistent.
Matthew Barnes [Mon, 25 Feb 2013 00:03:28 +0000 (19:03 -0500)]
Fix comments in e_contact_map_google_with_evo_group().
Matthew Barnes [Sun, 24 Feb 2013 23:59:58 +0000 (18:59 -0500)]
Fix typo in e_phone_number_error_to_string().
Matthew Barnes [Sun, 24 Feb 2013 23:56:38 +0000 (18:56 -0500)]
Fix translator comment in camel_session_build_password_prompt().
Yuri Myasoedov [Sun, 24 Feb 2013 20:18:17 +0000 (00:18 +0400)]
Updated Russian translation
Piotr Drąg [Sat, 23 Feb 2013 21:15:07 +0000 (22:15 +0100)]
Updated POTFILES.in
Matthew Barnes [Sat, 23 Feb 2013 15:16:56 +0000 (10:16 -0500)]
EClient: Add a read-only "main-context" property.
This is the GMainContext on which to attach client event sources.
New functions:
e_client_ref_main_context()
Matthew Barnes [Sat, 23 Feb 2013 15:08:25 +0000 (10:08 -0500)]
EClient cleanups.
Matthew Barnes [Sat, 23 Feb 2013 13:45:40 +0000 (08:45 -0500)]
Add e_source_registry_dup_unique_display_name().
Compares a source's display name against other sources having an
extension with the given extension name, or else against all other
sources in the registry if no extension name was given.
If the source's display name is unique among these other sources, the
function will return the source's display name verbatim. Otherwise the
function will construct a string that includes the source's own display
name as well as those of its ancestors.
The functions's return value is intended to be used in messages shown to
the user to help clarify which source is being referred to. It assumes
the source's display name is at least unique among its siblings.
Colin Walters [Sat, 23 Feb 2013 12:15:49 +0000 (07:15 -0500)]
ecalclient: Fix uninitialized list
This would likely crash.
Matthew Barnes [Sat, 23 Feb 2013 04:58:36 +0000 (23:58 -0500)]
evolution-user-prompter: Add a --keep-running option.
This thing keeps quitting on me when run from the command-line.
Matthew Barnes [Fri, 22 Feb 2013 22:59:34 +0000 (17:59 -0500)]
CamelSMIMEContext: Support IANA registered hash function names.
Use and recognize standard-compliant hash function names in the
hash_to_id() and id_to_hash() methods.
Matthew Barnes [Fri, 22 Feb 2013 22:47:01 +0000 (17:47 -0500)]
CamelSMIMEContext cleanups.
Matthew Barnes [Fri, 22 Feb 2013 18:11:15 +0000 (13:11 -0500)]
Fix build break from libebook-contacts.
None of the backends were linking to libebook-contacts-1.2.la.
Matthew Barnes [Fri, 22 Feb 2013 17:58:03 +0000 (12:58 -0500)]
evo_phonenumber.m4: Don't stomp on LDFLAGS.
Matthew Barnes [Fri, 22 Feb 2013 16:54:58 +0000 (11:54 -0500)]
Deprecate e_client_error_create().
Just use the GError API directly.
Matthew Barnes [Fri, 22 Feb 2013 16:41:26 +0000 (11:41 -0500)]
Deprecate e_client_util_unwrap_dbus_error().
No longer used.
Matthew Barnes [Fri, 22 Feb 2013 16:31:46 +0000 (11:31 -0500)]
EClient: Deprecate unwrap_dbus_error() method.
The generated D-Bus proxy classes return errors according to the usual
GLib conventions, and EDataBook and EDataCal convert server-side error
codes to client-side error codes before completing method invocations,
so we don't need this method anymore.
Added a default implementation to EClient which is just a pass-through.
Matthew Barnes [Fri, 22 Feb 2013 16:13:00 +0000 (11:13 -0500)]
EClient: Deprecate get_dbus_proxy() method.
This method is not used anymore. Leave the implementations in place,
but tag the method as deprecated in the EClientClass struct so it can
be purged at some future date.
Matthew Barnes [Fri, 22 Feb 2013 15:09:31 +0000 (10:09 -0500)]
EBackend: Update online state from the correct main loop context.
Use a low-priority idle callback on the backend's main loop context to
reduce the number of times we cancel g_network_monitor_can_reach_async().
Matthew Barnes [Fri, 22 Feb 2013 14:33:23 +0000 (09:33 -0500)]
ESourceMailComposition: Escape brackets in documentation.
Matthew Barnes [Fri, 22 Feb 2013 14:29:43 +0000 (09:29 -0500)]
Add libebook-contacts-overrides.txt to source control.
Matthew Barnes [Fri, 22 Feb 2013 14:17:24 +0000 (09:17 -0500)]
Add camel_session_ref_main_context().
Replaces camel_session_get_main_context().
Matthew Barnes [Fri, 22 Feb 2013 14:10:37 +0000 (09:10 -0500)]
ESource: Improve "main-context" property description.
Finally found a wording for the property that I'm happy with.
Matthew Barnes [Fri, 22 Feb 2013 14:08:23 +0000 (09:08 -0500)]
CamelSession: Improve "main-context" property description.
Finally found a wording for the property that I'm happy with.
Matthew Barnes [Fri, 22 Feb 2013 14:44:42 +0000 (09:44 -0500)]
cal_client_add_cached_timezone: Wrong GDestroyNotify callback.
Matthew Barnes [Fri, 22 Feb 2013 14:45:35 +0000 (09:45 -0500)]
ECalBackend: Follow up on a timezone-related FIXME comment.
Emit the "timezone-added" signal from an idle callback on ECalBackend's
GMainContext, instead of from whichever thread the timezone was added.
This makes life easier for any handlers of that signal.
Matthew Barnes [Fri, 22 Feb 2013 14:05:03 +0000 (09:05 -0500)]
EBackend: Add a read-only "main-context" property.
This is the GMainContext on which to attach backend event sources.
New functions:
e_backend_ref_main_context()
Tristan Van Berkom [Fri, 22 Feb 2013 13:44:15 +0000 (22:44 +0900)]
EBookQuery/EPhoneNumber: Enhanced documentation
EBookQuery documentation simplified to reference documentation
from EPhoneNumber docs specifically. EPhoneNumber documentation
enhanced to be more descriptive in terms of the match type strengths
possible.
Tristan Van Berkom [Fri, 22 Feb 2013 13:19:42 +0000 (22:19 +0900)]
Documentation Makefiles: Added MKDB_OPTIONS
Added the MKDB_OPTIONS to all gtk-doc makefiles, this makes
the <note><para></para></note> semantics in gtk-doc statements
work properly (along with probably a few other features).
Tristan Van Berkom [Fri, 22 Feb 2013 12:55:54 +0000 (21:55 +0900)]
test-client-custom-summary.c: Adding more tests regarding phone numbers.
The nature of phone number matching is complex, some additional
tests are required to ensure that this works to spec (perhaps more
tests will be added here as well).
Matthew Barnes [Fri, 22 Feb 2013 13:03:06 +0000 (08:03 -0500)]
e_cal_client_modify_objects_sync: Fix infinite loop.
Matthew Barnes [Fri, 22 Feb 2013 11:55:59 +0000 (06:55 -0500)]
e_source_registry_server_load_directory: Monitor failure is non-fatal.
Directory monitoring is a nice-to-have feature, but is not supported in
some contexts. If we fail to create a GFileMonitor, leave a breadcrumb
on the console to indicate something whent wrong, but don't return an
error status. That would cause the whole registry process to terminate.
Tristan Van Berkom [Fri, 22 Feb 2013 09:33:07 +0000 (18:33 +0900)]
EBookBackendFile: Report the correct error from remove_contacts()
If the EBookBackenSqliteDB reports CONTACT_NOT_FOUND, then use
E_DATA_BOOK_STATUS_CONTACT_NOT_FOUND, this causes test-client-remove-contact
to pass again.
See bug: https://bugzilla.gnome.org/show_bug.cgi?id=694188
Tristan Van Berkom [Fri, 22 Feb 2013 09:31:59 +0000 (18:31 +0900)]
test-client-remove-contact.c: Enhanced test case
Check that removing a removed contact reports the correct error code
See bug: https://bugzilla.gnome.org/show_bug.cgi?id=694188
Matthew Barnes [Thu, 21 Feb 2013 19:35:21 +0000 (14:35 -0500)]
CamelSmtpTransport: Override new CamelNetworkService properties.
Matthew Barnes [Thu, 21 Feb 2013 19:28:22 +0000 (14:28 -0500)]
CamelPOP3Store: Override new CamelNetworkService properties.
Matthew Barnes [Thu, 21 Feb 2013 19:23:16 +0000 (14:23 -0500)]
CamelNNTPStore: Override new CamelNetworkService properties.
Matthew Barnes [Thu, 21 Feb 2013 19:14:30 +0000 (14:14 -0500)]
CamelIMAPXStore: Override new CamelNetworkService properties.
Matthew Barnes [Thu, 21 Feb 2013 17:44:18 +0000 (12:44 -0500)]
CamelNetworkService: Add a read-only "host-reachable" property.
This will be updated automatically as network conditions change.
New functions:
camel_network_service_get_host_reachable()
Matthew Barnes [Thu, 21 Feb 2013 17:26:09 +0000 (12:26 -0500)]
CamelNetworkService: Add a "connectable" property (GSocketConnectable).
This is the socket endpoint for the network service to which the
CamelNetworkService is a client.
This also adds a new_connectable() method to the interface, which by
default creates a new GNetworkAddress from the CamelNetworkSettings.
New functions:
camel_network_service_ref_connectable()
camel_network_service_set_connectable()
Matthew Barnes [Thu, 21 Feb 2013 17:08:30 +0000 (12:08 -0500)]
Give CamelNetworkService a private structure.
CamelNetworkService will do its own networking monitoring.
The interface is initialized during CamelService construction.
Milan Crha [Thu, 21 Feb 2013 15:56:22 +0000 (16:56 +0100)]
Do not compile code which might be unnecessary with GLib 2.35.9+
This is the only relevant part of the code which should be "removed"
from the previous commit due to changes in GNetworkManager's bug:
https://bugzilla.gnome.org/show_bug.cgi?id=694181
Once eds will depends on such GLib the conditioned code can be
completely removed.
Milan Crha [Thu, 21 Feb 2013 15:41:06 +0000 (16:41 +0100)]
Revert "Revert "Make network connection change listener actually working""
This reverts commit
51f5b1201bb713243b0cb2e160c18ee17d3a0baf.
It's inappropriate to revert whole commit, the relevant part is much
much much smaller.
Matthew Barnes [Thu, 21 Feb 2013 15:01:36 +0000 (10:01 -0500)]
Revert "Make network connection change listener actually working"
This reverts commit
b64b51e0e969fbf355d3a2bc1c69f4123c33078f.
These changes are unnecessary given recent fixes in GNetworkMonitor.
See: https://bugzilla.gnome.org/show_bug.cgi?id=694181
Milan Crha [Thu, 21 Feb 2013 14:22:08 +0000 (15:22 +0100)]
Make network connection change listener actually working
With this it's properly recognized when network connection changes,
like when user connects to VPN, or disconnects from it, and the backend's
online state is properly updated (if is provides connection address).
Tristan Van Berkom [Thu, 21 Feb 2013 13:12:17 +0000 (22:12 +0900)]
test-client-view-operations.c: For now disable the regular access test
This test was written to protect against deadlocks in EBookBackendSqliteDB
with concurrent read access. Currently two in a row fails when fetching
the newly added contacts in the test book, still dont know why but it's
orthogonal to the reason for this test.
Milan Crha [Thu, 21 Feb 2013 11:53:08 +0000 (12:53 +0100)]
Bug #694223 - The "message-location" search never matches on IMAP+
Tristan Van Berkom [Thu, 21 Feb 2013 11:14:49 +0000 (20:14 +0900)]
EDataBook: Fix e_data_book_new_direct()
Since recent backends in master open thier persistance at initable_init()
time, it became necessary to splitup g_initable_new() into g_object_new()
and g_initable_init(), calling e_book_backend_configure_direct() in between.
Note: this fixes Direct Read Access where the XDG directories might not
be the same in the server context as in the client context.
Patrick Ohly [Thu, 21 Feb 2013 09:41:50 +0000 (10:41 +0100)]
Bug #694152 - Compile errors in C++ due to G_BEGIN/END_DECLS
Milan Crha [Thu, 21 Feb 2013 09:40:12 +0000 (10:40 +0100)]
Fix a memory leak in EBookQuery with field_test.locale
Tristan Van Berkom [Thu, 21 Feb 2013 09:16:48 +0000 (18:16 +0900)]
test-client-custom-summary.c: Fixup test case to also try Default summary
This patch makes the whole test battery run with a default summary
as well, ensuring the expected results work properly regardless
of whether the summary information is stored in SQLite or if it
falls back to full vcard parsing.
Tristan Van Berkom [Thu, 21 Feb 2013 09:14:34 +0000 (18:14 +0900)]
EBookBackendSexp: Restore suffix search functionality
All suffix searches using EBookBackendSexp had been broken as
of commit
5236e0b1f82ec1ef9d2e87e2f8e493471b8cd57e. This patch
restores suffix searches to work properly again.
Matthew Barnes [Wed, 20 Feb 2013 16:20:10 +0000 (11:20 -0500)]
EBackend: Use e_source_authentication_ref_connectable().
Initialize the GSocketConnectable directly from ESourceAuthentication's
GSocketConnectable, rather than building a new instance from its "host"
and "port" properties.
Matthew Barnes [Wed, 20 Feb 2013 15:56:40 +0000 (10:56 -0500)]
ESourceAuthentication: Add a read-only "connectable" property.
This is an internally cached GSocketConnectable instance constructed
from ESourceAuthentication's "host" and "port" properties.
New functions:
e_source_authentication_ref_connectable()
Milan Crha [Wed, 20 Feb 2013 13:22:23 +0000 (14:22 +0100)]
Local Delivery not updated on start and missing Receiving Options page
This was reported at Red Hat's bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=910252
To have this fully working, users should edit the account and save
the changes (even when not done any) by clicking the OK button
in the account editor, thus the source will receive its extension
and the next start the account will be recognized and auto-updated.
Milan Crha [Wed, 20 Feb 2013 12:48:54 +0000 (13:48 +0100)]
Do not use SSL_V2_COMPATIBLE_HELLO by default
Zarafa server with disabled SSL v2 rejects connection when
SSL v2 compatible hello is sent, thus disabled this by default.
After all, SSL v3 should be used in general these days anyway.
Use environment variable CAMEL_SSL_V2_HELLO=1 in case your server
requires the old behavior.
Tristan Van Berkom [Wed, 20 Feb 2013 11:45:24 +0000 (20:45 +0900)]
Extending test-client-custom-summary.c
Added test to ensure that phone numbers are not accidentally normalized,
and that we dont get a result for ENDS_WITH "8899" if a phone number
ending with "88 99" exists in the addressbook.
Tristan Van Berkom [Tue, 19 Feb 2013 13:55:16 +0000 (22:55 +0900)]
Ported various EBookClient tests to additionally test Direct Read Access variants
This patch basically adds additional invocations of the same test code
in direct read access mode. Only for tests concerned with read access
to the addressbook.
Note that the test-client-uid-only-view and test-client-revision-view
tests are not ported, they are not expected to pass in Direct Read Access
mode (since the EBookClientView in Direct Read Access mode fetches contact
data directly from the backend, any contact field filtering would be a
useless overhead).
Tristan Van Berkom [Tue, 19 Feb 2013 13:54:45 +0000 (22:54 +0900)]
e-test-server-utils: Add support for testing Direct Read Access books.
Matthew Barnes [Tue, 19 Feb 2013 14:22:46 +0000 (09:22 -0500)]
source_remove_sync: Fail gracefully when given a scratch source.
Apparently e_dbus_object_get_source_removable() does not check its
argument for NULL, and scratch sources have no internal EDBusObject.
Matthew Barnes [Tue, 19 Feb 2013 14:18:47 +0000 (09:18 -0500)]
source_write_sync: Fail gracefully when given a scratch source.
Apparently e_dbus_object_get_source_writable() does not check its
argument for NULL, and scratch sources have no internal EDBusObject.
Мирослав Николић [Tue, 19 Feb 2013 10:58:22 +0000 (11:58 +0100)]
Updated Serbian translation
Tristan Van Berkom [Tue, 19 Feb 2013 10:05:55 +0000 (19:05 +0900)]
Fixing typo in previous commit fixing G_BEGIN/END_DECLS
Tristan Van Berkom [Tue, 19 Feb 2013 10:03:35 +0000 (19:03 +0900)]
Fixing imbalanced G_BEGIN_DECLS/G_END_DECLS in EDS headers.
modified: addressbook/libebook/e-book-types.h
modified: camel/camel-imapx-search.h
Milan Crha [Mon, 18 Feb 2013 14:27:27 +0000 (15:27 +0100)]
Bug #693101 - IMAPx can vanish and redownload folder summary
Tristan Van Berkom [Mon, 18 Feb 2013 12:05:22 +0000 (21:05 +0900)]
Fixing pkg-config files for libebook & libedata-book
This part was missed while the libebook / libebook-contacts library
splitup was done manually.
Tristan Van Berkom [Mon, 18 Feb 2013 11:07:51 +0000 (20:07 +0900)]
Cleanup: Remove double definition of E_BOOK_CLIENT_ERROR
The EBookClientError definition has been moved to libebook-contacts,
this is just removing a stale #define E_BOOK_CLIENT_ERROR which
was remaining in e-book-client.h
Tristan Van Berkom [Mon, 18 Feb 2013 10:05:56 +0000 (19:05 +0900)]
Added documentation for new Direct Read Access related apis.
Also fixed up gtk-doc build for libedata-book to add EDataBookDirect
to the sections, types and libedata-book-docs.sgml files.
Tristan Van Berkom [Mon, 18 Feb 2013 07:55:37 +0000 (16:55 +0900)]
Migrating documentation into new libebook-contacts book.
This documentation splitup was missed in the recent libebook / libebook-contacts
library splitup.
Matthew Barnes [Mon, 18 Feb 2013 02:07:03 +0000 (21:07 -0500)]
EBackend: Utilize g_network_monitor_can_reach_async().
If the backend has a GSocketConnectable, determine the "online" state
using g_network_monitor_can_reach_async().
The "online" state is automatically updated on instance initialization,
when the GSocketConnectable is replaced, and when GNetworkMonitor emits
a "network-changed" signal.
Matthew Barnes [Mon, 18 Feb 2013 01:14:25 +0000 (20:14 -0500)]
EBackend: Keep a reference on GNetworkMonitor.
Keep a strong reference on the default GNetworkMonitor, and connect to
its "network-changed" signal. Our signal handler does nothing for the
moment, but shortly it will update the "online" state.
Matthew Barnes [Mon, 18 Feb 2013 00:30:29 +0000 (19:30 -0500)]
EBackend: Add a "connectable" property (GSocketConnectable).
This is the socket endpoint for the network service to which the
EBackend is a client. This can be NULL if the EBackend does not
use network sockets.
The initial value of the "connectable" property is derived from the
ESourceAuthentication extension of the EBackend's "source" property,
if the extension is present.
Matthew Barnes [Sun, 17 Feb 2013 23:18:33 +0000 (18:18 -0500)]
EBackend: Use g_clear_object() in dispose().
Matthew Barnes [Sun, 17 Feb 2013 20:45:56 +0000 (15:45 -0500)]
Post-release version bump.
Matthew Barnes [Sun, 17 Feb 2013 20:43:00 +0000 (15:43 -0500)]
Fix distcheck error.
Matthew Barnes [Sun, 17 Feb 2013 20:13:06 +0000 (15:13 -0500)]
NEWS update for 3.7.90 release.
Matthew Barnes [Sun, 17 Feb 2013 14:52:18 +0000 (09:52 -0500)]
data_cal_handle_remove_objects_cb: Fix GVariant format string.
Matthew Barnes [Sun, 17 Feb 2013 14:36:33 +0000 (09:36 -0500)]
e_cal_client_remove_objects_sync: Fix an infinite loop.
Matthew Barnes [Sun, 17 Feb 2013 13:33:48 +0000 (08:33 -0500)]
ECalObjModType is a flags type, not an enum type.
Transmit flags over D-Bus as a string of colon-separated nicknames.
Piotr Drąg [Sun, 17 Feb 2013 14:35:49 +0000 (15:35 +0100)]
Updated Polish translation
Tristan Van Berkom [Fri, 15 Feb 2013 13:44:34 +0000 (22:44 +0900)]
Add optimized indexing capabilities for phone number values.
Creating indexes with normalized phone numbers permits fast phone number
lookup even if the stored vCards or the queried phone numbers are freely
formatted or incomplete.
The numbers are formatted according to E.164 when building the index.
Incomplete numbers are prefixed with a country-code matching the current
locale settings while processing query results.
Updated Mathias Hasselmann's patch on bug 689622 to apply to current master.
Tristan Van Berkom [Fri, 15 Feb 2013 11:56:41 +0000 (20:56 +0900)]
Store E.164 phone number values automatically in the vCard
The E.164 normalized phone number is of interest for handset related
applications. With this change a X-EVOLUTION-E164 attribute is added
to each TEL attribute if the contact summary contains a E.164 formatted
variant of the phone number. This shall avoid overhead and inconsistency
that would occur if clients would use their own mechanism to compute
that already stored information.
Updated Mathias Hasselmann's patch on bug 689622 to apply to current master.
Matthew Barnes [Sat, 16 Feb 2013 22:42:42 +0000 (17:42 -0500)]
e_extensible_load_extensions: Allow for retries.
If e_extensible_load_extensions() does not find any extensions, remove
the GPtrArray from the extensible object. It may be the extension types
have not been registered yet. Subsequent e_extensible_load_extensions()
calls on the same object should rescan until extensions are found.
Matthew Barnes [Sat, 16 Feb 2013 14:22:14 +0000 (09:22 -0500)]
ECalClient: Add a "default-timezone" pointer property.
This just uses the existing e_cal_client_get_default_timezone() and
e_cal_client_set_default_timezone() functions, but the property can
be a useful target for bindings.
Piotr Drąg [Fri, 15 Feb 2013 12:43:42 +0000 (13:43 +0100)]
Updated POTFILES.in
Patrick Ohly [Thu, 14 Feb 2013 16:33:56 +0000 (17:33 +0100)]
ebook: make EContactGeo usable in Vala
"new E.ContactGeo()" in Vala fails because the struct has no
constructor. Introducing e_contact_geo_new() fixes that problem.
This extends the API instead of changing it. It is still valid
to allocated EContactGeo instances via some other means.
Patrick Ohly [Thu, 14 Feb 2013 17:01:19 +0000 (18:01 +0100)]
ebook: make EContactCert usable in Vala
"new E.ContactCert()" in Vala fails because the struct has no
constructor. Introducing e_contact_cert_new() fixes that problem.
This extends the API instead of changing it. It is still valid
to allocated EContactCert instances via some other means.
Patrick Ohly [Thu, 14 Feb 2013 15:04:14 +0000 (16:04 +0100)]
ebook: avoid repeatedly creating GSettings in e_book_client_is_self
When receiving the complete address book, a client has to use
e_book_client_is_self() on every EContact to find the one which is the
"self" contact. Calling e_book_client_get_self() instead does not
work, because that would create the self contact if none exists (not
desired for an app which just reads!).
The problem with e_book_client_is_self() is that it creates and
destroys a GSettings instance for the self UID each time the method is
called. In addition to reading the value over and over again, this
also triggers two D-Bus messages (AddMatch and RemoveMatch) - clearly
bad for performance.
To solve this problem, this patch caches the GSettings instance in a
static variable. It is protected by a mutex, to keep the function
thread-safe. The downside is that the instance is never going to be
freed.
It would be better to attach the GSettings instance to the EBookClient
instance, but because e_book_client_is_self() doesn't get a pointer to
that, this is not possible without an API change.
Tristan Van Berkom [Fri, 15 Feb 2013 09:34:05 +0000 (18:34 +0900)]
Added concurrent view test: test-client-view-operations.c
This tests concurrent access to EBookClientView, 20 threads each
race to receive notifications from the same addressbook and the
test asserts that all 5 contacts in the test addressbook are found.
This is particularly interesting with DEBUG_DIRECT set (Direct Read Access),
as it ensures that concurrent direct reads of the addressbook do not
cause any lockups.
Tristan Van Berkom [Fri, 15 Feb 2013 09:23:25 +0000 (18:23 +0900)]
e-test-server-utils: Added DEBUG_DIRECT env var
This is a temporary workaround to test Direct Read Access,
a later patch will ensure all tests check both Direct/Normal read access
modes.
Tristan Van Berkom [Fri, 15 Feb 2013 09:26:14 +0000 (18:26 +0900)]
EBookBackendFile: Add support for Direct Read Access.
This patch simply implements the added backend vfuncs to advertize
and configure itself in direct read access mode.
Tristan Van Berkom [Fri, 15 Feb 2013 09:15:18 +0000 (18:15 +0900)]
Added Direct Read Access support to EBookClient
Currently the only added api is e_book_client_connect_direct_sync().
If the backend associated to the given ESource does not support direct
read access, or the backend fails to open for any reason, then the
client falls back to regular read access.
EBookClientViews created from an EBookClient that is in direct read
access mode differ in functionality, they only receive UID notifications
over D-Bus and fetch the contact data directly.
Tristan Van Berkom [Fri, 15 Feb 2013 09:02:59 +0000 (18:02 +0900)]
EDataBook / EDataBookView: Added Direct Read Access APIs / support
EDataBook:
Now can be created by the client and offers read only APIs for
reading back contact data directly from a client side instantiated
backend
EDataBookView:
Now use a special "x-evolution-uids-only" fields of interest in order
to reduce D-Bus traffic, this makes it possible for EBookClientView
to fetch contact data directly upon receival of notifications.
Tristan Van Berkom [Fri, 15 Feb 2013 08:54:24 +0000 (17:54 +0900)]
EBookBackend: Added apis for backends to support Direct Read Access
e_book_backend_get_direct_book:
A backend can return an EDataBookDirect from here to indicate
that it supports direct read access, the properties of the EDataBookDirect
are used by the client to access the book directly
e_book_backend_configure_direct:
A backend opened in direct read access mode can be configured with
the string that it's server side counterpart provided, this string
belongs to the backend; for the local file backend it is used as
a path to ensure the same SQLite DB is opened by the client as the
one running in the server.
Tristan Van Berkom [Fri, 15 Feb 2013 08:49:13 +0000 (17:49 +0900)]
Added EDataBookDirect & generated D-Bus counterpart.
The EDataBookDirect is the server side wrapper allowing backends
to report information about thier direct read access support.