| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
warning
When the source file is not loaded yet, then the corresponding ESource
object is NULL, but the call calls g_object_unref() on it, which leads
to a runtime warning, even harmless.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is possible for evolution-source-registry to detect a newly-added
source file before the author of the file has written to it; the
registry will attempt to load the file, find it is invalid, and then
ignore it.
The registry should also listen for changes to files, and reload them
accordingly. This means that the source file will get reloaded after the
author has finished writing to it, and hence the source will get
created.
https://bugzilla.gnome.org/show_bug.cgi?id=751119
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=751119
|
|
|
|
|
| |
When available, reuse existing source, thus all the changes are not
done on an object which is immediately freed.
|
| |
|
|
|
|
|
| |
As the 3.14 version will be skipped, to get back to sync with
the version of GNOME, then the right Since version is 3.16.
|
|
|
|
|
|
| |
Since this change the client is responsible to provide credentials
to use to authenticate backends (through ESource-s, to be more precise),
unless the credentials are already saved.
|
| |
|
|
|
|
|
|
|
|
|
| |
On the code path where backend is NULL, error is always NULL, so
dereferencing error->message will result in a crash.
Coverity issue: #1250457
https://bugzilla.gnome.org/show_bug.cgi?id=739494
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this we can have all backends running on theirs own processes, in
this way, if a backend crashes we don't have the whole factory crashing
together. Also, each instance of the EBackendFactory can decide if they
want to have all instances of the same backend (like calendar, memo list,
and task list) running in only one process (useful for evolution-ews and
evolution-mapi where we can share the connections between calendar, memo
list and task list) or have each extension running on its own process.
Apart from that, a configure option was added and, in case the user wants
to keep the old behavior, it can be disabled by passing
"--disable-backend-per-process" to the configure.
As a side effect of these changes, we are enforcing that the hash-key
used to keep track of the backend-factories will be built internally and
that *always* will follow the "backend-name:extension-name" structure,
even for ECollectionBackends.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I also added license information to source files where it was
missing and changed the way the license block is organized. All
the sources' license information comments follow the same pattern:
/* [ Optional short file description ]
*
* [ Optional copyright notices]
*
* License information block
*
* [ Optional 'Authors:' section ]
*/
The LGPL is references consistently now; source files with main()
function, like tests or D-Bus services, use 'program' in the license
information block, while the other sources use 'library' word.
|
| |
|
|
|
|
|
|
| |
Win32 headers have a #define for 'interface', which breaks the build when
this word is used in the code, thus replace it to 'iface', the same way
as GLib or GTK+ code use to have it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Avoid doing this sort of thing during normal startup.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
In place of e_authentication_session_new().
|
|
|
|
|
| |
Convenience function instantiates an appropriate authentication session
type for the given data source UID.
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Server-side equivalent of e_source_registry_find_extension().
Use it in e_source_registry_server_ref_backend().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This signal is emitted from e_source_registry_server_load_file() just
prior to instantiating an EServerSideSource. Signal handlers can tweak
the GKeyFile content as necessary and return TRUE to write the modified
content back to disk.
For the purposes of tweaking, it's easier to deal with a plain GKeyFile
than an ESource instance. An ESource, for example, does not allow key
file groups to be removed.
The return value is cumulative. If any signal handler returns TRUE,
the GKeyFile content is written back to disk.
Unfortunately this breaks the libebackend ABI because I forgot to add a
pool of reserved pointers to the ESourceRegistryServerClass. Do so now,
since we have the opportunity.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Equivalent to calling AllowAuthPrompt() on each exported data source,
but cuts way down on the D-Bus traffic. Since the registry service is
commonly activated during a desktop session startup, this can actually
clog up the session bus and slow down login.
This leaves the source-specific AllowAuthPrompt() method unused, but
there are still use cases for it which we haven't implemented yet, so
leave it be.
|
|
|
|
|
|
|
| |
ESourceRegistryServer forgot to set WRITABLE and REMOVABLE flags on
new ESources created when a GFileMonitor detects a new .source file.
Consequently the new ESource could neither be modified nor removed,
which causes problems for unit tests that use predefined key files.
|
|
|
|
|
|
|
|
|
|
|
|
| |
In source_registry_server_maybe_start_auth_session() we need to start
the next EAuthenticationSession::execute() from a known GMainContext,
and not from whatever happens to be the current thread-default.
In some cases the current thread-default GMainContext gets popped and
discarded just after source_registry_server_maybe_start_auth_session()
returns, causing g_simple_async_result_complete_in_idle() to schedule
an idle callback on a now-unused GMainContext, and the authentication
session would never complete.
|
|
|
|
| |
Same deal as the previous commit.
|
|
|
|
|
|
|
| |
Returns the ECollectionBackend for a given ESource, if one exists.
This works for any collection member: the "collection" ESource itself
as well as any of its hierarchical descendants.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I realized ECollectionBackends are going to need a proper asynchronous
authentication function so they know when authentication is achieved.
e_source_registry_server_queue_auth_session() is a "fire-and-forget"
function with no way for the caller to know if and when authentication
is achieved.
The replacement function, e_source_registry_server_authenticate_sync(),
is a variation of e_source_registry_authenticate_sync() for use in the
registry service itself. It takes an EAuthenticationSession instead of
an ESource.
Since this API has not yet seen a stable release, I'm going to forego
deprecating the old function and just remove it. This is an API break,
and the libebackend soname has been bumped accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I wrote the original queuing algorithm for authentication requests to
serialize requests to ensure password prompts never pile up. But that
means requests for which a cached password exists may wait longer than
necessary, especially if an authentication session already in progress
is taking a long time to complete.
This was before I started using GcrSystemPrompt, which also serializes
requests to ensure password prompts never pile up. That frees us up to
process authentication requests for different data sources concurrently.
This commit simplifies the queuing algorithm significantly and also
makes it thread-safe so authentication requests can be submitted from
any thread. This is going to be important for ECollectionBackends.
|
| |
|
|
|
|
|
|
|
|
| |
If a collection backend is configuring an EServerSideSource from a
worker thread, avoid writing changes to disk prematurely.
Explicitly calling e_source_write_sync() still works as advertised
whether the source is exported or not.
|
|
|
|
|
|
| |
Read-only boolean property indicates whether the source has been
exported over D-Bus. Basically just queries the registry server
for itself.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The top-level headers are named after the library:
#include <libebackend/libebackend.h>
#include <libebook/libebook.h>
#include <libecal/libecal.h>
#include <libedata-book/libedata-book.h>
#include <libedata-cal/libedata-cal.h>
#include <libedataserver/libedataserver.h>
#include <libedataserverui/libedataserverui.h>
Including individual headers will cause a compilation error.
|
|
This new service manages data source key files and serves them to
clients, through the ESource and ESourceRegistry client-side APIs.
|