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.
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.
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.
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.
This reverts commit ec7eb74366.
With the symbol prefix renamed from gdbus into bdbus, we can install
the lib into /usr/lib/syncevolution again, to get it shared between
the "syncevolution" and "syncevo-dbus-server" binaries.
The previous solution of linking Bluex gdbus statically was not
enough. On Fedora 14, compile errors due to the glib header files
being pulled in indirectly appeared.
This patch does a global search/replace which changes the
"gdbus" (GLib D-Bus) prefix into "bdbus" (Bluez D-Bus). For the
record:
perl -pi 's/g_dbus_/b_dbus_/g; s/GDBus/BDBus/g; s/GDBUS/BDBUS/g' ...
Currently the configuration name for a new config is the
fingerPrint and it overwrites any existing configuration.
This commit starts using deviceName as the base name and adds a
incremental number to the end if a configuration already exists
for that name.
ZYB.com will be replaced with Vodafone 360, which we don't support (yet).
This patch removes the obsolete template for ZYB.com. The sync-UI still
has some strings for it, just in case that someone has an old template
around or runs it against an old syncevo-dbus-server.
The redundant charset specification was set by the Funambol
Thunderbird client. Because of a literal comparison against
'application/vnd.syncml+xml' the messages were rejected.
This patch strips everything after a semicolon. None of the options
there should matter for SyncML.
SyncEvolution on FC 13 crashes because it conflicts with a different
system version of the gdbus library. Always linking statically fixes
this.
There never was an official upstream release of gdbus, so sharing the
implementation does not work.
When running operations on a non-peer configuration (like --restore @default
addressbook), the operation fails with
[ERROR] <source name>: type 'select backend' not supported
The root cause is that the "type" property was read from a virtual, empty peer
node. MultiplexConfigNode already handled this by falling back to the non-peer
node.
The same special case also needs to be added to SyncSourceNodes::getNode().
Currently the configuration name for a new config is the
fingerPrint and it overwrites any existing configuration.
This commit starts using deviceName as the base name and adds a
incremental number to the end if a configuration already exists
for that name.
'isPropAssignment' checks each line and match whether it's
a property assignment according to match '<word> = value'.
Comments for 'KCalExtended' and 'QtContacts' match this pattern.
Obviously, they should be ignored like other backends comments.
This patch adds an utility script (readme2c.pl) which extracts the
SYNOPSIS and OPTIONS part of README.rst and puts it into C
strings. These are then used inside the SyncEvolution command line for
short help (just the synopsis) and --help (also all options).
This patch also cleans up README.rst so that the OPTIONS part really
documents most options in sufficient detail for --help to be useful.
The USAGE section remains part of the README and the man page where
the different operations are introduced in a more task-oriented way.
This separation is not always easy to make. The --restore operation
and related parameters are only described in the USAGE part because I
couldn't find a way to introduce them briefly and then add a thorough
explanation under OPTIONS.
Some unit tests of CmdlineTest are failed due to new backends
which were newly implemented, including KCalExtended and QtContacts.
Change the reference data.
ZYB.com will be replaced with Vodafone 360, which we don't support (yet).
This patch removes the obsolete template for ZYB.com. The sync-UI still
has some strings for it, just in case that someone has an old template
around or runs it against an old syncevo-dbus-server.
The redundant charset specification was set by the Funambol
Thunderbird client. Because of a literal comparison against
'application/vnd.syncml+xml' the messages were rejected.
This patch strips everything after a semicolon. None of the options
there should matter for SyncML.
SyncEvolution on FC 13 crashes because it conflicts with a different
system version of the gdbus library. Always linking statically fixes
this.
There never was an official upstream release of gdbus, so sharing the
implementation does not work.
Tell QtContacts to only fill in the minimal amount of information
needed in listAllItems: local ID (always set?!) and modification
time stamps.
Whether this really reduces the amount of information returned to
us wasn't tested, but it also does no harm.