Commit graph

2127 commits

Author SHA1 Message Date
Chen Congwu
fd013f4428 Server alerted sync + client: matching against bluetooth mac address 2010-01-19 16:11:47 +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
Patrick Ohly
e90cf23f05 set version to 0.9.1+0.9.2
This is only a pre-release of 0.9.2...
2010-01-19 15:45:34 +01:00
Patrick Ohly
77917af3a3 NEWS: updated for 0.9.2 2010-01-19 14:04:06 +01:00
Patrick Ohly
4c1cb02524 ScheduleWorld: changed webURL
As requested by Mark, the webURL was changed from
sync.scheduleworld.com to www.scheduleworld.com, which is the
official entry point for browerser. IMHO sync.scheduleworld.com
has always worked, though, and currently still does.
2010-01-18 21:58:31 +01:00
Patrick Ohly
10011c6f20 Goosync: added template (MB #9113)
Goosync provides access to Google calendar, tasks and contacts
via SyncML. Google itself only supports contacts. Memos are not
supported by either of them.

This patch only adds the template with the necessary configuration
parameters. We have done no testing with the service, so it is
not marked as "consumer ready" at this time.
2010-01-18 10:13:07 +01:00
Patrick Ohly
531110040f Oracle: added template
The template uses an unspecific "https://your.company/mobilesync/server"
syncURL. The hope is that users just have to replace "your.company"
in many cases.

https is chosen because apparently, many installations are restricted
to that.
2010-01-18 10:13:07 +01:00
Patrick Ohly
3bf05d0284 updated for 0.9.2 2010-01-18 10:13:07 +01:00
Patrick Ohly
f17c19ca72 build issue: icalproperty_remove_parameter_by_kind in EDS wrapper
The recent fix for extracting broken calendar events introduced
icalproperty_remove_parameter_by_kind(), which has to be added to
the EDS wrapper to avoid hard library dependencies.
2010-01-15 20:39:43 +01:00
Patrick Ohly
7c94b18341 autotools: fixed 'make dist' error cause by doc-pak
doc-pak is no longer needed, now we install docs via
docdir.
2010-01-15 20:27:20 +01:00
Patrick Ohly
7cd7c9fc48 SoupTransportAgent: event handling
When an instance was deleted while it had a pending message and
active timeout/abort events, those event sources were not removed.
Using the new smart pointer type for GLib event handles avoids that.

According to the documentation, a handle is always > 0, so initializing
it with 0 as GLibEvent is more appropriate than the -1 used previously
in the code here.

There might still be one problem left: what if wait() is left by
throwing an exception? Should the two event sources be cleared in that
case?
2010-01-15 17:32:21 +01:00
Patrick Ohly
2e62210f5c SyncML server: timeouts for unresponsive clients (MB #7710)
A SyncML server cannot resend a message. With HTTP, a reply simply
cannot be sent, for other transports the D-Bus API doesn't support it.
Therefore RetryInterval is ignored and only RetryDuration is used as
the final timeout after which the session is aborted.

The same transport callback is used for client and server. It was
changed to log the timeout duration (sent in via its parameter). The
rest of the logic is in the caller of TransportAgent::wait().

While touching the timeout code in initSAN(), the resending of the SAN
message was removed. This makes the code consistent with the HTTP
SyncML client case, where the initial message is also not resent.

The new test-dbus.py TestConnection.testTimeoutSync covers thus timeout
handling. It depends on setting RetryDuration to 10 in the server-side
config of the sc-api-nat device.
2010-01-15 17:32:21 +01:00
Patrick Ohly
650e730b91 DBusTransportAgent: support message timeout
The timeout will be needed for connections to clients which stop
sending messages or died without telling the server stub (HTTP
server). A test will be added once the server mode properly supports
such timeouts.

When the timeout is triggered, we need to get out of the
g_main_loop_run() called indirectly by DBusTransportAgent::wait(). We don't
want to interfere with other calls to that function, so g_main_loop_quit()
is only called when waiting in the agent. Otherwise the timeout is
remembered and reported the next time wait() is called.

The "cancel on false from callback" feature is not implemented. It is not
used and thus would be impossible to test. Remove this feature?
2010-01-15 17:32:21 +01:00
Patrick Ohly
fc837bcd61 TransportAgent::setCallback(): comment clarification about how often it is called
The previous comment about "called every interval seconds" was a bit misleading.
The callback is invoked at most once per message send.
2010-01-15 17:32:21 +01:00
Patrick Ohly
5f5b559978 SmartPtr: allow tracking of non-pointer objects
A GLib guint event handle can be compared to 0 (the invalid handle),
just like a pointer. Previously, eptr didn't support this because the
template was parameterized with a class and then used pointers to it.

This patch changes the base template so that both pointers and
integral types can be tracked. The base template was renamed to
SmartPtr. eptr became a source compatibility class with the previous
"track pointers" semantic.

GLibEvent is a specialization which uses g_source_remove() to free
the event associated with a guint handle.
2010-01-15 17:32:14 +01:00
Rajyalakshmi Bommaraju
6c0292b9f9 syncclient_sample_config.xml: create fullname if empty (MB#5664)
Creates fullname from name components if fullname is not sent.
First, middle, and last name may be empty.
2010-01-15 17:06:00 +01:00
Patrick Ohly
bf7b9252a8 syncevolution --status: statistics empty (MB #9097)
I just noticed that the statistics table had "0" for all cells, despite having
local changes and items.

This broke during the backend API migration towards Boost function pointers.
The implementation in TrackingSyncSource did not have enough parameters and did
not fill the SyncSourceReport passed in as parameter with the values.

I'm not sure why the old code compiled, I would have expected type errors
because boost::bind() with only "this" as parameter should not have matched
m_checkStatus. Anyway, now the item counts are copied into the report.
2010-01-15 17:04:03 +01:00
Zhu, Yongsheng
6fe9e0ed2b DBus server: clear 'waiting' status when sync is done (MB#9065)
There might be exceptions or other problems making sync completed
unnormally without setting 'waiting' as false. So we always set
the 'waiting' as false since sync is done and no longer waiting
any I/O events anymore.
2010-01-14 13:41:21 +01:00
Patrick Ohly
65b4803842 SyncConfig::removeSyncSource(): did not remove sources inside peers (MB #9065)
It scanned "peers" inside the top .config/syncevolution directory
instead of looking inside the current context. This showed up as
failure in test-dbus.py testSourceRemovalGlobal.
2010-01-13 18:01:21 +01:00
Patrick Ohly
790a17b883 client-test: use independent context for testing sources
SyncSource::createTestingSource() has to create sources using a
default configuration. It did that by using the "testing" config name.
Since introducing shared configs, that config happened to use shared
source properties from the "default" context.

This broke testing on my laptop after setting "evolutionsource" for a
specific peer in that context. Now "testing@testing" is used as config
name, which should be unique again.
2010-01-13 16:52:37 +01:00
Rajyalakshmi Bommaraju
723a37af1e SyncConfig: Read http_proxy from environment (MB#8177)
libsoup does not use http_proxy set in environment. SyncConfig reads
http_proxy from environment and returns it. If it is not avilable in
the environment, then configured value is returned.

"http_proxy" set to an empty value disables the use
of a proxy.
2010-01-11 19:11:11 +01:00
Patrick Ohly
18f2715760 autotools: added workaround for lack of --with-docdir
Older automake doesn't have --with-docdir and thus no
way of installing our docs in that dir. As a workaround,
check right before generating Makefiles whether $docdir
is empty and set it if necessary.
2010-01-11 18:15:10 +01:00
Rajyalakshmi Bommaraju
9b823e2979 Evolution calendar: work around 'cannot encode item' problem (MB #7879)
This happens for corrupt calendar data where a VEVENT refers to a
VTIMEZONE that is not available. Work around this by removing the
broken TZID in case of failure, then retrying the encoding.

This treats such events as if they were using local time without
timezone information, which is also how the Evolution GUI deals
with such events. It is correct as long as users only deal with
such broken events in their own timezone.
2010-01-11 18:10:13 +01:00
Patrick Ohly
089327f448 TrackingSyncSource: clarify what "raw" means
Added some additional comments to the "raw" parameter,
explaining that a source may use this if it wants to,
but doesn't have to.
2010-01-11 18:02:58 +01:00
Patrick Ohly
92cd111d13 EvolutionCalendarSource: fixed typo in "type" description
There was one dangling closing bracket after "text/calendar".
2010-01-11 18:02:45 +01:00
Zhu, Yongsheng
4defdd5f09 Config: add support for 'X-SKYPE' for evolution (MB#8948)
Add a field 'X-SKYPE' for the latest evolution has
this new field. Only one parameter is supported now:
X-EVOLUTION-UI-SLOT.
2010-01-07 13:47:26 +08:00
Zhu, Yongsheng
b6b8498d79 synccompare: fix regressions of mobical interoperability test
Mobical has many regressions due to 'priority' property.
Mobical doesn't send 'priority' when its value is '0'. This has
been recorded in the README.mobical. The root cause of regressions
is due to changes in synccompare for nokia_7210c.

'=~' is miswritten as '= ~' so $nokia_7210c is always true, thus
it changes all priority values into '[...]'. As a result, removal
of 'priority:0' won't happen. This causes the comparisons failed.
2010-01-07 13:35:17 +08:00
Chen Congwu
94f2a8ffd1 Build: do not depend on cppunit for backends
remove the hard dependency from the backends make file, set
ENABLE_INTEGRATION_TESTS in config.h by autoconf.
2010-01-06 14:54:08 +08:00
Chen Congwu
9aad6cee43 Build: do not depend on cppunit for backends
remove the hard dependency from the backends make file, set
ENABLE_INTEGRATION_TESTS in config.h by autoconf.
2010-01-06 13:21:11 +08:00
Chen Congwu
18452a8a9c Retry: do not retry for the first request, MB#8758 2010-01-06 13:15:18 +08:00
Chen Congwu
615c2fc3bb ObexTransportAgent: Error handling improvements
Nokia N900 fail the transport during read() or write() inside HandleInput, the
original logic shows not clear error information.
2010-01-05 14:52:04 +08:00
Chen Congwu
52ae36a6e5 Datastore name alias, MB#7871
Adding "alias" tag for each datastore and setting the URI as the value, this is
only used for server mode.
2010-01-05 14:51:59 +08:00
gforcada
4b05e675ff l10n: Added Catalan translation
Transmitted-via: Transifex (translate.moblin.org)
2010-01-02 05:27:50 -08:00
gforcada
1794126025 l10n: Added Catalan translation
Transmitted-via: Transifex (translate.moblin.org)
2010-01-02 05:26:41 -08:00
Zhu, Yongsheng
ec578da117 Testing: fix the failures of Session.SetConfig related 2 cases
The reason is that the update config contains 'password', which
save passwords in keyring. Usually, it pops up a dialog which
prevents testing. Change update the property from 'password' to
'username'.
2009-12-29 11:23:47 +08:00
Zhu, Yongsheng
c09e17d90c DBus server: use temporary configs for GetConfig(MB#8116)
In Session.GetConfig, when checking whether a given config exists,
configs set temporarily should be concerned. Otherwise, the given
config will be treated as a non-existing one though it has been
set temporarily.
Previous implementation only applies temporary configs when the config
exists on disk. This is not expected.

Also write a test case(testGetConfigWithTempConfig) for this scenario:
first set up a config with temporary configs, and then call GetConfig
to get configs from it. This will be failed in the previous version and
successful now.
2009-12-29 11:23:46 +08:00
zerng07
8006946129 l10n: Updates to Chinese (Taiwan) (zh_TW) translation
Transmitted-via: Transifex (translate.moblin.org)
2009-12-28 04:17:38 -08:00
Zhu, Yongsheng
ace03a0e9e Testing: add one unit test for InfoRequest/InfoResponse (MB#6376)
The test case will check the password and ask it from dbus clients.
The test follows the working flow to send response to dbus server.
There might be a gnome-keyring-ask process popped out for dbus server
will ask password from gnome-keyring first. To remove this problem,
a timeout function is regularly called and kill that process to force
dbus server sending request to dbus clients.
2009-12-25 13:08:13 +08:00
Zhu, Yongsheng
5a49d6dd24 DBus server: implement info request for password (MB#6376)
Send info request when dbus server can't get password and have to
dbus clients' assistant.
2009-12-25 13:08:12 +08:00
Zhu, Yongsheng
6e9b26a212 DBus server: implement InfoRequest and InfoResponse (MB#6376)
Implement the info exchange mechanism when the dbus server wants
any information that only dbus clients can provide.

The dbus server uses the class 'InfoReq' to handle the requested
information from it and get response from dbus clients. The main
processing logic is referred to dbus api document.

To allow multiple info requests, the DBusServer uses a map to manage
all pending info requests and dispatches responses to the corresponding
info request. Also DBusServer.createInfoReq() is provided to create
info requests.

For InfoRequest callers, A series of methods in 'InfoReq' are provided:
check - check whether the required response is gotten
cancel - cancel the info request
wait - wait until timeout, abort or suspend
getResponse - get the response result provided by dbus clients.

All methods here are asynchronous except 'wait', which waits for
response explicitly.
2009-12-25 13:08:12 +08:00
Zhu, Yongsheng
1d309f51af DBus server: add source status and progress for restore (MB#8144)
Generate and send source statuses and progress to dbus clients.
For source modes in statuses, 'restore-from-backup' is sent once
a source is restored. For progress, the granularity is source level.
Thus, the progress is simply calculated based on the number of
sources and how many of them that have been completed.

To report source status and progress, SyncContext::restore
should have a mechanism to give out events to dbus server.
Here 'displaySourceProgress' is re-used. Some synthesis events are
simulated in restore. To follow up the way of 'displaySourceProgress',
a pseudo mode 'SYNC_RESTORE_FROM_BACKUP' is defined for source sync
mode. This is treated as a special sync mode only for restore from
backup.

Also add test code in testRestoreByRef to check source
status and progress.
2009-12-25 09:42:06 +08:00
Zhu, Yongsheng
419199562f Testing: change an issue of restore tests (MB#8144)
"setupFiles" should be called firstly before others, for
it will clean up xdg_root directory. Thus 'setupConfigs'
won't take effect for its flushed results will be wiped
out by "setupFiles".
2009-12-25 09:42:06 +08:00
Chen Congwu
25a525adb1 ObexTransportAgent: fix typos 2009-12-24 12:10:22 +08:00
Chen Congwu
93fbb09b49 ObexTransportAgent: signal handling bug fixed.
Fixed some signal handling problems:
1) Save the underlying resource before calling cancel() avoiding a segfault.
2) Abort directly without sending the Disconnect cmd.
2009-12-24 10:58:39 +08:00
Chen Congwu
53a92ac50b ObexTransport: Do not fail directly if SIGINT is caught by underlying select.
The underlying openobex library will fail directly during select() if SIGINT is
delivered. Since we already handle SIGINT in application layer, do not fail in
the transport layer.
Checking SoupTransportAgent and CurlTransportAgent both have same mechanism
built in the library layer.
2009-12-24 10:58:39 +08:00
Chen Congwu
19d32c41c4 AutoConf: Bluetooth transport build option
Added --enable-bluetooth let the user explictly enable bluetooth, in this case
the configure process will fail if the dependent library is not installed.
If the option is not set, bluetooth is enabled by default anyway; however if
user don't have necessary library installed it will not attemt to built with
bluetooth support.
Added a summary to display whether the bluetooth support is enabled.
2009-12-24 10:58:38 +08:00
Chen Congwu
f5ea99d2f1 ObexTransportAgent: block while waiting for mainloop events 2009-12-24 10:58:38 +08:00
Jussi Kukkonen
3b73cb1c6d gtk-ui: init sync time to -1 ("not known") 2009-12-22 10:35:52 +02:00
Zhu, Yongsheng
4cf3d3256d Testing: add 2 test cases for Session.Restore(MB#8144)
2 test cases are added to test Session.Restore.
1) testRestoreByRef: test restore with the data before
and after a given session
2) testSecondRestore: test restore with an inactive
session. The right error should be thrown.
2009-12-22 10:55:58 +08:00