Commit graph

2599 commits

Author SHA1 Message Date
Patrick Ohly
843c34f443 GLibSupport + ActiveSync: fixed compiler warning
gcc -Wall warned about ""dereferencing type-punned pointer will break
strict-aliasing rules" in GLibSupport.h/GListCXX when compiling the
ActiveSync backend.

Work around the issue (or perhaps merely supppress the warning?) by
putting the casting into a separate method.
2011-09-01 12:28:04 +02:00
Patrick Ohly
2f180b8889 autotools: improved ActiveSync rules
Use $(SYNCEVO_WFLAGS), wrap help text. Thanks to Krzesimir for
pointing this out.
2011-08-31 12:13:25 +02:00
Patrick Ohly
09e3f239b8 autotools: fixed building of syncevo-webdav-lookup
This must be a symbolic link into the backend's source directory. Need
the full path here, for out-of-tree compilation. Installing
syncevo-webdav-lookup will then turn it into a regular file.
2011-08-31 12:11:19 +02:00
Patrick Ohly
aee2ec8107 ActiveSync: ported to non-recursive Automake 2011-08-31 09:00:43 +00:00
Krzesimir Nowak
a7ad98fabc Port build system to non-recursive Automake.
All but toplevel Makefile.am are replaced with their non-recursive
counterparts. The generation of configure.in was removed (and thus
configure-{pre,post}.in are also removed) in favor of configure.ac
and m4 macros adding backend specific configure parts.

Version number is generated like in old build system.

There are still many things to improve, but for now there are no
immediate regressions. AUTOTOOLS-TODO contains a list of possible
improvements and fixes. AUTOTOOLS-TESTING contains what was tested
with current build system (configure flags, make options).
2011-08-30 16:38:34 +02:00
Patrick Ohly
9678164d27 NotifyBackendLibnotify: avoid compiler warning about unused NotFound()
NotFound() is only needed when compiling with increased binary
compatibility mode, moved into #ifdef section.
2011-08-30 08:28:57 +00:00
Patrick Ohly
7d12eaf3a5 Akonadi: fix link issues on Debian Testing
Several required libraries were not linked to directly, which leads to
linker issues with binutils/ld on Debian Testing.
2011-08-30 08:28:57 +00:00
Patrick Ohly
8cc2211845 ActiveSync: enabled compilation
Off by default, --enable-activesync enables it.
Needs libeassync.pc.
2011-08-30 09:18:39 +02:00
Patrick Ohly
57ab479c2c ActiveSync: set "sourceLUIDsAreVolatile"
Client::Source::eas_event::TestLinkedItems failed because it made the
assumption that LUIDs are the same for all clients. With ActiveSync
they are not (get renumbered in the initial sync), so this particular
aspect of the tests has to be disabled.

activesyncd commit ID:
fc5994fe8cc9a9d253501527a98f49f4eea8e445
2011-08-30 09:18:39 +02:00
Patrick Ohly
3fb674e3e2 ActiveSync: use target-config@client-test-exchange for Client::Source
SyncEvolution has changed how it finds config in the commit quoted
below. Adapted README accordingly.

commit 24efbe11db
Author: Patrick Ohly <patrick.ohly@intel.com>
Date:   Mon Aug 15 17:32:01 2011 +0200

testing: use target-config@client-test-$CLIENT_TEST_SERVER for Client::Source

For testing sources instantiated via SyncSource.cpp (for example, EDS)
and client-test-app.cpp (ActiveSync) append the name of the server set
via the CLIENT_TEST_SERVER env variable to target-config@client-test,
separated by a hyphen.

This allows configuring testing differently for different servers.
Was already done for CalDAV sources, inside WebDAVSourceRegister.cpp.

activesyncd commit ID:
6b1cf2b557e6eb3c9df9c454d0388932d10b631a
2011-08-30 09:18:39 +02:00
Patrick Ohly
3014fe0497 ActiveSync: check for unexpected NULL pointers (BMC #22048)
There have been cases where libeassync returns NULL pointers
without an error. This caused crashes in SyncEvolution. Now
SyncEvolution checks all plain C pointers for NULL and (when
a non-empty string is expected) also for the empty string.

activesyncd commit ID:
2a8dd3d7a263bccf7bbf0a2a7623072a909c5c7b
2011-08-30 09:18:39 +02:00
Patrick Ohly
598aa44595 ActiveSync: also support moreAvailable in calendar source
Same logic as in ActiveSyncSource.cpp. Slightly shorter by
replacing the explicit reset() of the lists with variables
local to the loop body.

Same change made also in ActiveSyncSource.cpp.

Looping can be tested with CLIENT_TEST_NUM_ITEMS=101
Client::Source::eds_event/contact::testManyChanges. A value <= 100
works fine also without looping.

activesyncd commit ID:
73b3ba26b471638945e50caabfba5d8ba7b920c2
2011-08-30 09:18:39 +02:00
Salvatore Iovene
fd6ca45ec7 ActiveSync: allow retrieval of items beyond the single-call window.
eas_sync_handler_get_items has a window (currently set at 100 items),
and a "more_available" value that's returned if there are more items
available than it's able to retrieve in one call. This patch uses this
value and loops the _get_items function as long as there are items.

activesyncd commit ID:
f02e8352c371eb47ac4fb9ba447d1cdba541bf1c
2011-08-30 09:18:39 +02:00
Patrick Ohly
56e4d0a949 ActiveSync: check for NULL result from eas_sync_handler_new()
Use the eptr NULL checking feature by naming the instance
which is meant to be allocated. eas_sync_handler_new() can
fail, for example when there is no D-Bus session.

activesyncd commit ID:
ab41778008cf1a2f5e1e10f9111e7fe2221e5395
2011-08-30 09:18:39 +02:00
Patrick Ohly
3e5f9f8e99 ActiveSync: include syncURL in README
Configuring the target config requires an empty syncURL.

activesyncd commit ID:
1e711580706dc6f4c4f9200620e6c4b102a44c62
2011-08-30 09:18:39 +02:00
Patrick Ohly
f18e1905e8 ActiveSync: updated README
Added comment about "device_id".

activesyncd commit ID:
0851a219961b1f259256b06d2597aaa77e010783
2011-08-30 09:18:39 +02:00
Patrick Ohly
63afeb0723 ActiveSync: must retrieve existing item before updating it
The calendar data must be loaded before it can be updated. The
special case of overwriting an event worked, updating didn't.

activesyncd commit ID:
e54c5fe29376ef6478ff3be837c43e04f8e1f138
2011-08-30 09:18:39 +02:00
Patrick Ohly
063315da05 ActiveSync: improved testImport for ActiveSyncCalendarSource
Instead of reading individual VEVENTs through
ActiveSyncCalendarSource, go directly to the activesyncd via
ActiveSyncSource. That cuts out the middle-man and will help
to reveal bugs in it.

activesyncd commit ID:
ddefe1cfe9e92948b6d1dd4779b259a11c184341
2011-08-30 09:18:39 +02:00
Patrick Ohly
ee0d351843 ActiveSync: fixed testImport test
The testImport test must write all existing items into a file for
comparison. Normally this is done with the backup backend operation,
which does not exist with the ActiveSync backend.

This commit adds a version specifically for that backend. DumpItems()
assumes that item meta data was updated correctly and then reads their
data via ActiveSync[Calendar]Source::readItem() = eas_sync_handler_fetch_item().

Note that this is unnecessarily complex for ActiveSyncCalendarSource:
it reads single VEVENTs, parsed by ActiveSyncCalendarSource, instead
of writing the VCALENDAR produced by activesyncd directly as for ActiveSyncSource.
Will be fixed in the next commit.

activesyncd commit ID:
c788aa464dd866fcb5eaac27533bd53ff1aa5c84
2011-08-30 09:18:39 +02:00
Patrick Ohly
8e36af6a9b ActiveSync: read existing items with eas_sync_handler_fetch_item()
Sometimes items are needed by SyncEvolution which were not already sent
by the server (full item dump for testing, updating meeting series, ...).
ActiveSyncSource::readItem() now calls eas_sync_handler_fetch_item()
to get the data for items which which are not cached.

activesyncd commit ID:
d747cf15f40bb5f71175275e6961febfac42b6a6
2011-08-30 09:18:39 +02:00
Patrick Ohly
f0b22a0750 ActiveSync: map multiple VEVENTs with the same UID into the same ActiveSync item
The new ActiveSyncCalendarSource wraps the generic
ActiveSyncSource. It takes single VEVENTs per item and maps them to
ActiveSync items which combine all VEVENTs sharing the same UID.

The code is a combination of MapSyncSource and CalDAVSyncSourc. It
would have been nice to do this without duplicating code, but that
would have implied some pretty heavy core refactoring in code which is
currently in code freeze for SyncEvolution 1.2.

The new backend passes for the same tests as before. It fails for
those cases where ActiveSyncCalendarSource needs to do a partial
update of an ActiveSync item that was not modified on the server. In
that case, the item data is never sent to the client and with the
current activesyncd API it cannot retrieve the data on demand either.

ActiveSyncSource::readItem() needs to be extended. Right now it fails
with "internal error: item data for <eas ID> not available".

activesyncd commit ID:
61285b15a16a52c3c5ad1767047d0ca0ba1f32e8
2011-08-30 09:18:38 +02:00
Patrick Ohly
24665a97c9 ActiveSync: fixed change tracking in testing
When testing with "Client::Source::*::testChanges", two different
accounts must be used. Otherwise the two simulated SyncEvolution
clients share the same sync keys and testing fails.

The solution is to switch to a different account, derived by appending
_B to the original account ID, for the second client.

With this fix, the testing continues. But it also needs change in
client-test itself: "testChanges" had a check that all items can be
read, which is not the case for ActiveSync because there unmodified
item data is not available.

activesyncd commit ID:
6300b3ea9184e114b521ef2e5eafda476c836e5c
2011-08-30 09:18:38 +02:00
Patrick Ohly
b07b80677c ActiveSync: enable client-test testing
The test framework itself attempts to use named databases, but because
that isn't currently supported, the first database is mapped to the
default database in the ActiveSync backend. For ActiveSync testing,
one database is enough to run all tests.

See README for instructions.

activesyncd commit ID:
cb40467f138b6d5c65007351a10cb243b5eff6c2
2011-08-30 09:18:38 +02:00
Patrick Ohly
d357d1d0e6 ActiveSync: backend type must be set for testing
Creating configs by client-test must know the right backend value.
Adding it for events, tasks and memos.

activesyncd commit ID:
cda470c2277e9dd63652b9fd1cbf762c851a13fd
2011-08-30 09:18:38 +02:00
Patrick Ohly
08b410f423 ActiveSync: fixed handling of "deleted items" server information
The libeassync API was clarified to use plain strings for deleted
items instead of EasItem pointers. This commit adapts the
ActiveSyncSource::beginSync() method accordingly.

activesyncd commit ID:
2d09e206b50ea3f001da15f47fabfa339cbbd468
2011-08-30 09:18:38 +02:00
Patrick Ohly
fd6c14c8aa ActiveSync: fix for "fixes for deleting items"
Removed g_debug() because it is not used in SyncEvolution and added
missing initialization of local variable.

activesyncd commit ID:
7ee457d4f8fe8c67103bd51849f0cb23643e329b
2011-08-30 09:18:38 +02:00
Andy Gould
f3d55e14a4 ActiveSync: fixes for deleting items
Updated dbus calls to use gchar** rather than GSList, and changed
SyncEvo Backend to pass list of IDs rather than list of EasItems.
Also made delete req handle default folders

activesyncd commit ID:
6ed2f2154544e95ea99aee12d95f2dd37a19c653
2011-08-30 09:18:38 +02:00
Patrick Ohly
2d0097a2b3 ActiveSync: fixed change tracking
ActiveSyncSource was meant to keep track of all existing items across
sessions. That part had only been implemented partially: reporting all
existing items with "addItem(ANY)" was missing and the list of ids was
neither updated nor flushed.

activesyncd commit ID:
acc6a50d30939426867932037c096ab233c6a5d4
2011-08-30 09:18:38 +02:00
Patrick Ohly
81d73aa203 ActiveSync: avoid "[ERROR] calendar: no database to synchronize"
The command line checks that a source has databases available.
That means that ActiveSyncSource::getDatabases() must at least
return one entry for the default database.

activesyncd commit ID:
6a95a911f2660fab7bea916e3607fa616b4e8b1e
2011-08-30 09:18:38 +02:00
Patrick Ohly
a8f9440837 ActiveSync: updated README
source-config was renamed to target-config. Sources must be selected
explicitly when configuring target config.

activesyncd commit ID:
11d9ac9c7ef39ffc4f5471efad43a8de9603110d
2011-08-30 09:18:38 +02:00
Andy Gould
66956d4d76 ActiveSync: small fix in syncevo backend to sync key handling during updates
activesyncd commit ID:
c99f0f6de55ab78773b5abd91804059310ebdd09
2011-08-30 09:18:38 +02:00
Andy Gould
31f3290fdb ActiveSync: fixing adding items
activesyncd commit ID:
37b89e82dd25ce43687e9a7dce868d7b0c62d609
2011-08-30 09:18:38 +02:00
Andy Gould
12aa37d5ca ActiveSync: changes to improve syncevolution backend
handle empty strings, and change backend to use separate in/out sync keys

activesyncd commit ID:
ce82af28c32f7150cd14062a01c6a401c511c688
2011-08-30 09:18:38 +02:00
Salvatore Iovene
7ab438596a ActiveSync: fixed typos.
activesyncd commit ID:
be4a5c5624d3974739af83bd68bde0be919fcb6a
2011-08-30 09:18:38 +02:00
Patrick Ohly
054f1f157e ActiveSync: fixed naming of tasks
The test cases are named eds_task, not eds_todo.

activesyncd commit ID:
b383d4795397a35be1902b1cbdda5208ac3fe6e9
2011-08-30 09:18:38 +02:00
Salvatore Iovene
f2ebf0befe ActiveSync: fix compilation error.
Ignoring the argument to the function right now, probably getting
back on it later when testing.

activesyncd commit ID:
4862d576ce405a253d45808f27a1af0a575ca6d6
2011-08-30 09:18:38 +02:00
Salvatore Iovene
4abe883d49 ActiveSync: more explicit check for config.h
Don't depend on config.h being included indirectly.
2011-08-30 09:18:38 +02:00
Salvatore Iovene
a4ce729e6e ActiveSync: port to current libeassync API.
Note: this is just to make things compile; it won't necessarily
work.

activesyncd commit ID:
b6547681646bfde3ee537e47f808d59c948e0c5e
2011-08-30 09:18:38 +02:00
Patrick Ohly
01f890e092 ActiveSync: code is complete
Implemented all functions. Might work now, but everything is untested.

activesyncd commit ID:
b238cd435679458ace9c1a69a24aa636862d25f4
2011-08-30 09:18:38 +02:00
Patrick Ohly
55f0789c4a ActiveSync: use activesyncd header files
After adding the missing G_END_DECLS in libeassync.h it is possible
to use the header files by specifying the paths explicitly in
configure.

activesyncd commit ID:
3557477ad79c0113a2a3f7ea3b250cf5ff4ac020
2011-08-30 09:18:38 +02:00
Patrick Ohly
6ba4b8680d ActiveSync: boiler plate code with empty function bodies
Compiles inside SyncEvolution, see README.
Sync session and design outlined in the ActiveSyncSource.h
header file for the main class, ActiveSyncSource.

activesyncd commit ID:
ec8071ae67c107f32305c6d47f176210421c17c7
2011-08-30 09:18:38 +02:00
Patrick Ohly
1f3f3bdd53 D-Bus server: fix g++ 4.4 on x86 compiler warning
The boost::is_any_of() bug with "array index out of bounds" showed up
again. Could have worked around it as in other cases before (with
boost::is_from_range()), but let's use the simpler boost::tokenizer()
instead because it is shorter.
2011-08-29 15:59:22 +00:00
Patrick Ohly
91c64f769c syncevolution.org binaries: fix libnotify compatibility mode, part II (BMC #22668)
One more problem showed up in the nightly testing: if a recent
libnotify is installed, then our notify_notification_new()
wrapper (which always has four arguments) was only called with
three. Caused a compiler warning/error.
2011-08-29 15:59:21 +00:00
Patrick Ohly
e45e308806 testing: introduced ClientTestConfig::sourceLUIDsAreVolatile
Necessary for LinkedItem tests when applied to ActiveSync. In that
case, items are renumbered as 1:x with x = 1, 2, ... for each clients
when a sync anchor is assigned to it, and therefore the LUID
comparisons/searches fail although everything is okay.
2011-08-29 13:56:26 +02:00
Patrick Ohly
a212ba3262 autotools: added missing src/dbus/server header files
Several more recent header files were missing, causing "make
distcheck" to fail.
2011-08-29 08:46:25 +02:00
Patrick Ohly
41c08af6a6 D-Bus test: make TestDBusServer.testGetConfigsTemplates pass regardless of the environment
The test used to fail if the user running the test had SyncML capable
devices paired via Bluez. Now the BluezManager is told to not use
Bluez in this particular test.
2011-08-26 15:04:17 +02:00
Patrick Ohly
197f9386fc BluexManager: fixed compile problem
The explicit m_lookupTable initialization in the constructor was at
the wrong place, causing a gcc warning about initialization ordering
not being as written.

Remove the redundant initialization. The default constructor will be
called anyway.
2011-08-26 15:02:45 +02:00
Patrick Ohly
5223698b03 SyncConfig: fixed typo in Bluez patch
std:string was accepted because it looks like a label. gcc warned
about the unused label.
2011-08-26 15:00:05 +02:00
Chris Kühl
329dd17352 server: Add file monitor to watch for changes in Bluetooth lookup table 2011-08-26 14:23:41 +02:00
Chris Kühl
d41a28378c testing: Added some simple tests for Bluetooth devices 2011-08-26 14:23:41 +02:00