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.
'--enable-doc' configure option is newly added to control
generation of API documentation for backend public API
and D-Bus API. The default value is 'no'.
D-Bus API html documentation could be generated and all
pages(currently 3 docbook files) are merged into one single
html page called 'syncevo-dbus-api-doc.html'. To dynamically
generate 'version' of syncevolution into the html page, a placeholder
'##VERSION##' is used and changed in the generation.
client-test now accepts test case files like ical20.ics.<server>,
without the .tem suffix. This is used for testing the problematic
VCALENDAR items from MBC #1332, like this:
CLIENT_TEST_SERVER=local ./client-test Client::Sync::ical20::testConversion
Because "local" is not a recognized server, one has to set the syncURL
in the created "local_1" config before the test runs.
This patch switches reading of templates on disk from the previous,
one file per .ini file format to the single-file format produced
by the syncevo-phone-config utility. This makes creating templates
much easier, also when using just an editor instead of the tool.
The existing Cmdline tests cover this code pretty well, as demonstrated
by the number of fixes that were necessary in the previous patches
when running the tests. Therefore it should be safe to use this in
SyncEvolution 1.0.
With "syncevolution" using the D-Bus server and thus the keyring
by default, the client-test executable should better also use
the keyring. Otherwise setting the password via the command line
will render a test config unusable for client-test.
The patch turns out to be very easy: reusing the code in
CmdlineSyncClient via changing the inheritance of the sync engine used
by client-test-app.cpp plus adapting compile flags is enough.
This is a python script that tries with all possible configuration
combinations for a phone, once found the corresponding configuration and
the configuration template can be generated.
The script is installed as 'syncevo-phone-config'
Implement cmdline with support of dbus server. To enable cmdline
with dbus server, use the option '--use-daemon yes/no' in case that
you enable dbus service when configuration.
In a typical scenario, a new session is created for the purpose of
execution of arguments. It is scheduled with other sessions but with
a highest priority. Once it becomes active, command line call
'Session.Execute', a newly added method to execute command line
arguments.
The config name of a session should be known for dbus clients like
command line. A new property 'configName' is added in the properties
when calling 'Session.GetConfig'.
CTRL-C handling are processed once executing a real sync to dbus
server. It is mapped to invoke 'Session.Suspend' and 'Session.Abort'.
The meaning of '--enable-dbus-service' is expanded accordingly.
'--status' without server means printing all running session in the
dbus server.
'--monitor' could accept an optional config name. If one is given,
only attach to a session of that config, otherwise print an error.
If none is given, pick the first.
The sync-ui doesn't have a hard compile dependency on syncevo-dbus-server,
although it obviously won't run well without it. The new --disable-core
option can be used to compile just the sync-ui and the D-Bus wrapper lib
that it depends on.
Translations are generated when sync-ui and syncevo-dbus-server
are enabled, because both depend on the same translation files.
For the situation that sync-ui needs to include syerror.h from a
bundled Synthesis source, but libsynthesis itself is not built,
a special src/synthesis-includes directory is entered and produces
the necessary files by invoking the right target in the Synthesis
build dir. Because of that, enough packages must be installed to
configure the Synthesis engine even when only building the UI.
When marking syncevo-http-server as bin_PROGRAM, "make dist"
searched for a syncevo-http-server.c although no _SOURCES
variable was defined. When using bin_SCRIPT it doesn't do
that.
Because people asked for it, the Twisted-based HTTP server is
now installed when D-Bus support (which it depends on) is enabled.
It is installed as "syncevo-http-server" without the .py suffix
because that is an implementation detail that might change.
Because people need a way to figure out how to start it, usage
information is provided via optparse.
'peerIsClient' was duplicated in config.ini and template.ini, this
patch reused this field.
The patch also removed the 'default' template for server side, that is not
needed and broken.
Auto start desktop files should be installed in the /etc/xdg/autostart,
which linux distros use. However, this hard-code directory prevents
distributions failed due to permission. So the change
is to use $sysconfdir to install desktop files to avoid this issue.
However, to enable desktop files, you have to use '--sysconfdir=/etc'
to make sure the desktop files are installed in the correct directory.
Implement new notification for auto sync according to
requirements. The main changes are messages description
and internationalized.
3 kinds of messages are defined and shown via notification
server: 'is syncing', 'Sync complete' and 'Sync problem'.
They are used in below scenarios:
1) sync is successfully started, show 'is syncing'
2) sync is ended, show 'Sync complete' or 'Sync problem'
3) sync has problem, once sync is not successfully started,
and a fatal error occurs, show 'Sync Problem'. If not a fatal
problem, don't show anything.
To detect when sync is successfully started and done, SessionListener
is defined to listen to these changes. This gives AutoSyncManager
opportunities to send notifications once these statuses are changed.
Two buttons 'Dismiss' and 'View' are added into all notifications
to let users dismiss the notification or pop up sync-ui.
They are implemented by optional 'actions' mechasim of notification.
So if the notification server doesn't support actions, don't add
them.
create a desktop file to start syncevo-dbus-server when a user
logs in. The desktop file actually starts syncevo-dbus-server-startup.sh
instead of syncevo-dbus-server directly. The reason is the script is to
sleep 120 seconds and then start the dbus server not to increase starting
time of the system.
Don't use AC_CONFIG_FILES() to generate the desktop file and script.
That's because if a @variable@ references other variables in the *.in
file, substitutions won't work.
Add notification for auto sync when a task has been
done. Check and use 'libnotify' as a notification
target. Enable it only when enabling dbus server.
Changes done a while ago, checking in now...
"make install" with the plugin off still tried to create the plugin directory.
I went for excluding entering the sub directory, as in the original patch, in
particular because DIST_SUBDIRS had to be updated anyway. Apparently when it is
set, it is used by "make dist" instead of SUBDIRS. I thought "make dist" would
use a union of the two.
update-samples.pl was missing, broke "make distcheck".
The GNOME Bluetooth panel plugin needs to be installed into
the location used by the system. We guess what that location might be by
installing into `pkg-config --variable=libdir gnome-bluetooth-1.0`/plugins.
Because this location might not be writable, compiling the plugin is
off by default. It can be enabled with --enable-gnome-bluetooth-panel-plugin
which depends on the libgnome-bluetooth-dev files.
Shared libraries must be enabled when enabling the plugin. Not currently
checked by configure.
This patch replaces src/syncclient_sample_config.xml with a
combination of src/syncevo/configs/syncevolution.xml and the
config fragments that are shared with Synthesis upstream.
These fragments are installed in /usr/share/syncevolution/xml (or
the corresponding data path). From there they are read at runtime
to compose the final XML configuration. Users can copy individual files
into the corresponding directory hierarchy rooted at
$XDG_CONFIG_HOME/syncevolution-xml to replace individual fragments.
New fragments can be added there or in /usr/share.
For testing, these two directories can be overridden with the
SYNCEVOLUTION_XML_CONFIG_DIR env variable. No tests have been added
for this yet. There's also no documentation about it except this
commit message - add something to the HACKING guide once this
new concept stabilizes.
Developers can add new fragments in the source tree, invoke make and run the
resulting binary in client mode. As before, a complete config is included
in the binary. However, it is only sufficient for SyncML client mode.
For server mode, the files are expected to be installed (no need to maintain
a list of files in a Makefile for that) or SYNCEVOLUTION_XML_CONFIG_DIR
must be set.
At the moment, the following sub-directories are scanned for .xml files:
- the root directory to find syncevolution.xml
- datatypes, datatypes/client, datatypes/server
- scripting, scripting/client, scripting/server
- remoterules, remoterules/client, remoterules/server
Files inside "client" or "server" sub-directories are only used
when assembling a config for the corresponding mode of operation.
The goal of this patch is to simplify config sharing with Synthesis
(individual files are easier to manage than the monolitithic one), to
share files between client and server with the possibility to add
mode-specific files, and to allow users to extend the XML
configuration. The most likely use case for the latter is support for
more devices.
Previously, remote rules for the different devices listed in
syncserv_sample_config.xml were not used by SyncEvolution.
This patch moves the ZYB remote rule into a client-specific remote rule,
thus removing a complaint from libsynthesis about the unknown <client>
element when running as server.
Because we are using the unified upstream config, some parts of the config
have changed:
- There is a SYNCLVL field in all field list. This is currently unused
by SyncEvolution, but doesn't hurt either.
- A new iCalendar 2.0 all-day sanity check was added (for older Oracle servers?).
- The CATEGORIES defition in vBookmark was extended.
- some comment and white space changes
Because this is such fundamental change, extra care was taken to
minimize and verify the config changes. Here's the command which compares
old and new config for clients plus its output:
$ update-samples.pl syncevolution.xml client | diff -c -b syncclient_sample_config.xml -
***************
*** 31,42 ****
<scripting>
<looptimeout>5</looptimeout>
- <function><![CDATA[
- // create a UID
- string newuid() {
- return "syuid" + NUMFORMAT(RANDOM(1000000),6,"0") + "." + (string)MILLISECONDS(NOW());
- }
- ]]></function>
<macro name="VCARD_BEFOREWRITE_SCRIPT_EVOLUTION"><![CDATA[
// a wordaround for cellphone in evolution. for incoming contacts, if there is only one CELL,
// strip the HOME or WORK flag from it. Evolution then should show it. */
--- 30,35 ----
***************
*** 118,123 ****
--- 111,124 ----
}
]]></macro>
+ <function><![CDATA[
+ // create a UID
+ string newuid() {
+ return "syuid" + NUMFORMAT(RANDOM(1000000),6,"0") + "." + (string)MILLISECONDS(NOW());
+ }
+ ]]></function>
+
+
<!-- define script macros for scripts that are used by both vCalendar 1.0 and iCalendar 2.0 -->
<macro name="VCALENDAR_INCOMING_SCRIPT"><![CDATA[
***************
*** 145,150 ****
--- 146,158 ----
DTSTART = CONVERTTOUSERZONE(DTSTART);
MAKEALLDAY(DTSTART,DTEND,i);
}
+ else {
+ // iCalendar 2.0 - only if DTSTART is a date-only value this really is an allday
+ if (ISDATEONLY(DTSTART)) {
+ // reshape to make sure we don't have invalid zero-duration alldays (old OCS 9 servers)
+ MAKEALLDAY(DTSTART,DTEND,i);
+ }
+ }
// Make sure that all EXDATE times are in the same timezone as the start
// time. Some servers send them as UTC, which is all fine and well, but
***************
*** 265,275 ****
</scripting>
-
<datatypes>
-
<!-- list of internal fields representing vCard data -->
<fieldlist name="contacts">
<field name="REV" type="timestamp" compare="never" age="yes"/>
<!-- Name elements -->
--- 274,283 ----
</scripting>
<datatypes>
<!-- list of internal fields representing vCard data -->
<fieldlist name="contacts">
+ <field name="SYNCLVL" type="integer" compare="never"/>
<field name="REV" type="timestamp" compare="never" age="yes"/>
<!-- Name elements -->
***************
*** 680,689 ****
$VCARD_INCOMING_NAMECHANGE_SCRIPT
]]></incomingscript>
</datatype>
-
-
<!-- common field list for events and todos (both represented by vCalendar/iCalendar) -->
<fieldlist name="calendar">
<field name="ISEVENT" type="integer" compare="always"/>
<field name="DMODIFIED" type="timestamp" compare="never" age="yes"/>
--- 688,696 ----
$VCARD_INCOMING_NAMECHANGE_SCRIPT
]]></incomingscript>
</datatype>
<!-- common field list for events and todos (both represented by vCalendar/iCalendar) -->
<fieldlist name="calendar">
+ <field name="SYNCLVL" type="integer" compare="never"/>
<field name="ISEVENT" type="integer" compare="always"/>
<field name="DMODIFIED" type="timestamp" compare="never" age="yes"/>
***************
*** 787,793 ****
<subprofile onlyformode="standard" name="VTIMEZONE" mode="vtimezones"/>
! <!-- sub-profile for todoz -->
<subprofile name="VTODO" nummandatory="1" showifselectedonly="yes" field="ISEVENT" value="0">
<property name="LAST-MODIFIED" suppressempty="yes">
--- 792,798 ----
<subprofile onlyformode="standard" name="VTIMEZONE" mode="vtimezones"/>
! <!-- sub-profile for tasks -->
<subprofile name="VTODO" nummandatory="1" showifselectedonly="yes" field="ISEVENT" value="0">
<property name="LAST-MODIFIED" suppressempty="yes">
***************
*** 1394,1401 ****
<!-- non-standard properties -->
! <property name="CATEGORIES">
! <value field="CATEGORIES"/>
</property>
<property name="CLASS" suppressempty="yes">
--- 1394,1402 ----
<!-- non-standard properties -->
! <!-- inherit CATEGORIES from vCard 3.0, i.e. comma separated -->
! <property name="CATEGORIES" values="list" valueseparator="," altvalueseparator=";">
! <value field="CATEGORIES" combine=","/>
</property>
<property name="CLASS" suppressempty="yes">
***************
*** 1416,1435 ****
<use profile="vBookmark"/>
</datatype>
! <fieldlists/>
! <profiles/>
! <datatypes/>
</datatypes>
<clientorserver/>
-
- <client type="plugin">
- <remoterule name="ZYB">
- <manufacturer>ZYB</manufacturer>
- <model>ZYB</model>
- <!-- information to disable anchors checking -->
- <lenientmode>yes</lenientmode>
- </remoterule>
- </client>
-
</sysync_config>
--- 1417,1424 ----
<use profile="vBookmark"/>
</datatype>
!
</datatypes>
<clientorserver/>
</sysync_config>
Congwu already removed the -DENABLE_INTEGRATION_TESTS, which
caused the CPPUnit header include. This caused a problem in
the nightly build, which compiles without --enable-integration-tests
and then compiles client-test separately.
Registering integration tests doesn't depend on CPPUnit headers
or libs, only running them. Backends therefore should always
register themselves for testing.
This patch clarifies that in the comments and changes the Evolution
and file backends accordingly.
1) .template.ini renamed to template.ini
2) removed duplicated configuration templates in the test directory, we will use
the real templates for testing.
3) change default template for Nokia phones to Nokia_7210c
Introduced TemplateConfig to abstracting the template configuration structure,
the template metadata used for matching is also parsed here.
The fields introduced in the metadata are:
PeerIsClient: identify whether this is a server side configuration or a client
side configuration.
Fingerprint: the matching string for this template, it is a comma separated string
with each string modeled as: "Manufacture_Model". The first substring is also
used as the name to identify this template so that user can select the template
by this name.
eg:
Nokia 7210c: Nokia_7210c
SyncEvolution server: SyncEvolutionServer, SyncEvolution
ScheduleWorld: ScheduleWorld,default
SyncEvolution client: SyncEvolutionClient, SyncEvolution
Description: this is a just a descriptive string not used for matching.
GetServerTemplates is changed to add another "devices" parameter to identify
it is asking for templates for a list of "devices". Each device is a tuple
<matchstring (devicename), matchMode (server/client/all)>.
TemplateList as the return type, which is a list of class TemplateDescription
so that we can also return enough information for corresponding templates. This
list is sorted by the 3-tuple <finger, rank, name>.
Add MatchServerTemplates method which will iterating all templates inside the
folder and match against the input parameter and finally return a sorted
list of matched templates.
The atcually fuzzy match algorithm is based on a LCS (added in the following
commit).
Cmdline interface is changed accordingly:
--template ? is changed to --template ?[string], so that user use the former
case to match all templates for a tradiontial SyncML client and the latter case
to match templates related to an input string.
SyncConfig API is also renamed (Server -> Peer) because both server/client
configuration/template are handled.
The original configuration template (Funambol and ScheduleWorld) has been moved
to the new template structure (under servers), they also have a .template.ini
file added so that they can be matched and picked up. All templates for
supported servers still have built-in template support in the code as before.
Templates for SyncEvolution based server is also added.
Server side templates are added (Nokia default, Nokia_7210c and SyncEvolutionServer).
Add unit test for the new template match use case.
The code was originally written for an improved diff to be used in
synccompare. It improves upon the normal LCS by taking into account
that the some subsequences might be "nicer" than others of the same
length, for example because they cross less "boundaries" inside the
sequences.
The reason for adding it now is for use in a fuzzy manufacturer/model
matching.
Changing the CPPUnit defines broke linking of syncevolution in Moblin
(--enable-integration-tests): test.cpp then depends on CPPUnit libs
and was linked into syncevolution and syncevo-dbus-server, causing link
failures.
Made inclusion of test.cpp conditional on actually having unit tests
inside the library. Only then do syncevolution and syncevo-dbus-server
have to link against CPPUnit.
Use gnome-keyring to store and retrieve passwords in dbus server
by default when dbus server is compiled with gnome-keyring library.
For storing passwords, if failed in gnome-keyring, an error will
be thrown, which aborts flushing properties.
For retrieving passwords, firstly find them in the gnome-keyring.
If it is not found, dbus server then send InfoRequest signal to
dbus clients to ask for passwords. See MB#6376.
The EDS backend was asking for glib support even when it was not
active. In combination with not linking against the right libs
in that case there was a link failure because g_thread_init()
and g_type_init() were not found.
When the EDS backend was active, this wasn't a problem because
the necessary libs were linked indirectly.
This patch reduces the number of libs that are checked and used
when not enabling the EDS backend. This is done by resetting
the ECAL/EBOOK flags when inactive and only asking for glib
when active.
It also fixes the checking and linking against gobject and gthread
in the case that glib support is requested.
Broke while adding support for shared configs. We didn't have a test
for it, therefore this went unnoticed. I have added a test for it
(CmdlineTest::printFileTemplates) and fixed the issue (using the wrong
file layout for templates).
The test depends on having access to installed templates in a known
location, which previously was a problem due to the hard-coded
TEMPLATE_DIR. Now SyncContext::createServerTemplate() checks an env
variable (SYNCEVOLUTION_TEMPLATE_DIR) which is set by most of the
command line tests to prevent reading from there unintentionally and
once to "./templates" to ensure reading from there.
The previous location was /usr/etc/syncevolution. It should have been
/etc/syncevolution in our debs, with proper declaration as system
config files. The intention was that system admins can add or modify
templates.
Not particularly likely, so now template files are only searched in
/usr/share/syncevolution/templates (or whatever was chosen with
configure --datadir).
Also added a README to that directory, warning that copying these
files will lead to incomplete configs. Each main config.ini carries
a similar comment, for those who miss the README.
syncevo-dbus-server invokes SoupTransportAgent directly and
thus must have access to the libsoup header files. This broke
in the --enable-shared case. It probably worked before in
static mode because then we ended up with different include
flags.
Due to a typo in the src/syncevolution -> src/syncevo transition,
unit tests inside libsyncevolution.a were not included in the
client-test executable. The check of libsyncevolution.a searched
for the library in synccevo instead of syncevo.
Also merged updated dependency list from master branch.
Due to a typo in the src/syncevolution -> src/syncevo transition,
unit tests inside libsyncevolution.a were not included in the
client-test executable. The check of libsyncevolution.a searched
for the library in synccevo instead of syncevo.
This uses the new combined client/server Synthesis engine. When
building shared modules, the engine is opened dynamically only
while needed, thus reducing overall memory consumption.
The HTTP server is implemented in Python, using the the 'twisted'
server framework because it can use the same glib event loop as the
D-Bus binding. This allows us to keep the same event loop running
forever and react to both kinds of events.
The server takes a base url (including host name and port)
and a default configuration as name. The host name is currently
ignored. It could be used to bind to a specific interface.
The path is what a client has to use as part of his sync URL
to synchronize against the default configuration. In addition
the client can add another path to select that as his server
configuration.
For example, if the script is called with
http://localhost:9000/syncevolution default
then syncURL = http://localhost:9000/syncevolution will synchronize
against the configuration called "default". With syncURL =
http://localhost:9000/syncevolution/my_server, it will
synchronize against "my_server".
This is basically a rewrite from scratch, targeting the revised D-Bus
API. The core infrastructure for handling client requests is in place,
including the work queue for sessions and unexpected disconnects.
Many of the related D-Bus methods (Server.Connect(),
Server.StartSession(), Connection.Close(), Session.Close()) are
implemented.
Rudimentary testing is done with the test/dbus-server-connect.py
script.
The library is compiled and installed as a syncevolution utility
library (in other words, as lib/syncevolution/libgdbus), so that
it never conflicts with a copy of the code in another project.
Install head files to a standard path, the remaining dependencies are
synthesis and boost
client-test is portable when ENABLE_MODULES is defined, no longer link to
backends libraries.
Add --enable-developer-mode, in which mode the backend scan path will be
under current build directory for development purposes.
--keyring|-k
Save or retrieve passwords from the GNOME keyring when modifying the
configuration or running a synchronization. Note that using this option
applies to *all* passwords in a configuration, so setting a single
password as follows moves the other passwords into the keyring, if
they were not stored there already:
--keyring --configure --sync-property proxyPassword=foo
When passwords were stored in the keyring, their value is set to "-"
in the configuration. This means that when running a synchronization
without the --keyring argument, the password has to be entered
interactively.
The implementation introduces new virtual methods for password handling
to properties and iterates over all properties to activate that
special behavior.
Another change is no longer to use cached strings in the SyncEvolutionConfig
to store retrieved passwords. Instead, they are saved as the filter in
the config node. This could help their users to get them but not flush
to files. The main purpose of this change is to make it flexible
to meet the requirements of dynamically added passwords in the backend.
Several files created as part of the GUI build were not
properly removed during "make clean". Found with distcheck
when using DISTCHECK_CONFIGURE_FLAGS=--enable-gui
distcheck also complained about an untranslated .xml file
that it found after building the GUI. The .xml is
generated from .glade, which is translated, so the .xml
file can be ignored via POTFILES.skip.
The only way that I found not to execute a test was not to register
it in CPPUnit. FilterTest() does this by replacing a valid test
or test group with a dummy one, SkipTest, which just prints the
test name and that it is skipped.
Registering tests has to be intercepted at multiple levels:
- CPPUNIT_TEST in test suites
- ADD_TEST in ClientTest
- addTest in ClientTest
Not currently intercepted are complete test suites (CPPUNIT_TEST_SUITE).
The main purpose of this patch is to avoid running the time consuming
suspend and interrupt tests, but this feature might also be useful for
other tests, which is why it was implemented in a more general way.
Catch fatal signals (SIGSEGV, SIGABRT, SIGBUS) and in the signal
handler, flush and process output.
Flushing is done each time redirection is removed and thus
also catches output that is pending in either C or C++ output
streams during a normal application shutdown.
The abort-redirect test program covers such a scenario. It does
a double free, which depending on libc causes a segfault or
error message. The source is in "test" (like the rest of the
test programs) while the binary is built with "make abort-redirect"
in "src". It would be nicer if the test folder was a subdirectory of
src and wouldn't require its own Makefile, but that's a different issues...
Note that glib's double free report is written to the console
regardless whether stdout/stderr redirection is enabled. It seems
that glibc does not use FDs 1 or 2 for that, redirecting them in
the shell has no effect either. Catching the signal and flushing
is useful nevertheless.