Commit graph

94 commits

Author SHA1 Message Date
Patrick Ohly
870707b48a autotools: disable automatic gen-autotools.sh invocation in released sources
Running gen-autotools.sh as part of "make distcheck" fails because the
source directory is read-only. It shouldn't be needed and wouldn't
replicate the same autotools files (due to the missing "git describe"
output), so disable running it unless the source directory contains a
.git repo.
2011-02-07 13:27:56 +01:00
Patrick Ohly
65a14e7fa6 autotools: rebuild makefiles also when files are added or removed
"gen-autotools.sh" (invoked by "autogen.sh") is needed to create some
of the autotools .am and .in files. This is necessary to avoid
hard-coding certain lists of dirs (backends) and files (templates).
The generated makefiles updated themselves when these files were
modified, but not when files were added or removed.

This patch fixes that. It also avoids some code duplication. Instead
of adding explicit rules to the makefiles for the file dependencies,
now gen-autotools.sh is run on each "make all" or "make Makefile"
invocation. It modifies the generated files only if their content has
changed. The dependency rules for "Makefile.am" and "configure.in" are
constructed so that make re-checks their time stamps after running the
gen-autotools.sh script.
2011-02-07 13:02:58 +01:00
Zhu, Yongsheng
c7e47d8d3c buteo testing: enable buteo testing in client-test
To enable it in configuration, use '--enable-buteo-tests'.
To test client-test with buteo to do sync, make sure the
environment variable 'CLIENT_TEST_BUTEO=1' is set.

Three main steps to support buteo testing in client-test,
1) pre-run: storage preparation, clean up buteo logging
files and set corresponding keys in meego-sync-conf.xml.
For qtcontacts, switch backend database files for each
client; For calendar/todo/note, specify different notebook
names for each client.
2) run: re-implement ClientTest.doSync function, which
dbus-calls 'msyncd', the dbus daemon of buteo to do sync.
Listen to needed signals to track its status.
3) post-run: collect its status and summarize its statistics
and convert to internal sync report.

Buteo doesn't support explicit slow-sync mode and refresh-
from-server mode. Add two workarounds for them:
For slow-sync mode, wipe out anchors;
For refresh-from-server, wipe out anchors and clean all local
data and do two-way sync.

To enable buteo testing in your environment, you have to:
1) Add read/write privilege for the directory /etc/sync for
current testing user
2) To test one remote server, make sure the profile xml is put
in $HOME/.sync/profiles/sync. The name of the profile xml should
be set as the server name.
2010-12-08 10:56:16 +01:00
Patrick Ohly
fa9c4c6bb9 phone templates: updated, copied from syncevolution.org Wiki (BMC #5727)
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.
2010-08-27 13:30:05 +02:00
Zhu, Yongsheng
3c307b04dd Doc: add '--enable-doc' option and generate D-Bus API doc(MBC #1745)
'--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.
2010-06-08 17:20:14 +02:00
Patrick Ohly
967f0a8b2c client-test: added test case for broken VTIMEZONE matching (MBC #1332)
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.
2010-05-04 22:05:15 +02:00
Patrick Ohly
29e0b8eac1 templates: use single-file format (MBC #1208)
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.
2010-05-04 09:39:20 +02:00
Patrick Ohly
f0e0c4c373 client-test: enable it to use keyring by default (MB #10479)
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.
2010-04-19 14:38:27 +02:00
Chen Congwu
1022e21494 Test tools: automatically detection working configuration for a phone (MB#9862)
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'
2010-04-19 11:35:40 +02:00
Patrick Ohly
ff50b9c9e4 command line + D-Bus: fixed "make distcheck"
libgdbus was always added to the libs of syncevolution,
even if it was not needed and not compiled.
2010-03-30 21:20:55 +02:00
Patrick Ohly
a388d4de1f command line + D-Bus: fixed compile problems
signal.h must be included in syncevolution.cpp.
DBUS_CFLAGS/CXXFLAGS are also needed for it now.
2010-03-29 22:13:45 +02:00
Zhu, Yongsheng
3fc7e529ea Cmdline: move cmdline to dbus server (MB#5043)
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.
2010-03-29 11:01:35 +02:00
Patrick Ohly
73479a427e autotools: final fix for distributing syncevo-http-server.py
Distribute it via test/Makefile and install it in src/Makefile.
2010-03-23 21:30:39 +01:00
Patrick Ohly
4d127d692c autotools: --disable-core --enable-gui => build only sync-ui and its D-Bus lib
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.
2010-03-23 19:04:06 +01:00
Patrick Ohly
e049e915c2 autotools: syncevo-http-server + dist problem
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.
2010-03-23 18:55:06 +01:00
Patrick Ohly
22b4776735 syncevo-http-server: include Python script in distribution
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.
2010-03-22 15:50:19 +01:00
Chen Congwu
e1d8e4108f Configuration template: reuse 'peerIsClient' in config.ini (mb#10224)
'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.
2010-03-18 18:40:48 +01:00
Zhu, Yongsheng
ccee8db56b Install: change 'autostart' data install directory
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.
2010-03-15 10:23:24 +08:00
Zhu, Yongsheng
62990c3d7e DBusServer: improve notification for auto sync (MB#10000)
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.
2010-03-08 15:46:21 -08:00
Zhu, Yongsheng
fb706a807a DBusServer: start syncevo-dbus-server when users log in
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.
2010-03-08 15:26:58 -08:00
Zhu, Yongsheng
ed8a673fbc DBusServer: add notification for auto sync (MB#6378)
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.
2010-03-01 08:25:20 +01:00
Patrick Ohly
a2b0235869 autotools: some more fixes
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".
2010-02-09 20:40:38 +01:00
Patrick Ohly
2ecc7eed1e autotools: gnome-bluetooth + make dist
Because we use DIST_SUBDIRS, *all* directories must be added there
to be considered by "make dist".
2010-02-04 17:31:33 +01:00
Patrick Ohly
06d17572c5 autotools: build GNOME Bluetooth panel plugin (MB #7089)
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.
2010-02-04 16:33:29 +01:00
Patrick Ohly
a3574c27e2 XML config: use configuration composed from fragments (MB #7712)
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>
2010-02-02 21:53:28 +01:00
Patrick Ohly
06b3e7e915 CPPUnit header file dependency for backends (MB #9149)
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.
2010-01-22 10:46:12 +01:00
Chen Congwu
bc1aba2c37 Configuration template: more teaks
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
2010-01-20 14:09:02 +01:00
Chen Congwu
3631052946 Fix link error in linking with test.cpp
Commit 9b20729744 put a newline before test.cpp
which caused the makefile generated missed linking with test.cpp
2010-01-20 14:09:02 +01:00
Chen Congwu
d71aa7b2ac Configuration templates matching: match templates based on metadata
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.
2010-01-19 18:06:20 +01:00
Patrick Ohly
bf8b29f7d9 LCS: Longest Common Subsequence
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.
2010-01-19 17:23:07 +01:00
Patrick Ohly
82494dcd97 Merge branch 'syncevolution-0-9-branch'
Conflicts:
	NEWS
	configure-post.in
	configure-pre.in
	src/Makefile-gen.am
	src/syncevo/Cmdline.cpp
	src/syncevo/SyncConfig.cpp
2010-01-19 16:01:10 +01:00
Patrick Ohly
9b20729744 fixed link error related to CPPUnit
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.
2010-01-19 15:46:02 +01:00
Zhu, Yongsheng
1dd1323f39 DBus server: implement keyring support in dbus server (MB#3602)
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.
2009-12-14 15:18:24 +08:00
Patrick Ohly
92bb59e138 Merge branch 'syncevolution-0-9-branch'
Conflicts:
	src/backends/file/FileSyncSourceRegister.cpp

Conflict because of the "text/x-vcalendar" renaming on
master.
2009-12-09 16:53:51 +01:00
Patrick Ohly
8f1dd1ba95 autotools: cleaned up checking for GNOME/EDS libs (MB #8338)
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.
2009-12-09 16:24:08 +01:00
Patrick Ohly
869ca8d2f4 fixed reading templates from file (MB #8335)
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.
2009-12-01 21:40:01 +01:00
Patrick Ohly
aa13c8446a Merge remote branch 'origin/syncevolution-0-9-branch'
Conflicts:
	configure-pre.in
	src/syncevo/Makefile.am

Version conflict in configure and unrelated changes near
same line in Makefile.
2009-11-30 21:41:53 +01:00
Patrick Ohly
03351afe03 Merge branch 'origin/jku' (early part)
Conflicts:
	src/dbus/interfaces/syncevo-server-full.xml

Conflict due to whitespace changes.
2009-11-30 19:46:12 +01:00
Patrick Ohly
0944e3eda5 installation: templates now in $(datadir)/syncevolution/templates (MB #7808)
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.
2009-11-27 14:43:22 +01:00
tester
b864de3650 syncevo-dbus-server: libsoup compile problem
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.
2009-11-26 15:34:32 +01:00
Jussi Kukkonen
c402bbbe32 fix D-Bus .service file (needed for d-Bus autostart) 2009-11-16 19:07:27 +02:00
Patrick Ohly
08eab6ee8f client-test: unit tests not included when building statically
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.
2009-11-10 14:48:21 +01:00
Patrick Ohly
529c208681 client-test: unit tests not included when building statically
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.
2009-11-05 13:05:30 +01:00
Patrick Ohly
98f83c5b3c syncevo-dbus-server/syncevolution-http-server.py: SyncML HTTP server
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".
2009-10-07 18:15:45 +02:00
Patrick Ohly
ec185613ec syncevo-dbus-server: moved to gdbus with C++ bridge
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.
2009-10-07 18:03:16 +02:00
Patrick Ohly
7e558b23a2 gdbus: compile the gdbus utility library
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.
2009-10-07 16:11:02 +02:00
Chen Congwu
35ee636619 Dynamic loadable backends: repackage libsyncevolution to enable dynamic loadable backends
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.
2009-09-23 07:35:25 +02:00
Zhu, Yongsheng
54c7f159fb command line: add keyring support (MB#3604)
--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.
2009-09-21 10:10:28 +02:00
Patrick Ohly
d17476a172 src/Makefile: fixed source file list for client-test
The recent addition of test.cpp didn't take conditional
compilation into account, something that automake warned about.
2009-07-14 11:05:42 +02:00
Chen Congwu
4157ab9b10 Testing: fix a typo, bugzilla #2421 2009-07-14 10:36:34 +02:00