libecal/ebook implementation based on D-Bus (Evolution >= 2.30)
inevitably will run into D-Bus timeouts as the amount of data
increases.
This patch moves an earlier hack written for Maemo into the core
code and enables it by default, if the EDS backends are active.
It works by intercepting dbus_connection_send_with_reply()
and substituting timeout_milliseconds==-1 ("default timeout
of 25 seconds") with timeout_milliseconds=INT_MAX ("no timeout").
Setting SYNCEVOLUTION_DBUS_TIMEOUT to number of milliseconds
allows controlling the final timeout value.
The tables got fairly large, requiring scrolling to see the real information
(overall success and valgrind errors). This patch moves these columns to the left
where they are visible by default.
This column is useful to determine at a glance whether tests
failed because of something outside of our control. The value
is also shown for each single test.
The code added all services to the list which it encountered, including
those which were disabled and thus got skipped during testing. This
artificially increased the size of the report; not even sure whether
this was intentional. Now only active services are added.
Introduced a new remote rule for all devices made by Nokia. In that
rule, we set certain defaults which turned out to be useful for
a variety of existing phones:
- send alarm times in UTC (BMC #1657)
- ignore the incorrect 256 bytes size limit for PHOTOs
and other properties (BMC #5860)
Should a specific model require different values, then a rule for
it after the initial 00_nokia.xml can override the defaults.
"text" stands for Evolution memos and depends on
EvolutionCalendarSource. Added.
The name lookup differs for local and for sync indices, must do
the name lookup before calling checkEvolutionSource(). Fixed.
Destroying ORBit based Evolution backends at the very end of the
process life time caused assertions in ORBit. Added explicit cleanup
code which is called before triggering the normal library shutdown by
leaving main().
The command line, like a lot of other code, used the escape/unescape
code in SafeConfigNode. For historic reasons, that code used ! as
escape character, which is awkward for the command line, because
that is a special character.
Instead of further overloading the SafeConfigNode, this patch moves
the escape/unescape code into its own utility class. This is the
cleaner approach anyway. It also adds unit testing for the code.
All other users of the old code are updated. Care must be taken here
to not accidentally switch to a different escape mechanism, because
the mechanism must remain compatible with the old implementation.
Using std::string for both local IDs as respresented by the backend
and encoded as printed by the command line was confusing. It didn't
help that the m_luids member contained encoded strings, instead of
normal luids.
This patch introduces a dedicated class which holds an encoded luid,
and provides the necessary conversion functions. m_luids now really
contains plain luids, so its values can be passed to the backends
directly.
First, "query-builder=fetch,save" is obsolete.
Second, the modification time stamp is not updated in
saved contacts. Instead it has to be fetched explicitly
in a second request. This behavior is currently under
debate because it is not quite consistent with some of
the API documentation.
None of the config templates added to the wiki contain the "consumerReady"
flag. Therefore they don't show up in the sync-ui once a user follows the
instructions for downloading them.
The tool now adds the flag automatically, because a user who downloads
the template does so in order to use it, regardless whether it is
ready or not (which we haven't defined anyway for phones).
Merged all Nokia templates (S40, S60, Maemo) into one, because the
settings were the same anyway. The rationale is that it reduces the
number of options the user has to choose from.
Added Sony Ericsson, based on K750i.
Added names of working phones based on Wiki entries.
The D-Bus based Evolution Data Server calendar and contact daemons
(e-calendar-factory and e-contact-factory) shut down after 10 seconds of
inactivity.
Normally libecal/libebook detect that, but not when the client only uses the
synchronous API ("destroyed" signal not delivered, see e-cal.c). That affects
SyncEvolution.
This patch ensures that a EvolutionContactSource resp. EvolutionCalendarSource
remains open throughout the lifetime of the client-test app. This prevents
the storages from shutting down.
This instances are created on demand and deleted when the process quits.
This might be too late for ORBit based Evolution; there were error messages
after all tests succeeded and an assertion failure in ORBit, leading to
a nonzero return code.
Watching for configuration changes (e.g., for refreshing the list of
servers in the GUI) currently is a bit cumbersome. It requires
watching for SessionChanged, request GetConfigs, and look if
the configs have changed. This is not really a problem, but it
might be more convenient to get notifications about config
changes directly.
This patch introduces a Server.ConfigChanged signal which is at the
end of a session if and only if it modified (removed, updated, added)
a config. This includes the Session.SetConfig() as well as command
line operations executed inside the server.
Testing the signal can only proof that it is emitted. Checking that it
is not emitted would have to block waiting for something, and it is
uncertain what that should be. SessionChanged may be emitted before
the ConfigChange signal and thus isn't suitable.
This call is useful for clients which haven't started the session
and need to know what peer it relates to, and also fo clients which
use non-normalized config name and need to know the normalized name.
Genesis is already providing feedback about running syncs and thus
wants to suppress the notifications generated by syncevo-dbus-server
for it. With this patch it is possible.
This patch removes the m_attachedClients member and moves the attach
count into the Client class. The reason is two-fold:
a) m_attachedClients was simply redundant
b) entries were not removed (bug in the control flow of clientGone:
if the client was found, which is always the case for any attached
client, it returned without calling detachClientRefs())
The other new entry in Client is the boolean setting whether that
client wants to suppress notifications. If any client disables them,
they are disabled globally.
The main goal of the new D-Bus API is to avoid unnecessary (and incorrect)
updates in Genesis when running non-sync sessions with the command line.
This patch sets the flag accordingly to achieve this.
Note that the modified command line now fails with
org.freedesktop.DBus.Error.UnknownMethod when running against an old
syncevo-dbus-server. There's no fallback to the older StartSession
method. This shouldn't be necessary because the command line is shipped
with the server.
Just in case an INFO message is printed when the method is found to
be missing.
Clients like Genesis would like to know for which purpose a session
was created. If it was for changing the configuration, they can ignore
the session. If it was for sync, then progress and result should be
displayed.
Starting a session with the new "no-sync" flag in the new
StartSessionWithFlags() achieves that. Note that it is up to the
clients to provide that hint; currently none of the clients do that.
Found this one when adding a method with five parameters. The
boost::bind() call had the wrong number of parameters for that case
and thus compilation failed.
One common mistake among developers is that they recompile SyncEvolution
and then run with the system's D-Bus server. This patch adds an INFO
message about such a version mismatch, but does not abort because such
a combination may be intentional.
It is implemented as part of the attach process: as soon as attaching
was successful, fire of another asynchronous method call to the new
Server.GetVersions() instead of returning from the main loop. Once
that completes, check the version and return.
We are about to extend the D-Bus API. Clients need some way of determining
whether the new features are available. A strict numbering of the API is
inflexible, so let's use "capability" strings instead. Also add flexible
version querying, for debugging.
do checking to avoid duplicate before pushing back a source
into m_localSource2Config for TestEvolution.
Virtual sources may contain many sub-sources, which might duplicate
other sources.
When configuring a context for local sync, no peer is needed
inside that context. Therefore "--configure" without "--template"
is valid, because the templates only differ in peer-specific
properties.
This patch uses the "SyncEvolution" template as automatic fallback
for context configs. A change to FileConfigTree ensures that the
"peers" directory is created, as expected by the code which checks
for new-style configs.
A existing context configuration could accidentially be access without
the @ sign and then was treated like an old-style config with default
context. During --configure, invalid properties from the @default
context were written into the other context.
The fix makes the check for old-style configs more strict: it assumes
that all new-style contexts have a "peers" sub directory and checks
for that.
The --delete-items/--import options did not work with the KCalExtended
backend. The reason was that saving changes is only done in
KCalExtendedSource::endWrite(), which wasn't called because the command
line did not invoke endDataWrite().
That used to be intentional to avoid updating change tracking state in
other backends, but clearly was a hack. Because the sources are now
instantiated without change tracking, endDataWrite() is safe to call,
which fixes the issue with KCalExtended.
Must use MemoryCalendar because ExtendedCalendar can no longer
hold incidences without a Notebook UID, which does not exist
without a storage.
Removed a redundant smart pointer copying.
Added return code checking of iCalendar 2.0 parser.
The usage model for the nightly repos is that the "nightly" user
updates them and other users modify them to try out changes before
committing them. This relies on group-writable repos.
Despite umask 0002 and drwxrwsr-x permissions of the work area
this didn't work, group only had read permission. This patch adds
an explicit chmod and sets "sharedRepository = group" to fix this
after a fresh clone.
The nightly test account only has anonymous read access to
gitorious.org via the git:// protocol. But for normal users
patching the files, access via ssh is needed to commit changes.
Work around this by temporarily patching the URL for origin.
"git remote set-url" would be more elegant than Perl, but
only recent git versions have that.
libmkcal.pc did not depend on libkcalcoren and thus
include paths were not set for that when only checking
for libmkcal. Drawback now is the hard dependency on
the MeeGo version of libkcalcore.
Function "icalcomponent_remove_property(...)" removes property instance from
properties list, but doesn't free the space it holds. So, after calling this
function, the property instance removed from properties list should be free
explicitly.
"git show-ref HEAD" prints all refs containing HEAD. Sometimes there
were more than one. What we want is .git/HEAD, which "show-ref" seems
to know nothing about ("git show-ref --verify HEAD" fails).
Fixed by using the content of ".git/HEAD". Links are resolved by
removing the "ref: " prefix in it.
As part of splitting kcalextended into a modified kcalcore (shared
with KDE) and mkcal (MeeGo), the API was modifid. This patch gets
SyncEvolution to compile again. However, at least on my laptop
it then crashed at runtime inside Qt before even calling mkcal =>
change untested.