summaryrefslogtreecommitdiff
path: root/libebackend
Commit message (Collapse)AuthorAgeFilesLines
* Bug #680961 - Broken dispatching of EAuthenticationSessionMilan Crha2013-11-253-0/+39
| | | | | | | | | | | | | There was basically no error reporting from the server to the client when any such occurred during authentication on the server side, thus the client was left waiting for a response which never happened. Even the 'dismiss' signal has a comment that it can be used for such cases, it's not the right thing to do, because it hides the errors from a user, thus he/she doesn't know that something went wrong. For that a new ServerError signal was added and the error is properly propagated to the client. Note the GOA errors don't strip the GDBus error from the message, which looks odd in the UI, thus I added a workaround for that too.
* ESourceRegistry: Ignore hidden files from .source folder monitoringMilan Crha2013-11-222-8/+6
| | | | | | | | | | | There used to be a critical warning on the source registry console: ** Failed to load key file at 'file:///home/user/.config/evolution/sources/.goutputstream-1P9V6W': File must have a '.source' extension There is nothing the source registry can do with these files (because they are created by GIO), but ignore them during the folder monitoring, instead of spreading useless runtime warning.
* registry-server: Demote g_print() to g_debug()Colin Walters2013-11-211-1/+1
| | | | Avoid doing this sort of thing during normal startup.
* libebackend: Use g_debug() for normal operation message instead of g_print()Colin Walters2013-11-211-1/+1
| | | | | | I'm trying to reduce log spew from simply booting. Now that dbus connects bus-activated services to the journal, this g_print() is now visible. Demote it to g_debug().
* Makefile.am cleanups.Matthew Barnes2013-11-171-83/+93
| | | | | - Remove trailing tabs. - Add terminators to multi-line lists.
* ECollectionBackend: Implement "proxy-resolver" property.Matthew Barnes2013-11-131-0/+7
| | | | Defined the property but forgot to implement the "get" method.
* Fix/mute issues found by Coverity scanMilan Crha2013-11-131-0/+1
| | | | | | | | | | | | This makes the code free of Coverity scan issues, except of the doc/ folder. It is sometimes quite pedantic and expects/suggests some coding habits, thus certain changes may look weird, but for a good thing, I hope. The code is also tagged with Coverity scan suppressions, to keep the code as is and hide the warning too. Also note that Coverity treats g_return_if_fail(), g_assert() and similar macros as unreliable, and it's true these can be disabled during the compile time, thus it brings in other set of 'weird' changes.
* Bug 710808 - Name all the timeouts added with g_timeout_add()Bastien Nocera2013-10-293-16/+28
|
* ECollectionBackend: Add a read-only "proxy-resolver" property.Matthew Barnes2013-10-252-2/+143
| | | | | | | | | Tracks a GProxyResolver for the backend, which is actually another ESource with an ESourceProxy extension (if applicable to the backend). New functions: e_collection_backend_ref_proxy_resolver().
* Miscellaneous cleanups.Matthew Barnes2013-10-202-6/+16
|
* Remove other GLib 2.35.x checks.Matthew Barnes2013-09-271-19/+0
|
* Bug #703181 - Book/calendar backends can authenticate without passwordMilan Crha2013-08-162-6/+40
|
* Add ESoupAuthBearer.Matthew Barnes2013-07-094-0/+280
| | | | | | | | | | SoupAuth subclass for use with OAuth 2.0 HTTP authentication. See http://tools.ietf.org/html/rfc6750 EBackends should use e_source_get_oauth2_access_token() to obtain the access token and token expiry for an ESource, then pass them to e_soup_auth_bearer_set_access_token().
* GError instance use-after-free in collection_backend_load_resources()Milan Crha2013-07-011-1/+1
| | | | | | | | | | The function uses a shared GError instance in a cycle, and on error freed the instance with g_error_free() which left the pointer set, only populated with freed memory, thus the next round, when it eventually loaded correct source, the function thought it ended with an error and a GSlice allocator aborted on the g_error_free() call. Resetting the error variable to NULL after free (by using g_clear_error()) fixes the crash.
* ESource: Move "remember-password" to Authentication extension.Matthew Barnes2013-04-171-2/+19
| | | | | It's a more suitable place since the option is only relevant to EAuthenticationSession.
* Bug #691939 - Password prompt has "save password" always checkedMilan Crha2013-04-171-1/+10
|
* Automatically strip D-Bus info from error messages.Matthew Barnes2013-04-151-10/+21
| | | | | | | | | | | | | | | | | | | | I mistakenly assumed code generated by the gdbus-codegen tool would automatically strip off the D-Bus error name from error messages, but that apparently is not possible according to my discussion with David Zeuthen in [1], since it would break g_dbus_error_is_remote_error(). Distinguishing between local and remote errors strikes me as a rarely needed corner case, and is certainly not worth the extra step imposed on applications when dealing with something as fundamental as GError. This commit prevents the D-Bus error name from leaking through in any Evolution-Data-Server client-facing library functions. Also rename any stack-allocated GError pointers to 'local_error' to help distinguish them from GError "out" parameters which are always named 'error'. This is just to improve variable name consistency. [1] https://bugzilla.gnome.org/697819
* build: Fix srcdir != builddir from gitColin Walters2013-04-121-4/+4
| | | | | | | We can't do (cd $(srcdir); ...) and inside reference $(top_srcdir) because that variable uses a *relative* path. Thus we copy the approach from gnome-shell of explicitly using addprefix to append the source directory.
* Bug #681837 - Make enum type registration thread safeMilan Crha2013-04-123-72/+10
|
* Add e_weak_ref_new() and e_weak_ref_free().Matthew Barnes2013-03-171-17/+2
| | | | This has come up enough times now that it's worth adding public API.
* libedataserver: Use g_cclosure_marshal_generic() for all signals.Matthew Barnes2013-03-176-26/+11
| | | | | | | | | g_signal_new() defaults to the generic marshaller when NULL is given for the 'c_marshaller' parameter. The generic marshaller uses libffi to figure out the argument types for itself. Also remove e-marshal.list and e-gdbus-marshallers.list, as they are no longer needed.
* Coding style and whitespace cleanup.Matthew Barnes2013-03-0210-57/+119
|
* ECollectionBackend: Synchronize display-names on mail sources.Matthew Barnes2013-02-281-0/+18
| | | | | | | | | Keep display names of mail-related child sources synchronized with the collection source's display name. This is needed to support GOA's new "imap_smtp" provider, but all known collection backend implementations are already doing it on their own anyway. Seems like a reasonable default behavior given our current use cases.
* Added EDS_TESTING env var to silence messagesTristan Van Berkom2013-02-281-0/+17
| | | | | | This commit avoids initializing GTK+ in a 'make check' environment, as well as avoiding printing of any non-critical messages from the services running in a 'make check' environment.
* Make the ESourceRegistryServer modules relocatable like addressbook & calendarTristan Van Berkom2013-02-252-1/+16
| | | | | | This simply adds an environment variable allowing us to load registry modules from a relocated location in the case we run 'make check' without installing (also ensuring that we test the not-yet-installed environment properly).
* Do not update EBackend::online in a separate threadMilan Crha2013-02-251-29/+2
| | | | | | 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.
* EBackend: Update online state from the correct main loop context.Matthew Barnes2013-02-221-33/+47
| | | | | 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().
* EBackend: Add a read-only "main-context" property.Matthew Barnes2013-02-222-0/+49
| | | | | | | | This is the GMainContext on which to attach backend event sources. New functions: e_backend_ref_main_context()
* e_source_registry_server_load_directory: Monitor failure is non-fatal.Matthew Barnes2013-02-221-10/+28
| | | | | | | 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.
* Do not compile code which might be unnecessary with GLib 2.35.9+Milan Crha2013-02-211-5/+10
| | | | | | | | | 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.
* Revert "Revert "Make network connection change listener actually working""Milan Crha2013-02-211-19/+97
| | | | | | | This reverts commit 51f5b1201bb713243b0cb2e160c18ee17d3a0baf. It's inappropriate to revert whole commit, the relevant part is much much much smaller.
* Revert "Make network connection change listener actually working"Matthew Barnes2013-02-211-97/+19
| | | | | | | | This reverts commit b64b51e0e969fbf355d3a2bc1c69f4123c33078f. These changes are unnecessary given recent fixes in GNetworkMonitor. See: https://bugzilla.gnome.org/show_bug.cgi?id=694181
* Make network connection change listener actually workingMilan Crha2013-02-211-19/+97
| | | | | | 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).
* EBackend: Use e_source_authentication_ref_connectable().Matthew Barnes2013-02-201-17/+4
| | | | | | Initialize the GSocketConnectable directly from ESourceAuthentication's GSocketConnectable, rather than building a new instance from its "host" and "port" properties.
* EBackend: Utilize g_network_monitor_can_reach_async().Matthew Barnes2013-02-171-5/+110
| | | | | | | | | 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.
* EBackend: Keep a reference on GNetworkMonitor.Matthew Barnes2013-02-171-10/+32
| | | | | | 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.
* EBackend: Add a "connectable" property (GSocketConnectable).Matthew Barnes2013-02-172-0/+152
| | | | | | | | | | 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.
* EBackend: Use g_clear_object() in dispose().Matthew Barnes2013-02-171-9/+2
|
* e_extensible_load_extensions: Allow for retries.Matthew Barnes2013-02-161-2/+16
| | | | | | | 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.
* EBackend: Avoid breaking libebackend ABI.Matthew Barnes2013-02-131-1/+1
| | | | This is what the reserved slots in the class struct are for.
* Introduce e_backend_is_destination_reachable()Milan Crha2013-02-132-0/+117
| | | | | | | | This new function, together with implementation of e_backend_get_destination_address() on the backend side, can be used to check whether the backend's destination is currently reachable. Default implementation reports backend as always reachable, aka local.
* Fix few memory leaks in evolution-source-registryMilan Crha2013-02-122-0/+2
|
* Add e_data_factory_ref_initable_backend().Matthew Barnes2013-02-042-1/+65
| | | | | | Similar to e_data_factory_ref_backend(), but allows for backends that implement the GInitable interface so they can fail gracefully if they are unable to initialize critical resources, such as a cache database.
* Oopsie...Matthew Barnes2013-02-011-1/+1
|
* Deprecate e_authentication_session_new().Matthew Barnes2013-02-012-5/+8
| | | | Use e_source_registry_server_new_auth_session() instead.
* Use e_source_registry_server_new_auth_session().Matthew Barnes2013-02-012-5/+6
| | | | In place of e_authentication_session_new().
* Add e_source_registry_server_new_auth_session().Matthew Barnes2013-02-012-0/+57
| | | | | Convenience function instantiates an appropriate authentication session type for the given data source UID.
* collection_backend_child_added: Inherit the auth session type.Matthew Barnes2013-02-011-0/+6
| | | | | | Collection children will inherit the collection source's authentication session type, so password-based authentication is consistent across the entire collection.
* EServerSideSource: Add an "auth-session-type" property.Matthew Barnes2013-02-012-0/+94
| | | | | | | | | | This will allow modules -- particularly the online accounts modules -- to subclass and customize EAuthenticationSession, and then register the subclass to be used for data sources under their purview. Care must be taken when subclassing, however, to comply with the D-Bus interaction protocol that clients will be expecting, lest the client be left hanging during its authenticate() call.
* Make ECollectionBackend and ECollectionBackendFactory instantiable.Matthew Barnes2013-01-282-9/+10
| | | | | | | | | | | | | | | 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.