Import Debian changes 1.5.3-1
syncevolution (1.5.3-1) unstable; urgency=medium . * New upstream release * Fix override_dh_makeshlibs to handle all packages with public shared libs (Closes: #887043) * Remove obsolete Conflicts:/Breaks:/Replaces: sync-ui (<<1.1+ds1-1~) * Change debhelper compatibility to 11, which is recommended * Bump standards version to 4.1.3, no changes needed * Fix several lintian warnings
This commit is contained in:
commit
22449d72c0
3
HACKING
3
HACKING
|
@ -44,9 +44,10 @@ The test framework also requires CPPUnit:
|
|||
|
||||
For the GUI and its D-Bus based service backend:
|
||||
apt-get install xsltproc \
|
||||
libdbus-glib-1-dev \
|
||||
libglib2.0-dev \
|
||||
libgtk2.0-dev libglade2-dev \
|
||||
libgnome-keyring-dev \
|
||||
libsecret-1-dev \
|
||||
libgconf2-dev libgnomevfs2-dev
|
||||
|
||||
Optional packages for GUI:
|
||||
|
|
13
Makefile.am
13
Makefile.am
|
@ -132,7 +132,7 @@ TYPE_rpm = -R
|
|||
# - same for kdepimlibs5 -> libakonadi-kde4
|
||||
# - kdebase-runtime became kde-runtime in Debian Wheezy
|
||||
REQUIRES_SED_KDE = -e 's/kdelibs5 ([^,]*),/kdelibs5 | libkdeui5,/g' -e 's/kdepimlibs5 ([^,]*),/kdepimlibs5 | libakonadi-kde4,/g' -e 's/kdebase-runtime/kdebase-runtime | kde-runtime/g'
|
||||
REQUIRES_deb = --requires="'$(shell set -x; cd checkinstall/dist; LD_LIBRARY_PATH=$(distdir)/usr/lib:$(distdir)/usr/lib/syncevolution dpkg-shlibdeps -L$(srcdir)/src/shlibs.local --ignore-missing-info -O $$(for i in $$(find $(distdir) -type f -perm /u+x | grep -v -e client-test -e lib/syncevolution/backends/); do if file $$i | grep ELF >/dev/null; then echo $$i; fi; done) | sed $(REQUIRES_SED_KDE) -e 's/[^=]*=//')$(REQUIRES_deb_neon)$(REQUIRES_deb_ical)'"
|
||||
REQUIRES_deb = --requires="'$(shell set -x; cd checkinstall/dist; LD_LIBRARY_PATH=$(distdir)/usr/lib:$(distdir)/usr/lib/syncevolution dpkg-shlibdeps -L$(EXTRA_SHLIBS_LOCAL) --ignore-missing-info -O $$(for i in $$(find $(distdir) -type f -perm /u+x | grep -v -e client-test -e lib/syncevolution/backends/); do if file $$i | grep ELF >/dev/null; then echo $$i; fi; done) | sed $(REQUIRES_SED_KDE) -e 's/[^=]*=//')$(REQUIRES_deb_neon)$(REQUIRES_deb_ical)'"
|
||||
if NEON_COMPATIBILITY
|
||||
# --enable-neon-compatibility in src/backends/webdav:
|
||||
# replace dependencies from linking with hard-coded dlopen() dependencies
|
||||
|
@ -238,7 +238,7 @@ syncevolution-%-deb: checkinstall/dist/$(distdir) checkinstall/dist/debian/contr
|
|||
$(SYNCEVOLUTION_$*_DEB_ARGS) \
|
||||
--pkgname=syncevolution-$* \
|
||||
--pkgarch=all \
|
||||
--requires="'$(shell set -x; cd checkinstall/dist; LD_LIBRARY_PATH=$(distdir)/usr/lib:$(distdir)/usr/lib/syncevolution dpkg-shlibdeps -L$(srcdir)/src/shlibs.local --ignore-missing-info -O $$(for i in $(patsubst %,$(distdir)/usr/lib/syncevolution/backends/%.so,$(PLATFORM_FILES_$*)); do if file $$i | grep ELF >/dev/null; then echo $$i; fi; done) | sed $(REQUIRES_SED_KDE) -e 's/[^=]*=//'), $(PKGNAME) (= $(VERSION_deb)-$(RELEASE))$(SYNCEVOLUTION_$*_DEB_REQUIRES)'" \
|
||||
--requires="'$(shell set -x; cd checkinstall/dist; LD_LIBRARY_PATH=$(distdir)/usr/lib:$(distdir)/usr/lib/syncevolution dpkg-shlibdeps -L$(EXTRA_SHLIBS_LOCAL) --ignore-missing-info -O $$(for i in $(patsubst %,$(distdir)/usr/lib/syncevolution/backends/%.so,$(PLATFORM_FILES_$*)); do if file $$i | grep ELF >/dev/null; then echo $$i; fi; done) | sed $(REQUIRES_SED_KDE) -e 's/[^=]*=//'), $(PKGNAME) (= $(VERSION_deb)-$(RELEASE))$(SYNCEVOLUTION_$*_DEB_REQUIRES)'" \
|
||||
--maintainer="'Patrick Ohly <patrick.ohly@gmx.de>'" \
|
||||
--pkgsource='http://syncevolution.org' \
|
||||
--pkggroup='$*' \
|
||||
|
@ -351,6 +351,7 @@ RUN_SYNCEVOLUTION_CHECK=die if $$?; return $$buffer;
|
|||
endif
|
||||
|
||||
# patch README.rst properties on-the-fly
|
||||
if COND_CMDLINE
|
||||
README.patched.rst: README.rst src/syncevolution
|
||||
$(AM_V_GEN)perl -e '$$syncfound=0; $$sourcefound=0; $$res=0;' \
|
||||
-e 'sub run { $$cmd = shift; $$buffer = `env LD_LIBRARY_PATH=src/syncevo/.libs:src/gdbus/.libs:src/gdbusxx/.libs:src/build-synthesis/src/.libs:$$ENV{LD_LIBRARY_PATH} $$cmd`; $(RUN_SYNCEVOLUTION_CHECK) }' \
|
||||
|
@ -365,6 +366,14 @@ README.patched.rst: README.rst src/syncevolution
|
|||
-e 'die "<<source-property>> tag not in README.rst?!" unless $$sourcefound;' \
|
||||
-e 'exit $$res;' \
|
||||
$< >$@
|
||||
else
|
||||
# Simpler version without inserting the actual sync and datastore properties.
|
||||
README.patched.rst: README.rst
|
||||
$(AM_V_GEN)perl -p \
|
||||
-e 's/^:Version: .*/:Version: $(VERSION)/;' \
|
||||
-e 's/:Date: .*/":Date: " . `date +%Y-%m-%d`/e;' \
|
||||
$< >$@
|
||||
endif
|
||||
CLEANFILES += README.patched.rst
|
||||
|
||||
# produce man pages
|
||||
|
|
60
NEWS
60
NEWS
|
@ -1,3 +1,63 @@
|
|||
SyncEvolution 1.5.2 -> 1.5.3, 03.01.2018
|
||||
========================================
|
||||
|
||||
Maintenance release. syncevolution.org binaries are now getting
|
||||
compiled for distros >= Ubuntu Xenial 16.04 LTS. Usage of deprecated
|
||||
libraries (GNOME keyring) and APIs (SoupAsyncSession) was
|
||||
replaced. libical v3 is supported.
|
||||
|
||||
The code now compiles more cleanly with recent compilers and depends
|
||||
on C++11 support.
|
||||
|
||||
Details:
|
||||
|
||||
* EDS: more generic open retry handling
|
||||
|
||||
Recent EDS started to exhibit race conditions when opening a database (for
|
||||
example, https://bugzilla.gnome.org/show_bug.cgi?id=791306). Opening was
|
||||
already tried again for a certain known error in some old EDS version. Now it
|
||||
is tried five times with a delay of one second for all errors.
|
||||
|
||||
* SoupTransportAgent: require libsoup 2.42, no deprecated methods
|
||||
|
||||
This allows us to get rid of deprecated function calls. We no longer
|
||||
need to set a default proxy either, the newer libsoup does that itself
|
||||
by default.
|
||||
|
||||
* C++: replace auto_ptr with unique_ptr, require C++11
|
||||
|
||||
auto_ptr has been deprecated for a while now. unique_ptr can
|
||||
be taken for granted now, so use that instead.
|
||||
|
||||
* testing: work around Google CalDAV RECURRENCE-ID
|
||||
|
||||
Stand-alone events with RECURRENCE-ID get mangled by the server:
|
||||
it converts the RECURRENCE-ID time to UTC. Reported in:
|
||||
https://stackoverflow.com/questions/47811670/detached-recurrence-without-parent-event
|
||||
|
||||
* GNOME: replace gnome-keyring with libsecret (FDO #104219)
|
||||
|
||||
The GNOME keyring library has been obsoleted for a long time now,
|
||||
long enough that the replacement libsecret is available on all
|
||||
supported distros. Therefore we can switch unconditionally.
|
||||
|
||||
* libical: support libical v3 (FDO #104220)
|
||||
|
||||
libical v3 removes some deprecated functions (like icaltime_from_timet)
|
||||
and removes the "is_utc" member from icaltimetype. The replacement
|
||||
code works with old and new libical and thus needs no ifdefs.
|
||||
|
||||
Original author: Milan Crha
|
||||
|
||||
* syncevolution.org: fixed packaging (FDO #98014, FDO #100549)
|
||||
|
||||
The activesyncd package missing dependencies on libgnome-keyring0 and
|
||||
libglib2.0-bin and therefore failed to work when installed on a minimal
|
||||
system without those.
|
||||
|
||||
* various build and test fixes/workarounds
|
||||
|
||||
|
||||
SyncEvolution 1.5.1 -> 1.5.2, 08.11.2016
|
||||
========================================
|
||||
|
||||
|
|
38
configure.ac
38
configure.ac
|
@ -8,7 +8,7 @@ dnl Invoke autogen.sh to produce a configure script.
|
|||
#
|
||||
# Starting with the 1.1 release cycle, the rpm-style
|
||||
# .99 pseudo-version number is used to mark a pre-release.
|
||||
AC_INIT([syncevolution], [m4_esyscmd([build/gen-git-version.sh 1.5.2])])
|
||||
AC_INIT([syncevolution], [m4_esyscmd([build/gen-git-version.sh 1.5.3])])
|
||||
# STABLE_VERSION=1.0.1+
|
||||
AC_SUBST(STABLE_VERSION)
|
||||
|
||||
|
@ -62,6 +62,14 @@ dnl check for programs.
|
|||
AC_PROG_CXX
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
dnl Use the most recent C++ standard that is supported by the code.
|
||||
dnl We can fall back to older versions, but not below C++11.
|
||||
dnl Akonadi/Qt don't work with C++17 yet, so we can't enable that.
|
||||
AX_CXX_COMPILE_STDCXX_14(noext, optional)
|
||||
if test "$HAVE_CXX14" -ne 1; then
|
||||
AX_CXX_COMPILE_STDCXX_11(noext, mandatory)
|
||||
fi
|
||||
|
||||
# Boost headers: boost/foreach.hpp is needed (1.33/Debian Etch
|
||||
# doesn't have it, 1.34/Ubuntu 8.10 Hardy does). 1.35 is available
|
||||
# as Debian Etch backport.
|
||||
|
@ -70,8 +78,13 @@ AX_BOOST_BASE(1.34)
|
|||
# TODO: Fix code to pass with -pedantic -Wextra.
|
||||
# -Wno-unknown-pragmas needed because icalstrdup.h
|
||||
# currently uses the "#pragma }" trick. Should remove that.
|
||||
# Fix code to work without deprecated methods: G GDK GDK_PIXBUF CAIRO PANGO GTK
|
||||
DK_ARG_ENABLE_WARNINGS([SYNCEVO_WFLAGS],
|
||||
[-Wall -Wno-unknown-pragmas],
|
||||
[-Wall -Wno-unknown-pragmas],
|
||||
[])
|
||||
|
||||
# Fix code to work without deprecated methods: G GDK GDK_PIXBUF CAIRO PANGO GTK
|
||||
DK_ARG_ENABLE_WARNINGS([SYNCEVO_WFLAGS_DEPRECATED],
|
||||
[-Wall -Wno-unknown-pragmas -Wno-deprecated-declarations],
|
||||
[-Wall -Wno-unknown-pragmas -Wno-deprecated-declarations],
|
||||
[])
|
||||
|
@ -223,12 +236,9 @@ else
|
|||
have_libcurl="no"
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(LIBSOUP, libsoup-gnome-2.4,
|
||||
[have_libsoup="yes"
|
||||
AC_DEFINE(HAVE_LIBSOUP_SOUP_GNOME_FEATURES_H, 1, [enable GNOME specific libsoup])],
|
||||
[PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4,
|
||||
have_libsoup="yes",
|
||||
have_libsoup="no")])
|
||||
PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4 >= 2.42,
|
||||
have_libsoup="yes",
|
||||
have_libsoup="no")
|
||||
|
||||
PKG_CHECK_MODULES(LIBOPENOBEX, openobex, have_obex="yes", have_obex="no")
|
||||
have_bluetooth="no"
|
||||
|
@ -477,6 +487,18 @@ AC_ARG_ENABLE(core,
|
|||
enable_core="$enableval",
|
||||
enable_core="yes")
|
||||
AM_CONDITIONAL([COND_CORE], [test "$enable_core" = "yes"])
|
||||
AC_ARG_ENABLE(cmdline,
|
||||
AS_HELP_STRING([--enable-cmdline],
|
||||
[enables building the SyncEvolution command line tool, syncevolution]),
|
||||
enable_cmdline="$enableval",
|
||||
enable_cmdline="yes")
|
||||
AM_CONDITIONAL([COND_CMDLINE], [test "$enable_cmdline" = "yes"])
|
||||
AC_ARG_ENABLE(local-sync,
|
||||
AS_HELP_STRING([--enable-local-sync],
|
||||
[enables building the local synchronization support, in particular syncevo-local-sync]),
|
||||
enable_local_sync="$enableval",
|
||||
enable_local_sync="yes")
|
||||
AM_CONDITIONAL([COND_LOCAL_SYNC], [test "$enable_local_sync" = "yes"])
|
||||
|
||||
AC_ARG_ENABLE(dbus-service,
|
||||
AS_HELP_STRING([--enable-dbus-service=args],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
syncevolution (1.3.99.7-1) unstable; urgency=high
|
||||
|
||||
* Akonadi support for KDE is now enabled. The support for GNOME and KDE
|
||||
Akonadi support for KDE is now enabled. The support for GNOME and KDE
|
||||
has been split into new packages named syncevolution-libs-gnome and
|
||||
syncevolution-libs-kde. If you only want to use KDE, you can remove
|
||||
syncevolution-libs-gnome.
|
||||
|
@ -9,7 +9,7 @@ syncevolution (1.3.99.7-1) unstable; urgency=high
|
|||
|
||||
syncevolution (1.2.99.1-1) unstable; urgency=low
|
||||
|
||||
* The sync format of existing configurations for Mobical (aka Everdroid)
|
||||
The sync format of existing configurations for Mobical (aka Everdroid)
|
||||
must be updated manually, because the server has encoding problems when
|
||||
using vCard 3.0 (now the default for Evolution contacts):
|
||||
|
||||
|
@ -17,7 +17,7 @@ syncevolution (1.2.99.1-1) unstable; urgency=low
|
|||
syncFormat=text/x-vcard \
|
||||
mobical addressbook
|
||||
|
||||
* The Funambol template explicitly enables usage of the
|
||||
The Funambol template explicitly enables usage of the
|
||||
"refresh-from-server" sync mode to avoid getting throttled with 417
|
||||
'retry later' errors. The same must be added to existing configs
|
||||
manually:
|
||||
|
@ -30,11 +30,11 @@ syncevolution (1.2.99.1-1) unstable; urgency=low
|
|||
|
||||
syncevolution (1.1.99.5a-1) experimental; urgency=low
|
||||
|
||||
* This version of syncevolution introduces an irreversible change to the
|
||||
This version of syncevolution introduces an irreversible change to the
|
||||
config layout, see the --migrate option in the syncevolution man page.
|
||||
Migration happens automatically at first invocation.
|
||||
|
||||
* This version is only know to work with version 2.32.2 of evolution.
|
||||
This version is only know to work with version 2.32.2 of evolution.
|
||||
In particular, it probably won't work with the version of evolution in
|
||||
squeeze.
|
||||
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
syncevolution (1.5.3-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
* Fix override_dh_makeshlibs to handle all packages with public shared libs
|
||||
(Closes: #887043)
|
||||
* Remove obsolete Conflicts:/Breaks:/Replaces: sync-ui (<<1.1+ds1-1~)
|
||||
* Change debhelper compatibility to 11, which is recommended
|
||||
* Bump standards version to 4.1.3, no changes needed
|
||||
* Fix several lintian warnings
|
||||
|
||||
-- Tino Mettler <tino+debian@tikei.de> Sat, 13 Jan 2018 22:47:44 +0100
|
||||
|
||||
syncevolution (1.5.2-3) unstable; urgency=medium
|
||||
|
||||
[ Patrick Ohly ]
|
||||
|
@ -7,12 +19,14 @@ syncevolution (1.5.2-3) unstable; urgency=medium
|
|||
[ Tino Mettler ]
|
||||
* Change build dependencies for libgtk and glade to use GTK3 for sync-ui
|
||||
(Closes: #884162)
|
||||
* Add Build-Dep on libjson-c-dev (Closes: #884170)
|
||||
* Add Build-Dep on libjson-c-dev, enable and include oauth2 backend
|
||||
(Closes: #884170)
|
||||
|
||||
* Handle C++ conversion operator name mangling in GCC 7 (Closes: #871284)
|
||||
* Build depend on libsecret-1-dev instead of deprecated libgnome-keyring-dev
|
||||
(Closes: #867944)
|
||||
|
||||
-- Tino Mettler <tino+debian@tikei.de> Thu, 04 Jan 2018 12:24:58 +0100
|
||||
-- Tino Mettler <tino+debian@tikei.de> Thu, 04 Jan 2018 22:21:57 +0100
|
||||
|
||||
syncevolution (1.5.2-2) unstable; urgency=medium
|
||||
|
||||
|
@ -208,7 +222,7 @@ syncevolution (1.1.99.4+ds1-1) experimental; urgency=low
|
|||
syncevolution (1.1.99.3+ds1-1) experimental; urgency=low
|
||||
|
||||
* New upstream (pre-release) version
|
||||
* Remove two s390 related patches, now contained in upstream
|
||||
* Remove two s390 related patches, now contained in upstream
|
||||
commit 63d76f874270cbafb2.
|
||||
|
||||
-- David Bremner <bremner@debian.org> Tue, 08 Mar 2011 16:05:30 -0400
|
||||
|
@ -224,7 +238,7 @@ syncevolution (1.1+ds1-5) unstable; urgency=low
|
|||
|
||||
syncevolution (1.1+ds1-4) experimental; urgency=low
|
||||
|
||||
* Remove build dependency on libopenobex1-dev on hurd-i386, because it is not
|
||||
* Remove build dependency on libopenobex1-dev on hurd-i386, because it is not
|
||||
available there. The package is already built without it on kfreebsd.
|
||||
* Explicitly translate between sysync::memSize and size_t. Thanks to
|
||||
Patrick Ohly for the patch.
|
||||
|
@ -254,7 +268,7 @@ syncevolution (1.1+ds1-1) experimental; urgency=low
|
|||
* Add -dbg package to hold debugging symbols
|
||||
* Recommend evolution-data-server instead of evolution
|
||||
* Update Standards-Version to 3.9.1 (No changes).
|
||||
|
||||
|
||||
[ Thomas Bechtold ]
|
||||
* Split source package into syncevolution-common, syncevolution and
|
||||
sync-ui.
|
||||
|
@ -276,7 +290,7 @@ syncevolution (1.0+ds1~beta2a-1) unstable; urgency=low
|
|||
syncevolution (1.0+ds1~a1-2) experimental; urgency=low
|
||||
|
||||
* Don't build depend on libopenobex1-dev on kfreebsd-*. This avoids
|
||||
trying to compile bluetooth support, which relies on bluez
|
||||
trying to compile bluetooth support, which relies on bluez
|
||||
(Closes: #566940)
|
||||
|
||||
-- David Bremner <bremner@unb.ca> Tue, 26 Jan 2010 23:28:44 -0400
|
||||
|
@ -304,6 +318,6 @@ syncevolution (0.9+ds1-2) unstable; urgency=low
|
|||
|
||||
syncevolution (0.9+ds1-1) unstable; urgency=low
|
||||
|
||||
* Initial release (Closes: #404942)
|
||||
* Initial release (Closes: #404942)
|
||||
|
||||
-- David Bremner <bremner@unb.ca> Sun, 16 Aug 2009 23:53:47 -0300
|
||||
|
|
|
@ -1 +1 @@
|
|||
9
|
||||
11
|
||||
|
|
|
@ -2,7 +2,7 @@ Source: syncevolution
|
|||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: Tino Mettler <tino+debian@tikei.de>
|
||||
Build-Depends: debhelper (>= 9), autotools-dev, libedataserver1.2-dev,
|
||||
Build-Depends: debhelper (>= 11), libedataserver1.2-dev,
|
||||
libecal1.2-dev, libebook1.2-dev, libcurl4-gnutls-dev, libboost-dev,
|
||||
libsynthesis-dev (>=3.4.0.47.5),
|
||||
libtool, automake, intltool, pkg-config,
|
||||
|
@ -15,18 +15,18 @@ Build-Depends: debhelper (>= 9), autotools-dev, libedataserver1.2-dev,
|
|||
libcppunit-dev, kdepimlibs5-dev, kdelibs5-dev,
|
||||
libjson-c-dev,
|
||||
g++ (>= 4:7)
|
||||
Standards-Version: 3.9.8
|
||||
Standards-Version: 4.1.3
|
||||
Homepage: http://www.syncevolution.org
|
||||
Vcs-Git: git://anonscm.debian.org/collab-maint/syncevolution
|
||||
Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/syncevolution.git
|
||||
|
||||
Package: syncevolution
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends},
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends},
|
||||
syncevolution-common (= ${source:Version}),
|
||||
syncevolution-libs (= ${binary:Version})
|
||||
Recommends: bluez
|
||||
Description: Sync personal information data using SyncML and CalDAV/CardDAV (CLI)
|
||||
Description: Sync personal information data via SyncML/CalDAV/CardDAV (CLI)
|
||||
SyncEvolution synchronizes contact, calendar and task items via SyncML and
|
||||
CalDAV/CardDAV with other servers or devices. It uses the Evolution Data Server
|
||||
to sync PIM data in Evolution, but a plain file storage is also supported.
|
||||
|
@ -38,10 +38,10 @@ Description: Sync personal information data using SyncML and CalDAV/CardDAV (CLI
|
|||
|
||||
Package: sync-ui
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, syncevolution-common (= ${source:Version}),
|
||||
syncevolution-dbus
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, syncevolution-common (= ${source:Version}),
|
||||
syncevolution-dbus
|
||||
Recommends: bluez
|
||||
Description: Sync personal information data using SyncML and CalDAV/CardDAV (GTK+ GUI)
|
||||
Description: Sync personal information data via SyncML/CalDAV/CardDAV (GTK+ GUI)
|
||||
SyncEvolution synchronizes contact, calendar and task items via SyncML and
|
||||
CalDAV/CardDAV with other servers or devices. It uses the Evolution Data Server
|
||||
to sync PIM data in Evolution, but a plain file storage is also supported.
|
||||
|
@ -54,9 +54,7 @@ Description: Sync personal information data using SyncML and CalDAV/CardDAV (GTK
|
|||
Package: syncevolution-common
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, libsynthesis0v5 (>= 3.4.0.47.5)
|
||||
Conflicts: sync-ui (<<1.1+ds1-1~), syncevolution (<<1.1+ds1-1~)
|
||||
Replaces: sync-ui (<<1.1+ds1-1~), syncevolution (<<1.1+ds1-1~)
|
||||
Description: Sync personal information data using SyncML and CalDAV/CardDAV (common files)
|
||||
Description: Sync personal information data via SyncML/CalDAV/CardDAV (common files)
|
||||
SyncEvolution synchronizes contact, calendar and task items via SyncML and
|
||||
CalDAV/CardDAV with other servers or devices. It uses the Evolution Data Server
|
||||
to sync PIM data in Evolution, but a plain file storage is also supported.
|
||||
|
@ -71,7 +69,7 @@ Architecture: any
|
|||
Depends: syncevolution-libs-gnome (= ${binary:Version}) |
|
||||
syncevolution-libs-kde (= ${binary:Version}),
|
||||
${misc:Depends}, ${shlibs:Depends}
|
||||
Description: Sync personal information data using SyncML and CalDAV/CardDAV (backend libraries)
|
||||
Description: Sync personal information data via SyncML/CalDAV/CardDAV (backend libraries)
|
||||
SyncEvolution synchronizes contact, calendar and task items via SyncML and
|
||||
CalDAV/CardDAV with other servers or devices. It uses the Evolution Data Server
|
||||
to sync PIM data in Evolution, but a plain file storage is also supported.
|
||||
|
@ -87,7 +85,7 @@ Depends: ${misc:Depends}, ${shlibs:Depends}
|
|||
Recommends: evolution-data-server
|
||||
Replaces: syncevolution-libs (<< 1.3.99.7)
|
||||
Breaks: syncevolution-libs (<< 1.3.99.7)
|
||||
Description: Sync personal information data using SyncML and CalDAV/CardDAV (GNOME backend)
|
||||
Description: Sync personal information data via SyncML/CalDAV/CardDAV (GNOME backend)
|
||||
SyncEvolution synchronizes contact, calendar and task items via SyncML and
|
||||
CalDAV/CardDAV with other servers or devices. It uses the Evolution Data Server
|
||||
to sync PIM data in Evolution, but a plain file storage is also supported.
|
||||
|
@ -95,14 +93,14 @@ Description: Sync personal information data using SyncML and CalDAV/CardDAV (GNO
|
|||
incremental synchronization of items are supported. SyncEvolution can act as
|
||||
a SyncML/DAV client and SyncML server.
|
||||
.
|
||||
This package provides private libraries and plugins for Gnome.
|
||||
This package provides private libraries and plugins for GNOME.
|
||||
|
||||
Package: syncevolution-libs-kde
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Replaces: syncevolution-libs (<< 1.3.99.7)
|
||||
Breaks: syncevolution-libs (<< 1.3.99.7)
|
||||
Description: Sync personal information data using SyncML and CalDAV/CardDAV (KDE backend)
|
||||
Description: Sync personal information data via SyncML/CalDAV/CardDAV (KDE backend)
|
||||
SyncEvolution synchronizes contact, calendar and task items via SyncML and
|
||||
CalDAV/CardDAV with other servers or devices. It uses the Evolution Data Server
|
||||
to sync PIM data in Evolution, but a plain file storage is also supported.
|
||||
|
@ -114,12 +112,10 @@ Description: Sync personal information data using SyncML and CalDAV/CardDAV (KDE
|
|||
|
||||
Package: syncevolution-dbus
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends},
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends},
|
||||
syncevolution-common (= ${source:Version}),
|
||||
syncevolution-libs (= ${binary:Version}), dbus
|
||||
Replaces: sync-ui (<< 1.1+ds1-1)
|
||||
Breaks: sync-ui (<< 1.1+ds1-1)
|
||||
Description: Sync personal information data using SyncML and CalDAV/CardDAV (D-Bus support)
|
||||
Description: Sync personal information data via SyncML/CalDAV/CardDAV (D-Bus support)
|
||||
SyncEvolution synchronizes contact, calendar and task items via SyncML and
|
||||
CalDAV/CardDAV with other servers or devices. It uses the Evolution Data Server
|
||||
to sync PIM data in Evolution, but a plain file storage is also supported.
|
||||
|
@ -133,7 +129,7 @@ Package: syncevolution-http
|
|||
Architecture: all
|
||||
Depends: ${misc:Depends}, syncevolution-dbus (>= ${source:Version}), python,
|
||||
python-dbus, dbus-x11, python-twisted-web, python-gobject, python-openssl
|
||||
Description: Sync personal information data using SyncML and CalDAV/CardDAV (HTTP server)
|
||||
Description: Sync personal information data via SyncML/CalDAV/CardDAV (HTTP server)
|
||||
SyncEvolution synchronizes contact, calendar and task items via SyncML and
|
||||
CalDAV/CardDAV with other servers or devices. It uses the Evolution Data Server
|
||||
to sync PIM data in Evolution, but a plain file storage is also supported.
|
||||
|
@ -147,7 +143,7 @@ Description: Sync personal information data using SyncML and CalDAV/CardDAV (HTT
|
|||
Package: libsyncevolution0
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, syncevolution-common (= ${source:Version}), dbus
|
||||
Description: Sync personal information data using SyncML and CalDAV/CardDAV (shared library)
|
||||
Description: Sync personal information data via SyncML/CalDAV/CardDAV (shared library)
|
||||
SyncEvolution synchronizes contact, calendar and task items via SyncML and
|
||||
CalDAV/CardDAV with other servers or devices. It uses the Evolution Data Server
|
||||
to sync PIM data in Evolution, but a plain file storage is also supported.
|
||||
|
@ -160,7 +156,7 @@ Description: Sync personal information data using SyncML and CalDAV/CardDAV (sha
|
|||
Package: libsyncevo-dbus0
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, syncevolution-common (= ${source:Version}), dbus
|
||||
Description: Sync personal information data using SyncML and CalDAV/CardDAV (shared D-Bus library)
|
||||
Description: Sync personal information data via SyncML/CalDAV/CardDAV (shared D-Bus library)
|
||||
SyncEvolution synchronizes contact, calendar and task items via SyncML and
|
||||
CalDAV/CardDAV with other servers or devices. It uses the Evolution Data Server
|
||||
to sync PIM data in Evolution, but a plain file storage is also supported.
|
||||
|
@ -175,7 +171,7 @@ Architecture: any
|
|||
Depends: ${shlibs:Depends}, ${misc:Depends}, syncevolution-common (= ${source:Version}), dbus
|
||||
Replaces: syncevolution-libs (<< 1.2.99.1)
|
||||
Breaks: syncevolution-libs (<< 1.2.99.1)
|
||||
Description: Sync personal information data using SyncML and CalDAV/CardDAV (shared gdbus library)
|
||||
Description: Sync personal information data via SyncML/CalDAV/CardDAV (shared gdbus library)
|
||||
SyncEvolution synchronizes contact, calendar and task items via SyncML and
|
||||
CalDAV/CardDAV with other servers or devices. It uses the Evolution Data Server
|
||||
to sync PIM data in Evolution, but a plain file storage is also supported.
|
||||
|
|
32
debian/patches/0002-Disable-the-usage-of-CA-certificates-if-the-user-dis.patch
vendored
Normal file
32
debian/patches/0002-Disable-the-usage-of-CA-certificates-if-the-user-dis.patch
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
From 96ff80271fce975c9f73972d2d413da08f7de82e Mon Sep 17 00:00:00 2001
|
||||
From: Tino Mettler <tino+debian@tikei.de>
|
||||
Date: Mon, 22 Jan 2018 19:42:29 +0100
|
||||
Subject: [PATCH] Disable the usage of CA certificates if the user disables
|
||||
SSLVerifyServer and SSLVerifyHost
|
||||
|
||||
---
|
||||
src/syncevo/SoupTransportAgent.cpp | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/syncevo/SoupTransportAgent.cpp b/src/syncevo/SoupTransportAgent.cpp
|
||||
index 9dd7f581..ed24a4b4 100644
|
||||
--- a/src/syncevo/SoupTransportAgent.cpp
|
||||
+++ b/src/syncevo/SoupTransportAgent.cpp
|
||||
@@ -130,9 +130,14 @@ void SoupTransportAgent::send(const char *data, size_t len)
|
||||
// use CA certificates if available and needed,
|
||||
// otherwise let soup use system default certificates
|
||||
if (m_verifySSL) {
|
||||
- if (!m_cacerts.empty()) {
|
||||
- g_object_set(m_session.get(), SOUP_SESSION_SSL_CA_FILE, m_cacerts.c_str(), NULL);
|
||||
- }
|
||||
+ if (!m_cacerts.empty()) {
|
||||
+ g_object_set(m_session.get(), SOUP_SESSION_SSL_CA_FILE,
|
||||
+ m_cacerts.c_str(), NULL);
|
||||
+ }
|
||||
+ } else {
|
||||
+ // Checking enabled by default, disable it.
|
||||
+ g_object_set(m_session.get(), SOUP_SESSION_SSL_STRICT, false,
|
||||
+ NULL);
|
||||
}
|
||||
|
||||
soup_message_set_request(message.get(), m_contentType.c_str(),
|
|
@ -1,89 +0,0 @@
|
|||
From 110e57f32fcae67634f6d0edd626ccc64748047e Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Ohly <patrick.ohly@intel.com>
|
||||
Date: Thu, 14 Dec 2017 07:46:32 -0800
|
||||
Subject: [PATCH] libical: support libical v3
|
||||
|
||||
libical v3 removes some deprecated functions (like icaltime_from_timet)
|
||||
and removes the "is_utc" member from icaltimetype. The replacement
|
||||
code works with old and new libical and thus needs no ifdefs.
|
||||
|
||||
However, that struct is part of the ABI, which impacts the tricks that
|
||||
syncevolution.org binaries use to get built against libical v2 and then
|
||||
run with more recent libs like libical v3.
|
||||
|
||||
Depending on the platform ABI, it may still be okay, because the calling code
|
||||
in SyncEvolution reserves and copies enough bytes for the icaltimetype
|
||||
instances and because that code never directly accesses any member (is_date,
|
||||
is_daylight, zone) whose offset changes.
|
||||
|
||||
Original author: Milan Crha <mcrha@redhat.com>
|
||||
|
||||
Slightly modified it so that icaltime_t.zone is not set.
|
||||
|
||||
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
||||
---
|
||||
src/backends/webdav/CalDAVSource.cpp | 3 +--
|
||||
src/syncevo/icaltz-util.c | 10 +++++-----
|
||||
2 files changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/backends/webdav/CalDAVSource.cpp b/src/backends/webdav/CalDAVSource.cpp
|
||||
index fa16935a..9c4a1c8d 100644
|
||||
--- a/src/backends/webdav/CalDAVSource.cpp
|
||||
+++ b/src/backends/webdav/CalDAVSource.cpp
|
||||
@@ -721,8 +721,7 @@ SubSyncSource::SubItemResult CalDAVSource::insertSubItem(const std::string &luid
|
||||
eptr<icalcomponent> fullcal = event.m_calendar;
|
||||
loadItem(event);
|
||||
event.m_sequence++;
|
||||
- lastmodtime = icaltime_from_timet(event.m_lastmodtime, false);
|
||||
- lastmodtime.is_utc = 1;
|
||||
+ lastmodtime = icaltime_from_timet_with_zone(event.m_lastmodtime, false, icaltimezone_get_utc_timezone());
|
||||
event.m_calendar = fullcal;
|
||||
for (icalcomponent *comp = icalcomponent_get_first_component(event.m_calendar, ICAL_VEVENT_COMPONENT);
|
||||
comp;
|
||||
diff --git a/src/syncevo/icaltz-util.c b/src/syncevo/icaltz-util.c
|
||||
index 202a2cd9..abb9a758 100644
|
||||
--- a/src/syncevo/icaltz-util.c
|
||||
+++ b/src/syncevo/icaltz-util.c
|
||||
@@ -224,7 +224,7 @@ find_transidx (time_t *transitions, ttinfo *types, int *trans_idx, long int num_
|
||||
struct icaltimetype itime;
|
||||
|
||||
now = time (NULL);
|
||||
- itime = icaltime_from_timet (now, 0);
|
||||
+ itime = icaltime_from_timet_with_zone (now, 0, NULL);
|
||||
itime.month = itime.day = 1;
|
||||
itime.hour = itime.minute = itime.second = 0;
|
||||
year_start = icaltime_as_timet(itime);
|
||||
@@ -304,13 +304,13 @@ adjust_dtstart_day_to_rrule (icalcomponent *comp, struct icalrecurrencetype rule
|
||||
icalrecur_iterator *iter;
|
||||
|
||||
now = time (NULL);
|
||||
- itime = icaltime_from_timet (now, 0);
|
||||
+ itime = icaltime_from_timet_with_zone (now, 0, NULL);
|
||||
itime.month = itime.day = 1;
|
||||
itime.hour = itime.minute = itime.second = 0;
|
||||
year_start = icaltime_as_timet(itime);
|
||||
|
||||
comp_start = icalcomponent_get_dtstart (comp);
|
||||
- start = icaltime_from_timet (year_start, 0);
|
||||
+ start = icaltime_from_timet_with_zone (year_start, 0, NULL);
|
||||
|
||||
iter = icalrecur_iterator_new (rule, start);
|
||||
iter_start = icalrecur_iterator_next (iter);
|
||||
@@ -478,7 +478,7 @@ icaltzutil_fetch_timezone (const char *location)
|
||||
trans = transitions [stdidx] + types [zp_idx].gmtoff;
|
||||
else
|
||||
trans = types [zp_idx].gmtoff;
|
||||
- icaltime = icaltime_from_timet (trans, 0);
|
||||
+ icaltime = icaltime_from_timet_with_zone (trans, 0, NULL);
|
||||
dtstart = icaltime;
|
||||
dtstart.year = 1970;
|
||||
dtstart.minute = dtstart.second = 0;
|
||||
@@ -520,7 +520,7 @@ icaltzutil_fetch_timezone (const char *location)
|
||||
trans = transitions [dstidx] + types [zp_idx].gmtoff;
|
||||
else
|
||||
trans = types [zp_idx].gmtoff;
|
||||
- icaltime = icaltime_from_timet (trans, 0);
|
||||
+ icaltime = icaltime_from_timet_with_zone (trans, 0, NULL);
|
||||
dtstart = icaltime;
|
||||
dtstart.year = 1970;
|
||||
dtstart.minute = dtstart.second = 0;
|
|
@ -1,255 +0,0 @@
|
|||
From e6dc389330b51c508d0fa25d8e9ad599756ec69b Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Ohly <patrick.ohly@intel.com>
|
||||
Date: Thu, 16 Nov 2017 15:01:11 +0100
|
||||
Subject: [PATCH] GNOME: replace gnome-keyring with libsecret
|
||||
|
||||
The GNOME keyring library has been obsoleted for a long time now,
|
||||
long enough that the replacement libsecret is available on all
|
||||
supported distros. Therefore we can switch unconditionally.
|
||||
|
||||
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
||||
---
|
||||
src/backends/gnome/GNOMEPlatform.cpp | 170 ++++++++++++++---------------------
|
||||
src/backends/gnome/configure-sub.in | 9 +-
|
||||
2 files changed, 73 insertions(+), 106 deletions(-)
|
||||
|
||||
diff --git a/src/backends/gnome/GNOMEPlatform.cpp b/src/backends/gnome/GNOMEPlatform.cpp
|
||||
index f2f7a1d3..37f9811a 100644
|
||||
--- a/src/backends/gnome/GNOMEPlatform.cpp
|
||||
+++ b/src/backends/gnome/GNOMEPlatform.cpp
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifdef USE_GNOME_KEYRING
|
||||
|
||||
extern "C" {
|
||||
-#include <gnome-keyring.h>
|
||||
+#include <libsecret/secret.h>
|
||||
}
|
||||
|
||||
#include "GNOMEPlatform.h"
|
||||
@@ -30,46 +30,11 @@ extern "C" {
|
||||
#include <syncevo/Exception.h>
|
||||
#include <syncevo/UserInterface.h>
|
||||
#include <syncevo/SyncConfig.h>
|
||||
+#include <syncevo/GLibSupport.h>
|
||||
|
||||
#include <syncevo/declarations.h>
|
||||
SE_BEGIN_CXX
|
||||
|
||||
-// Occasionally, libgnome-keyring fails with the following error messages:
|
||||
-// Gkr: received an invalid, unencryptable, or non-utf8 secret
|
||||
-// Gkr: call to daemon returned an invalid response: (null).(null)
|
||||
-//
|
||||
-// We work around that by retrying the operation a few times, for at
|
||||
-// most this period of time. Didn't really help, so disable it for now
|
||||
-// by using a zero duration.
|
||||
-static const double GNOMEKeyringRetryDuration = 2; // seconds
|
||||
-static const double GNOMEKeyringRetryInterval = 0.1; // seconds
|
||||
-
|
||||
-/**
|
||||
- * libgnome-keyring has an internal gkr_reset_session()
|
||||
- * method which gets called when the "org.freedesktop.secrets"
|
||||
- * disconnects from the D-Bus session bus.
|
||||
- *
|
||||
- * We cannot call that method directly, but we can get it called by
|
||||
- * faking the "disconnect" signal. That works because
|
||||
- * on_connection_filter() in gkr-operation.c doesn't check who the
|
||||
- * sender of the signal is.
|
||||
- *
|
||||
- * Once gkr_reset_session() got called, the next operation will
|
||||
- * re-establish the connection. After the failure above, the second
|
||||
- * attempt usually works.
|
||||
- *
|
||||
- * Any other client using libgnome-keyring will also be tricked into
|
||||
- * disconnecting temporarily. That should be fine, any running
|
||||
- * operation will continue to run and complete (?).
|
||||
- */
|
||||
-static void FlushGNOMEKeyring()
|
||||
-{
|
||||
- // Invoking dbus-send is easier than writing this in C++.
|
||||
- // Besides, it ensures that the signal comes from some other
|
||||
- // process. Not sure whether signals are sent back to the sender.
|
||||
- system("dbus-send --session --type=signal /org/freedesktop/DBus org.freedesktop.DBus.NameOwnerChanged string:'org.freedesktop.secrets' string:':9.99' string:''");
|
||||
-}
|
||||
-
|
||||
/**
|
||||
* GNOME keyring distinguishes between empty and unset
|
||||
* password keys. This function returns NULL for an
|
||||
@@ -97,6 +62,39 @@ static bool UseGNOMEKeyring(const InitStateTri &keyring)
|
||||
return true;
|
||||
}
|
||||
|
||||
+class LibSecretHash : public GHashTableCXX
|
||||
+{
|
||||
+ std::list<std::string> m_buffer;
|
||||
+
|
||||
+public:
|
||||
+ LibSecretHash(const ConfigPasswordKey &key) :
|
||||
+ GHashTableCXX(g_hash_table_new(g_str_hash, g_str_equal), TRANSFER_REF)
|
||||
+ {
|
||||
+ // see https://developer.gnome.org/libsecret/0.16/libsecret-SecretSchema.html#SECRET-SCHEMA-COMPAT-NETWORK:CAPS
|
||||
+ insert("user", key.user);
|
||||
+ insert("domain", key.domain);
|
||||
+ insert("server", key.server);
|
||||
+ insert("object", key.object);
|
||||
+ insert("protocol", key.protocol);
|
||||
+ insert("authtype", key.authtype);
|
||||
+ if (key.port) {
|
||||
+ std::string value = StringPrintf("%d", key.port);
|
||||
+ insert("port", value);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /** Keys are expected to be constants and not copied. Values are copied. */
|
||||
+ void insert(const char *key, const std::string &value)
|
||||
+ {
|
||||
+ if (!value.empty()) {
|
||||
+ m_buffer.push_back(value);
|
||||
+ g_hash_table_insert(get(),
|
||||
+ const_cast<char *>(key),
|
||||
+ const_cast<char *>(m_buffer.back().c_str()));
|
||||
+ }
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
bool GNOMELoadPasswordSlot(const InitStateTri &keyring,
|
||||
const std::string &passwordName,
|
||||
const std::string &descr,
|
||||
@@ -108,46 +106,24 @@ bool GNOMELoadPasswordSlot(const InitStateTri &keyring,
|
||||
return false;
|
||||
}
|
||||
|
||||
- GnomeKeyringResult result = GNOME_KEYRING_RESULT_OK;
|
||||
- GList* list;
|
||||
- Timespec start = Timespec::monotonic();
|
||||
- double sleepSecs = 0;
|
||||
- do {
|
||||
- if (sleepSecs != 0) {
|
||||
- SE_LOG_DEBUG(NULL, "%s: previous attempt to load password '%s' from GNOME keyring failed, will try again: %s",
|
||||
- key.description.c_str(),
|
||||
- key.toString().c_str(),
|
||||
- gnome_keyring_result_to_message(result));
|
||||
- FlushGNOMEKeyring();
|
||||
- Sleep(sleepSecs);
|
||||
- }
|
||||
- result = gnome_keyring_find_network_password_sync(passwdStr(key.user),
|
||||
- passwdStr(key.domain),
|
||||
- passwdStr(key.server),
|
||||
- passwdStr(key.object),
|
||||
- passwdStr(key.protocol),
|
||||
- passwdStr(key.authtype),
|
||||
- key.port,
|
||||
- &list);
|
||||
- sleepSecs = GNOMEKeyringRetryInterval;
|
||||
- } while (result != GNOME_KEYRING_RESULT_OK &&
|
||||
- (Timespec::monotonic() - start).duration() < GNOMEKeyringRetryDuration);
|
||||
+ GErrorCXX gerror;
|
||||
+ LibSecretHash hash(key);
|
||||
+ PlainGStr result(secret_password_lookupv_sync(SECRET_SCHEMA_COMPAT_NETWORK,
|
||||
+ hash,
|
||||
+ NULL,
|
||||
+ gerror));
|
||||
|
||||
// if find password stored in gnome keyring
|
||||
- if(result == GNOME_KEYRING_RESULT_OK && list && list->data ) {
|
||||
- GnomeKeyringNetworkPasswordData *key_data;
|
||||
- key_data = (GnomeKeyringNetworkPasswordData*)list->data;
|
||||
- password = std::string(key_data->password);
|
||||
- gnome_keyring_network_password_list_free(list);
|
||||
+ if (gerror) {
|
||||
+ gerror.throwError(SE_HERE, StringPrintf("looking up password '%s'", descr.c_str()));
|
||||
+ } else if (result) {
|
||||
SE_LOG_DEBUG(NULL, "%s: loaded password from GNOME keyring using %s",
|
||||
key.description.c_str(),
|
||||
key.toString().c_str());
|
||||
+ password = result;
|
||||
} else {
|
||||
- SE_LOG_DEBUG(NULL, "password not in GNOME keyring using %s: %s",
|
||||
- key.toString().c_str(),
|
||||
- result == GNOME_KEYRING_RESULT_NO_MATCH ? "no match" :
|
||||
- result != GNOME_KEYRING_RESULT_OK ? gnome_keyring_result_to_message(result) :
|
||||
- "empty result list");
|
||||
+ SE_LOG_DEBUG(NULL, "password not in GNOME keyring using %s",
|
||||
+ key.toString().c_str());
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -173,38 +149,26 @@ bool GNOMESavePasswordSlot(const InitStateTri &keyring,
|
||||
key.toString().c_str()));
|
||||
}
|
||||
|
||||
- guint32 itemId;
|
||||
- GnomeKeyringResult result = GNOME_KEYRING_RESULT_OK;
|
||||
- // write password to keyring
|
||||
- Timespec start = Timespec::monotonic();
|
||||
- double sleepSecs = 0;
|
||||
- do {
|
||||
- if (sleepSecs != 0) {
|
||||
- SE_LOG_DEBUG(NULL, "%s: previous attempt to save password '%s' in GNOME keyring failed, will try again: %s",
|
||||
- key.description.c_str(),
|
||||
- key.toString().c_str(),
|
||||
- gnome_keyring_result_to_message(result));
|
||||
- FlushGNOMEKeyring();
|
||||
- Sleep(sleepSecs);
|
||||
- }
|
||||
- result = gnome_keyring_set_network_password_sync(NULL,
|
||||
- passwdStr(key.user),
|
||||
- passwdStr(key.domain),
|
||||
- passwdStr(key.server),
|
||||
- passwdStr(key.object),
|
||||
- passwdStr(key.protocol),
|
||||
- passwdStr(key.authtype),
|
||||
- key.port,
|
||||
- password.c_str(),
|
||||
- &itemId);
|
||||
- sleepSecs = GNOMEKeyringRetryInterval;
|
||||
- } while (result != GNOME_KEYRING_RESULT_OK &&
|
||||
- (Timespec::monotonic() - start).duration() < GNOMEKeyringRetryDuration);
|
||||
- if (result != GNOME_KEYRING_RESULT_OK) {
|
||||
- Exception::throwError(SE_HERE, StringPrintf("%s: saving password '%s' in GNOME keyring failed: %s",
|
||||
- key.description.c_str(),
|
||||
- key.toString().c_str(),
|
||||
- gnome_keyring_result_to_message(result)));
|
||||
+ GErrorCXX gerror;
|
||||
+ LibSecretHash hash(key);
|
||||
+ std::string label;
|
||||
+ if (!key.user.empty() && !key.server.empty()) {
|
||||
+ // This emulates the behavior of libgnomekeyring.
|
||||
+ label = key.user + "@" + key.server;
|
||||
+ } else {
|
||||
+ label = passwordName;
|
||||
+ }
|
||||
+ gboolean result = secret_password_storev_sync(SECRET_SCHEMA_COMPAT_NETWORK,
|
||||
+ hash,
|
||||
+ NULL,
|
||||
+ label.c_str(),
|
||||
+ password.c_str(),
|
||||
+ NULL,
|
||||
+ gerror);
|
||||
+ if (!result) {
|
||||
+ gerror.throwError(SE_HERE, StringPrintf("%s: saving password '%s' in GNOME keyring",
|
||||
+ key.description.c_str(),
|
||||
+ key.toString().c_str()));
|
||||
}
|
||||
SE_LOG_DEBUG(NULL, "saved password in GNOME keyring using %s", key.toString().c_str());
|
||||
|
||||
diff --git a/src/backends/gnome/configure-sub.in b/src/backends/gnome/configure-sub.in
|
||||
index 199989e8..d02d52a6 100644
|
||||
--- a/src/backends/gnome/configure-sub.in
|
||||
+++ b/src/backends/gnome/configure-sub.in
|
||||
@@ -1,10 +1,13 @@
|
||||
-PKG_CHECK_MODULES(KEYRING, [gnome-keyring-1 >= 2.20], HAVE_KEYRING=yes, HAVE_KEYRING=no)
|
||||
+# According to https://developer.gnome.org/libsecret/0.16/libsecret-Password-storage.html#secret-password-store-sync
|
||||
+# the simple API was still considered unstable. All supported distros
|
||||
+# now have 0.18 where the API is stable.
|
||||
+PKG_CHECK_MODULES(KEYRING, [libsecret-1 >= 0.18], HAVE_KEYRING=yes, HAVE_KEYRING=no)
|
||||
AC_ARG_ENABLE(gnome-keyring,
|
||||
AS_HELP_STRING([--enable-gnome-keyring],
|
||||
- [enables or disables support for the GNOME keyring; default is on if development files are available]),
|
||||
+ [enables or disables support for the GNOME keyring via libsecret; default is on if development files are available]),
|
||||
[enable_gnome_keyring="$enableval"
|
||||
test "$enable_gnome_keyring" = "yes" || test "$enable_gnome_keyring" = "no" || AC_MSG_ERROR([invalid value for --enable-gnome-keyring: $enable_gnome_keyring])
|
||||
- test "$enable_gnome_keyring" = "no" || test "$HAVE_KEYRING" = "yes" || AC_MSG_ERROR([gnome-keyring-1 pkg >= 2.20 not found, needed for --enable-gnome-keyring])],
|
||||
+ test "$enable_gnome_keyring" = "no" || test "$HAVE_KEYRING" = "yes" || AC_MSG_ERROR([libsecret-1 >= 0.18 not found, needed for --enable-gnome-keyring])],
|
||||
enable_gnome_keyring="$HAVE_KEYRING")
|
||||
if test $enable_gnome_keyring = "yes"; then
|
||||
have_keyring=yes
|
|
@ -1,4 +1,3 @@
|
|||
# debian/source/git-patches exported from git by quilt-patches-deb-export-hook
|
||||
0001-Fix-FTBFS-on-kfreebsd-due-to-missing-SOCK_CLOEXEC.patch
|
||||
0002-libical-support-libical-v3.patch
|
||||
0003-GNOME-replace-gnome-keyring-with-libsecret.patch
|
||||
0002-Disable-the-usage-of-CA-certificates-if-the-user-dis.patch
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
UPSTREAMTAG=upstream/1.5.2
|
||||
|
||||
SOURCEPKG=$(shell dpkg-parsechangelog | sed -n 's/^Source: \(.*\)/\1/p')
|
||||
UPSTREAM=$(shell dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-[^-]*/\1/p')
|
||||
ORIG=${SOURCEPKG}_${UPSTREAM}.orig.tar.gz
|
||||
include /usr/share/dpkg/pkg-info.mk
|
||||
ORIG=${DEB_SOURCE}_${DEB_VERSION_UPSTREAM}
|
||||
|
||||
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
|
||||
|
@ -14,7 +12,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
|||
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
|
||||
%:
|
||||
%:
|
||||
dh $@ --parallel
|
||||
|
||||
override_dh_auto_install:
|
||||
|
@ -22,7 +20,7 @@ override_dh_auto_install:
|
|||
install --mode=0755 --owner=root test/syncevo-http-server.py \
|
||||
$(CURDIR)/debian/tmp/usr/bin/syncevo-http-server
|
||||
|
||||
override_dh_auto_configure:
|
||||
override_dh_auto_configure:
|
||||
sh autogen.sh
|
||||
dh_auto_configure -- --with-synthesis-src=none --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
|
@ -44,10 +42,14 @@ override_dh_auto_clean:
|
|||
dh_auto_clean
|
||||
|
||||
override_dh_makeshlibs:
|
||||
dh_makeshlibs -V'libsyncevolution0 (>= 1.5.2-3~)'
|
||||
dh_makeshlibs -V'libsyncevolution0 (>= 1.5.2-3~)' -plibsyncevolution0
|
||||
dh_makeshlibs -V'libsyncevo-dbus0 (>= 1.5.2-3~)' -plibsyncevo-dbus0
|
||||
dh_makeshlibs -V'libgdbussyncevo0 (>= 1.5.2-3~)' -plibgdbussyncevo0
|
||||
dh_makeshlibs --remaining-packages
|
||||
|
||||
get-orig-source:
|
||||
git archive --format=tar ${UPSTREAMTAG} --prefix=${SOURCEPKG}_${UPSTREAM}/ | gzip -9 > ../${ORIG}
|
||||
|
||||
get-orig-source:
|
||||
git archive --format=tar upstream/${DEB_VERSION_UPSTREAM} --prefix=${ORIG}/ | gzip -9 > ../${ORIG}.orig.tar.gz
|
||||
|
||||
PATCH_EXPORT_SCRIPT=/usr/share/gitpkg/hooks/quilt-patches-deb-export-hook
|
||||
export-patches:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
version=3
|
||||
|
||||
opts=dversionmangle=s/\+ds\d+$// \
|
||||
http://downloads.syncevolution.org/syncevolution/sources/syncevolution-(.*).tar.gz
|
||||
https://downloads.syncevolution.org/syncevolution/sources/syncevolution-(.*).tar.gz
|
||||
|
|
|
@ -0,0 +1,982 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check for baseline language coverage in the compiler for the specified
|
||||
# version of the C++ standard. If necessary, add switches to CXX and
|
||||
# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
|
||||
# or '14' (for the C++14 standard).
|
||||
#
|
||||
# The second argument, if specified, indicates whether you insist on an
|
||||
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
|
||||
# -std=c++11). If neither is specified, you get whatever works, with
|
||||
# preference for an extended mode.
|
||||
#
|
||||
# The third argument, if specified 'mandatory' or if left unspecified,
|
||||
# indicates that baseline support for the specified C++ standard is
|
||||
# required and that the macro should error out if no mode with that
|
||||
# support is found. If specified 'optional', then configuration proceeds
|
||||
# regardless, after defining HAVE_CXX${VERSION} if and only if a
|
||||
# supporting mode is found.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
|
||||
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
|
||||
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
|
||||
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
|
||||
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
|
||||
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
|
||||
# Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 7
|
||||
|
||||
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
|
||||
dnl (serial version number 13).
|
||||
|
||||
AX_REQUIRE_DEFINED([AC_MSG_WARN])
|
||||
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
|
||||
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
|
||||
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
|
||||
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
|
||||
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
|
||||
m4_if([$2], [], [],
|
||||
[$2], [ext], [],
|
||||
[$2], [noext], [],
|
||||
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
|
||||
m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
|
||||
[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
|
||||
[$3], [optional], [ax_cxx_compile_cxx$1_required=false],
|
||||
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
|
||||
AC_LANG_PUSH([C++])dnl
|
||||
ac_success=no
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
|
||||
ax_cv_cxx_compile_cxx$1,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[ax_cv_cxx_compile_cxx$1=yes],
|
||||
[ax_cv_cxx_compile_cxx$1=no])])
|
||||
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
|
||||
ac_success=yes
|
||||
fi
|
||||
|
||||
m4_if([$2], [noext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for alternative in ${ax_cxx_compile_alternatives}; do
|
||||
switch="-std=gnu++${alternative}"
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXX="$CXX"
|
||||
CXX="$CXX $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXX="$ac_save_CXX"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXX="$CXX $switch"
|
||||
if test -n "$CXXCPP" ; then
|
||||
CXXCPP="$CXXCPP $switch"
|
||||
fi
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
|
||||
m4_if([$2], [ext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
dnl HP's aCC needs +std=c++11 according to:
|
||||
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
|
||||
dnl Cray's crayCC needs "-h std=c++11"
|
||||
for alternative in ${ax_cxx_compile_alternatives}; do
|
||||
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXX="$CXX"
|
||||
CXX="$CXX $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXX="$ac_save_CXX"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXX="$CXX $switch"
|
||||
if test -n "$CXXCPP" ; then
|
||||
CXXCPP="$CXXCPP $switch"
|
||||
fi
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test x$ac_success = xyes; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
AC_LANG_POP([C++])
|
||||
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
|
||||
if test x$ac_success = xno; then
|
||||
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
|
||||
fi
|
||||
fi
|
||||
if test x$ac_success = xno; then
|
||||
HAVE_CXX$1=0
|
||||
AC_MSG_NOTICE([No compiler with C++$1 support was found])
|
||||
else
|
||||
HAVE_CXX$1=1
|
||||
AC_DEFINE(HAVE_CXX$1,1,
|
||||
[define if the compiler supports basic C++$1 syntax])
|
||||
fi
|
||||
AC_SUBST(HAVE_CXX$1)
|
||||
m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks may change in incompatible ways anytime])])
|
||||
])
|
||||
|
||||
|
||||
dnl Test body for checking C++11 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
)
|
||||
|
||||
|
||||
dnl Test body for checking C++14 support
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
)
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
|
||||
)
|
||||
|
||||
dnl Tests for new features in C++11
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++11, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201103L
|
||||
|
||||
#error "This is not a C++11 compiler"
|
||||
|
||||
#else
|
||||
|
||||
namespace cxx11
|
||||
{
|
||||
|
||||
namespace test_static_assert
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct check
|
||||
{
|
||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_final_override
|
||||
{
|
||||
|
||||
struct Base
|
||||
{
|
||||
virtual void f() {}
|
||||
};
|
||||
|
||||
struct Derived : public Base
|
||||
{
|
||||
virtual void f() override {}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_double_right_angle_brackets
|
||||
{
|
||||
|
||||
template < typename T >
|
||||
struct check {};
|
||||
|
||||
typedef check<void> single_type;
|
||||
typedef check<check<void>> double_type;
|
||||
typedef check<check<check<void>>> triple_type;
|
||||
typedef check<check<check<check<void>>>> quadruple_type;
|
||||
|
||||
}
|
||||
|
||||
namespace test_decltype
|
||||
{
|
||||
|
||||
int
|
||||
f()
|
||||
{
|
||||
int a = 1;
|
||||
decltype(a) b = 2;
|
||||
return a + b;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_type_deduction
|
||||
{
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
struct is_same
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
auto
|
||||
add(T1 a1, T2 a2) -> decltype(a1 + a2)
|
||||
{
|
||||
return a1 + a2;
|
||||
}
|
||||
|
||||
int
|
||||
test(const int c, volatile int v)
|
||||
{
|
||||
static_assert(is_same<int, decltype(0)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(c)>::value == false, "");
|
||||
static_assert(is_same<int, decltype(v)>::value == false, "");
|
||||
auto ac = c;
|
||||
auto av = v;
|
||||
auto sumi = ac + av + 'x';
|
||||
auto sumf = ac + av + 1.0;
|
||||
static_assert(is_same<int, decltype(ac)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(av)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(sumi)>::value == true, "");
|
||||
static_assert(is_same<int, decltype(sumf)>::value == false, "");
|
||||
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
|
||||
return (sumf > 0.0) ? sumi : add(c, v);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_noexcept
|
||||
{
|
||||
|
||||
int f() { return 0; }
|
||||
int g() noexcept { return 0; }
|
||||
|
||||
static_assert(noexcept(f()) == false, "");
|
||||
static_assert(noexcept(g()) == true, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_constexpr
|
||||
{
|
||||
|
||||
template < typename CharT >
|
||||
unsigned long constexpr
|
||||
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
|
||||
{
|
||||
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
|
||||
}
|
||||
|
||||
template < typename CharT >
|
||||
unsigned long constexpr
|
||||
strlen_c(const CharT *const s) noexcept
|
||||
{
|
||||
return strlen_c_r(s, 0UL);
|
||||
}
|
||||
|
||||
static_assert(strlen_c("") == 0UL, "");
|
||||
static_assert(strlen_c("1") == 1UL, "");
|
||||
static_assert(strlen_c("example") == 7UL, "");
|
||||
static_assert(strlen_c("another\0example") == 7UL, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_rvalue_references
|
||||
{
|
||||
|
||||
template < int N >
|
||||
struct answer
|
||||
{
|
||||
static constexpr int value = N;
|
||||
};
|
||||
|
||||
answer<1> f(int&) { return answer<1>(); }
|
||||
answer<2> f(const int&) { return answer<2>(); }
|
||||
answer<3> f(int&&) { return answer<3>(); }
|
||||
|
||||
void
|
||||
test()
|
||||
{
|
||||
int i = 0;
|
||||
const int c = 0;
|
||||
static_assert(decltype(f(i))::value == 1, "");
|
||||
static_assert(decltype(f(c))::value == 2, "");
|
||||
static_assert(decltype(f(0))::value == 3, "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_uniform_initialization
|
||||
{
|
||||
|
||||
struct test
|
||||
{
|
||||
static const int zero {};
|
||||
static const int one {1};
|
||||
};
|
||||
|
||||
static_assert(test::zero == 0, "");
|
||||
static_assert(test::one == 1, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambdas
|
||||
{
|
||||
|
||||
void
|
||||
test1()
|
||||
{
|
||||
auto lambda1 = [](){};
|
||||
auto lambda2 = lambda1;
|
||||
lambda1();
|
||||
lambda2();
|
||||
}
|
||||
|
||||
int
|
||||
test2()
|
||||
{
|
||||
auto a = [](int i, int j){ return i + j; }(1, 2);
|
||||
auto b = []() -> int { return '0'; }();
|
||||
auto c = [=](){ return a + b; }();
|
||||
auto d = [&](){ return c; }();
|
||||
auto e = [a, &b](int x) mutable {
|
||||
const auto identity = [](int y){ return y; };
|
||||
for (auto i = 0; i < a; ++i)
|
||||
a += b--;
|
||||
return x + identity(a + b);
|
||||
}(0);
|
||||
return a + b + c + d + e;
|
||||
}
|
||||
|
||||
int
|
||||
test3()
|
||||
{
|
||||
const auto nullary = [](){ return 0; };
|
||||
const auto unary = [](int x){ return x; };
|
||||
using nullary_t = decltype(nullary);
|
||||
using unary_t = decltype(unary);
|
||||
const auto higher1st = [](nullary_t f){ return f(); };
|
||||
const auto higher2nd = [unary](nullary_t f1){
|
||||
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
|
||||
};
|
||||
return higher1st(nullary) + higher2nd(nullary)(unary);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_variadic_templates
|
||||
{
|
||||
|
||||
template <int...>
|
||||
struct sum;
|
||||
|
||||
template <int N0, int... N1toN>
|
||||
struct sum<N0, N1toN...>
|
||||
{
|
||||
static constexpr auto value = N0 + sum<N1toN...>::value;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct sum<>
|
||||
{
|
||||
static constexpr auto value = 0;
|
||||
};
|
||||
|
||||
static_assert(sum<>::value == 0, "");
|
||||
static_assert(sum<1>::value == 1, "");
|
||||
static_assert(sum<23>::value == 23, "");
|
||||
static_assert(sum<1, 2>::value == 3, "");
|
||||
static_assert(sum<5, 5, 11>::value == 21, "");
|
||||
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
|
||||
|
||||
}
|
||||
|
||||
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
|
||||
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
|
||||
// because of this.
|
||||
namespace test_template_alias_sfinae
|
||||
{
|
||||
|
||||
struct foo {};
|
||||
|
||||
template<typename T>
|
||||
using member = typename T::member_type;
|
||||
|
||||
template<typename T>
|
||||
void func(...) {}
|
||||
|
||||
template<typename T>
|
||||
void func(member<T>*) {}
|
||||
|
||||
void test();
|
||||
|
||||
void test() { func<foo>(0); }
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx11
|
||||
|
||||
#endif // __cplusplus >= 201103L
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++14
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++14, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201402L
|
||||
|
||||
#error "This is not a C++14 compiler"
|
||||
|
||||
#else
|
||||
|
||||
namespace cxx14
|
||||
{
|
||||
|
||||
namespace test_polymorphic_lambdas
|
||||
{
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
const auto lambda = [](auto&&... args){
|
||||
const auto istiny = [](auto x){
|
||||
return (sizeof(x) == 1UL) ? 1 : 0;
|
||||
};
|
||||
const int aretiny[] = { istiny(args)... };
|
||||
return aretiny[0];
|
||||
};
|
||||
return lambda(1, 1L, 1.0f, '1');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_binary_literals
|
||||
{
|
||||
|
||||
constexpr auto ivii = 0b0000000000101010;
|
||||
static_assert(ivii == 42, "wrong value");
|
||||
|
||||
}
|
||||
|
||||
namespace test_generalized_constexpr
|
||||
{
|
||||
|
||||
template < typename CharT >
|
||||
constexpr unsigned long
|
||||
strlen_c(const CharT *const s) noexcept
|
||||
{
|
||||
auto length = 0UL;
|
||||
for (auto p = s; *p; ++p)
|
||||
++length;
|
||||
return length;
|
||||
}
|
||||
|
||||
static_assert(strlen_c("") == 0UL, "");
|
||||
static_assert(strlen_c("x") == 1UL, "");
|
||||
static_assert(strlen_c("test") == 4UL, "");
|
||||
static_assert(strlen_c("another\0test") == 7UL, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambda_init_capture
|
||||
{
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
auto x = 0;
|
||||
const auto lambda1 = [a = x](int b){ return a + b; };
|
||||
const auto lambda2 = [a = lambda1(x)](){ return a; };
|
||||
return lambda2();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_digit_separators
|
||||
{
|
||||
|
||||
constexpr auto ten_million = 100'000'000;
|
||||
static_assert(ten_million == 100000000, "");
|
||||
|
||||
}
|
||||
|
||||
namespace test_return_type_deduction
|
||||
{
|
||||
|
||||
auto f(int& x) { return x; }
|
||||
decltype(auto) g(int& x) { return x; }
|
||||
|
||||
template < typename T1, typename T2 >
|
||||
struct is_same
|
||||
{
|
||||
static constexpr auto value = false;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static constexpr auto value = true;
|
||||
};
|
||||
|
||||
int
|
||||
test()
|
||||
{
|
||||
auto x = 0;
|
||||
static_assert(is_same<int, decltype(f(x))>::value, "");
|
||||
static_assert(is_same<int&, decltype(g(x))>::value, "");
|
||||
return x;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx14
|
||||
|
||||
#endif // __cplusplus >= 201402L
|
||||
|
||||
]])
|
||||
|
||||
|
||||
dnl Tests for new features in C++17
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
|
||||
|
||||
// If the compiler admits that it is not ready for C++17, why torture it?
|
||||
// Hopefully, this will speed up the test.
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus <= 201402L
|
||||
|
||||
#error "This is not a C++17 compiler"
|
||||
|
||||
#else
|
||||
|
||||
#if defined(__clang__)
|
||||
#define REALLY_CLANG
|
||||
#else
|
||||
#if defined(__GNUC__)
|
||||
#define REALLY_GCC
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <initializer_list>
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
|
||||
namespace cxx17
|
||||
{
|
||||
|
||||
#if !defined(REALLY_CLANG)
|
||||
namespace test_constexpr_lambdas
|
||||
{
|
||||
|
||||
// TODO: test it with clang++ from git
|
||||
|
||||
constexpr int foo = [](){return 42;}();
|
||||
|
||||
}
|
||||
#endif // !defined(REALLY_CLANG)
|
||||
|
||||
namespace test::nested_namespace::definitions
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
namespace test_fold_expression
|
||||
{
|
||||
|
||||
template<typename... Args>
|
||||
int multiply(Args... args)
|
||||
{
|
||||
return (args * ... * 1);
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
bool all(Args... args)
|
||||
{
|
||||
return (args && ...);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_extended_static_assert
|
||||
{
|
||||
|
||||
static_assert (true);
|
||||
|
||||
}
|
||||
|
||||
namespace test_auto_brace_init_list
|
||||
{
|
||||
|
||||
auto foo = {5};
|
||||
auto bar {5};
|
||||
|
||||
static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
|
||||
static_assert(std::is_same<int, decltype(bar)>::value);
|
||||
}
|
||||
|
||||
namespace test_typename_in_template_template_parameter
|
||||
{
|
||||
|
||||
template<template<typename> typename X> struct D;
|
||||
|
||||
}
|
||||
|
||||
namespace test_fallthrough_nodiscard_maybe_unused_attributes
|
||||
{
|
||||
|
||||
int f1()
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
|
||||
[[nodiscard]] int f2()
|
||||
{
|
||||
[[maybe_unused]] auto unused = f1();
|
||||
|
||||
switch (f1())
|
||||
{
|
||||
case 17:
|
||||
f1();
|
||||
[[fallthrough]];
|
||||
case 42:
|
||||
f1();
|
||||
}
|
||||
return f1();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_extended_aggregate_initialization
|
||||
{
|
||||
|
||||
struct base1
|
||||
{
|
||||
int b1, b2 = 42;
|
||||
};
|
||||
|
||||
struct base2
|
||||
{
|
||||
base2() {
|
||||
b3 = 42;
|
||||
}
|
||||
int b3;
|
||||
};
|
||||
|
||||
struct derived : base1, base2
|
||||
{
|
||||
int d;
|
||||
};
|
||||
|
||||
derived d1 {{1, 2}, {}, 4}; // full initialization
|
||||
derived d2 {{}, {}, 4}; // value-initialized bases
|
||||
|
||||
}
|
||||
|
||||
namespace test_general_range_based_for_loop
|
||||
{
|
||||
|
||||
struct iter
|
||||
{
|
||||
int i;
|
||||
|
||||
int& operator* ()
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
const int& operator* () const
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
iter& operator++()
|
||||
{
|
||||
++i;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
struct sentinel
|
||||
{
|
||||
int i;
|
||||
};
|
||||
|
||||
bool operator== (const iter& i, const sentinel& s)
|
||||
{
|
||||
return i.i == s.i;
|
||||
}
|
||||
|
||||
bool operator!= (const iter& i, const sentinel& s)
|
||||
{
|
||||
return !(i == s);
|
||||
}
|
||||
|
||||
struct range
|
||||
{
|
||||
iter begin() const
|
||||
{
|
||||
return {0};
|
||||
}
|
||||
|
||||
sentinel end() const
|
||||
{
|
||||
return {5};
|
||||
}
|
||||
};
|
||||
|
||||
void f()
|
||||
{
|
||||
range r {};
|
||||
|
||||
for (auto i : r)
|
||||
{
|
||||
[[maybe_unused]] auto v = i;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_lambda_capture_asterisk_this_by_value
|
||||
{
|
||||
|
||||
struct t
|
||||
{
|
||||
int i;
|
||||
int foo()
|
||||
{
|
||||
return [*this]()
|
||||
{
|
||||
return i;
|
||||
}();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace test_enum_class_construction
|
||||
{
|
||||
|
||||
enum class byte : unsigned char
|
||||
{};
|
||||
|
||||
byte foo {42};
|
||||
|
||||
}
|
||||
|
||||
namespace test_constexpr_if
|
||||
{
|
||||
|
||||
template <bool cond>
|
||||
int f ()
|
||||
{
|
||||
if constexpr(cond)
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace test_selection_statement_with_initializer
|
||||
{
|
||||
|
||||
int f()
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
|
||||
int f2()
|
||||
{
|
||||
if (auto i = f(); i > 0)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
switch (auto i = f(); i + 4)
|
||||
{
|
||||
case 17:
|
||||
return 2;
|
||||
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if !defined(REALLY_CLANG)
|
||||
namespace test_template_argument_deduction_for_class_templates
|
||||
{
|
||||
|
||||
// TODO: test it with clang++ from git
|
||||
|
||||
template <typename T1, typename T2>
|
||||
struct pair
|
||||
{
|
||||
pair (T1 p1, T2 p2)
|
||||
: m1 {p1},
|
||||
m2 {p2}
|
||||
{}
|
||||
|
||||
T1 m1;
|
||||
T2 m2;
|
||||
};
|
||||
|
||||
void f()
|
||||
{
|
||||
[[maybe_unused]] auto p = pair{13, 42u};
|
||||
}
|
||||
|
||||
}
|
||||
#endif // !defined(REALLY_CLANG)
|
||||
|
||||
namespace test_non_type_auto_template_parameters
|
||||
{
|
||||
|
||||
template <auto n>
|
||||
struct B
|
||||
{};
|
||||
|
||||
B<5> b1;
|
||||
B<'a'> b2;
|
||||
|
||||
}
|
||||
|
||||
#if !defined(REALLY_CLANG)
|
||||
namespace test_structured_bindings
|
||||
{
|
||||
|
||||
// TODO: test it with clang++ from git
|
||||
|
||||
int arr[2] = { 1, 2 };
|
||||
std::pair<int, int> pr = { 1, 2 };
|
||||
|
||||
auto f1() -> int(&)[2]
|
||||
{
|
||||
return arr;
|
||||
}
|
||||
|
||||
auto f2() -> std::pair<int, int>&
|
||||
{
|
||||
return pr;
|
||||
}
|
||||
|
||||
struct S
|
||||
{
|
||||
int x1 : 2;
|
||||
volatile double y1;
|
||||
};
|
||||
|
||||
S f3()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
auto [ x1, y1 ] = f1();
|
||||
auto& [ xr1, yr1 ] = f1();
|
||||
auto [ x2, y2 ] = f2();
|
||||
auto& [ xr2, yr2 ] = f2();
|
||||
const auto [ x3, y3 ] = f3();
|
||||
|
||||
}
|
||||
#endif // !defined(REALLY_CLANG)
|
||||
|
||||
#if !defined(REALLY_CLANG)
|
||||
namespace test_exception_spec_type_system
|
||||
{
|
||||
|
||||
// TODO: test it with clang++ from git
|
||||
|
||||
struct Good {};
|
||||
struct Bad {};
|
||||
|
||||
void g1() noexcept;
|
||||
void g2();
|
||||
|
||||
template<typename T>
|
||||
Bad
|
||||
f(T*, T*);
|
||||
|
||||
template<typename T1, typename T2>
|
||||
Good
|
||||
f(T1*, T2*);
|
||||
|
||||
static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
|
||||
|
||||
}
|
||||
#endif // !defined(REALLY_CLANG)
|
||||
|
||||
namespace test_inline_variables
|
||||
{
|
||||
|
||||
template<class T> void f(T)
|
||||
{}
|
||||
|
||||
template<class T> inline T g(T)
|
||||
{
|
||||
return T{};
|
||||
}
|
||||
|
||||
template<> inline void f<>(int)
|
||||
{}
|
||||
|
||||
template<> int g<>(int)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace cxx17
|
||||
|
||||
#endif // __cplusplus <= 201402L
|
||||
|
||||
]])
|
|
@ -0,0 +1,39 @@
|
|||
# =============================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
|
||||
# =============================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check for baseline language coverage in the compiler for the C++11
|
||||
# standard; if necessary, add switches to CXX and CXXCPP to enable
|
||||
# support.
|
||||
#
|
||||
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
|
||||
# macro with the version set to C++11. The two optional arguments are
|
||||
# forwarded literally as the second and third argument respectively.
|
||||
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
|
||||
# more information. If you want to use this macro, you also need to
|
||||
# download the ax_cxx_compile_stdcxx.m4 file.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
|
||||
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
|
||||
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
|
||||
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
|
||||
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
|
||||
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 18
|
||||
|
||||
AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
|
||||
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])
|
|
@ -0,0 +1,34 @@
|
|||
# =============================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_14.html
|
||||
# =============================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_COMPILE_STDCXX_14([ext|noext], [mandatory|optional])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check for baseline language coverage in the compiler for the C++14
|
||||
# standard; if necessary, add switches to CXX and CXXCPP to enable
|
||||
# support.
|
||||
#
|
||||
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
|
||||
# macro with the version set to C++14. The two optional arguments are
|
||||
# forwarded literally as the second and third argument respectively.
|
||||
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
|
||||
# more information. If you want to use this macro, you also need to
|
||||
# download the ax_cxx_compile_stdcxx.m4 file.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 5
|
||||
|
||||
AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
|
||||
AC_DEFUN([AX_CXX_COMPILE_STDCXX_14], [AX_CXX_COMPILE_STDCXX([14], [$1], [$2])])
|
|
@ -188,7 +188,7 @@ static TestingSyncSource *createEASSource(const ClientTestConfig::createsource_t
|
|||
const std::string &clientID,
|
||||
int source, bool isSourceA)
|
||||
{
|
||||
std::auto_ptr<TestingSyncSource> res(create(client, clientID, source, isSourceA));
|
||||
std::unique_ptr<TestingSyncSource> res(create(client, clientID, source, isSourceA));
|
||||
|
||||
// Mangle username: if the base username in the config is account
|
||||
// "foo", then source B uses "foo_B", because otherwise it'll end
|
||||
|
|
|
@ -16,6 +16,6 @@ src_backends_akonadi_syncakonadi_la_SOURCES = \
|
|||
src/backends/akonadi/akonadisyncsource.cpp
|
||||
src_backends_akonadi_syncakonadi_la_LIBADD = $(KDEPIM_LIBS) $(SYNCEVOLUTION_LIBS)
|
||||
src_backends_akonadi_syncakonadi_la_LDFLAGS = -module -avoid-version
|
||||
src_backends_akonadi_syncakonadi_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) $(SYNCEVO_WFLAGS)
|
||||
src_backends_akonadi_syncakonadi_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) $(SYNCEVO_WFLAGS_DEPRECATED)
|
||||
src_backends_akonadi_syncakonadi_la_CPPFLAGS = $(SYNCEVOLUTION_CFLAGS) -I$(top_srcdir)/test $(BACKEND_CPPFLAGS)
|
||||
src_backends_akonadi_syncakonadi_la_DEPENDENCIES = src/syncevo/libsyncevolution.la
|
||||
|
|
|
@ -56,7 +56,7 @@ using namespace Akonadi;
|
|||
*
|
||||
* To avoid double frees, we need to disable auto-deletion.
|
||||
* This method does that. Use like this:
|
||||
* std::auto_ptr<CollectionStatisticsJob> statisticsJob(DisableAutoDelete(new CollectionStatisticsJob(m_collection)));
|
||||
* std::unique_ptr<CollectionStatisticsJob> statisticsJob(DisableAutoDelete(new CollectionStatisticsJob(m_collection)));
|
||||
*/
|
||||
template<class J> J *DisableAutoDelete(J *job) { job->setAutoDelete(false); return job; }
|
||||
|
||||
|
@ -80,7 +80,7 @@ bool AkonadiSyncSource::isEmpty()
|
|||
}
|
||||
|
||||
//To Check if the respective collection is Empty, without actually loading the collections
|
||||
std::auto_ptr<CollectionStatisticsJob> statisticsJob(DisableAutoDelete(new CollectionStatisticsJob(m_collection)));
|
||||
std::unique_ptr<CollectionStatisticsJob> statisticsJob(DisableAutoDelete(new CollectionStatisticsJob(m_collection)));
|
||||
if (!statisticsJob->exec()) {
|
||||
throwError(SE_HERE, "Error fetching the collection stats");
|
||||
}
|
||||
|
@ -129,8 +129,8 @@ SyncSource::Databases AkonadiSyncSource::getDatabases()
|
|||
// as the default one used by the source.
|
||||
// res.push_back("Contacts", "some-KDE-specific-ID", isDefault);
|
||||
|
||||
std::auto_ptr<CollectionFetchJob> fetchJob(DisableAutoDelete(new CollectionFetchJob(Collection::root(),
|
||||
CollectionFetchJob::Recursive)));
|
||||
std::unique_ptr<CollectionFetchJob> fetchJob(DisableAutoDelete(new CollectionFetchJob(Collection::root(),
|
||||
CollectionFetchJob::Recursive)));
|
||||
|
||||
fetchJob->fetchScope().setContentMimeTypes(m_mimeTypes);
|
||||
|
||||
|
@ -193,8 +193,8 @@ void AkonadiSyncSource::open()
|
|||
// Verify that the collection exists and ensure that
|
||||
// m_collection.contentMimeTypes() returns valid information. The
|
||||
// collection constructed so far only contains the collection ID.
|
||||
std::auto_ptr<CollectionFetchJob> fetchJob(DisableAutoDelete(new CollectionFetchJob(m_collection,
|
||||
CollectionFetchJob::Base)));
|
||||
std::unique_ptr<CollectionFetchJob> fetchJob(DisableAutoDelete(new CollectionFetchJob(m_collection,
|
||||
CollectionFetchJob::Base)));
|
||||
if (!fetchJob->exec()) {
|
||||
throwError(SE_HERE, StringPrintf("cannot fetch collection %s", id.c_str()));
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ void AkonadiSyncSource::listAllItems(SyncSourceRevisions::RevisionMap_t &revisio
|
|||
}
|
||||
|
||||
// copy all local IDs and the corresponding revision
|
||||
std::auto_ptr<ItemFetchJob> fetchJob(DisableAutoDelete(new ItemFetchJob(m_collection)));
|
||||
std::unique_ptr<ItemFetchJob> fetchJob(DisableAutoDelete(new ItemFetchJob(m_collection)));
|
||||
if (!fetchJob->exec()) {
|
||||
throwError(SE_HERE, "listing items");
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ TrackingSyncSource::InsertItemResult AkonadiSyncSource::insertItem(const std::st
|
|||
if (luid.empty()) {
|
||||
item.setMimeType(m_mimeTypes.front());
|
||||
item.setPayloadFromData(QByteArray(data.c_str()));
|
||||
std::auto_ptr<ItemCreateJob> createJob(DisableAutoDelete(new ItemCreateJob(item, m_collection)));
|
||||
std::unique_ptr<ItemCreateJob> createJob(DisableAutoDelete(new ItemCreateJob(item, m_collection)));
|
||||
if (!createJob->exec()) {
|
||||
throwError(SE_HERE, string("storing new item ") + luid);
|
||||
return InsertItemResult("", "", ITEM_OKAY);
|
||||
|
@ -268,13 +268,13 @@ TrackingSyncSource::InsertItemResult AkonadiSyncSource::insertItem(const std::st
|
|||
item = createJob->item();
|
||||
} else {
|
||||
Entity::Id syncItemId = QByteArray(luid.c_str()).toLongLong();
|
||||
std::auto_ptr<ItemFetchJob> fetchJob(DisableAutoDelete(new ItemFetchJob(Item(syncItemId))));
|
||||
std::unique_ptr<ItemFetchJob> fetchJob(DisableAutoDelete(new ItemFetchJob(Item(syncItemId))));
|
||||
if (!fetchJob->exec()) {
|
||||
throwError(SE_HERE, string("checking item ") + luid);
|
||||
}
|
||||
item = fetchJob->items().first();
|
||||
item.setPayloadFromData(QByteArray(data.c_str()));
|
||||
std::auto_ptr<ItemModifyJob> modifyJob(DisableAutoDelete(new ItemModifyJob(item)));
|
||||
std::unique_ptr<ItemModifyJob> modifyJob(DisableAutoDelete(new ItemModifyJob(item)));
|
||||
// TODO: SyncEvolution must pass the known revision that
|
||||
// we are updating.
|
||||
// TODO: check that the item has not been updated in the meantime
|
||||
|
@ -304,7 +304,7 @@ void AkonadiSyncSource::removeItem(const string &luid)
|
|||
|
||||
// Delete the item from our collection
|
||||
// TODO: check that the revision is right (need revision from SyncEvolution)
|
||||
std::auto_ptr<ItemDeleteJob> deleteJob(DisableAutoDelete(new ItemDeleteJob(Item(syncItemId))));
|
||||
std::unique_ptr<ItemDeleteJob> deleteJob(DisableAutoDelete(new ItemDeleteJob(Item(syncItemId))));
|
||||
if (!deleteJob->exec()) {
|
||||
throwError(SE_HERE, string("deleting item " ) + luid);
|
||||
}
|
||||
|
@ -319,7 +319,7 @@ void AkonadiSyncSource::readItem(const std::string &luid, std::string &data, boo
|
|||
|
||||
Entity::Id syncItemId = QByteArray(luid.c_str()).toLongLong();
|
||||
|
||||
std::auto_ptr<ItemFetchJob> fetchJob(DisableAutoDelete(new ItemFetchJob(Item(syncItemId))));
|
||||
std::unique_ptr<ItemFetchJob> fetchJob(DisableAutoDelete(new ItemFetchJob(Item(syncItemId))));
|
||||
fetchJob->fetchScope().fetchFullPayload();
|
||||
if (fetchJob->exec()) {
|
||||
if (fetchJob->items().empty()) {
|
||||
|
|
|
@ -66,7 +66,6 @@ EClientCXX EvolutionSyncSource::openESource(const char *extension,
|
|||
ESourceListCXX sources(e_source_registry_list_sources(registry, extension));
|
||||
string id = getDatabaseID();
|
||||
ESource *source = findSource(sources, id);
|
||||
bool created = false;
|
||||
|
||||
if (!source) {
|
||||
if (refBuiltin && (id.empty() || id == "<<system>>")) {
|
||||
|
@ -78,7 +77,6 @@ EClientCXX EvolutionSyncSource::openESource(const char *extension,
|
|||
} else {
|
||||
throwError(SE_HERE, string("database not found: '") + id + "'");
|
||||
}
|
||||
created = true;
|
||||
} else {
|
||||
client = EClientCXX::steal(newClient(source, gerror));
|
||||
}
|
||||
|
@ -95,19 +93,19 @@ EClientCXX EvolutionSyncSource::openESource(const char *extension,
|
|||
(void *)"Evolution Data Server has died unexpectedly.");
|
||||
|
||||
|
||||
int retries = 0;
|
||||
while (true) {
|
||||
// Always allow EDS to create the database. "only-if-exists =
|
||||
// true" does not make sense.
|
||||
if (!e_client_open_sync(client, false, NULL, gerror)) {
|
||||
if (gerror && g_error_matches(gerror, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY)) {
|
||||
if (retries < 5) {
|
||||
// EDS 3.18 and 3.26 have various race conditions during startup.
|
||||
// Try a few times.
|
||||
// https://bugzilla.gnome.org/show_bug.cgi?id=791306
|
||||
SE_LOG_DEBUG(NULL, "Opening EDS source: ignoring error, trying again: %s", gerror->message);
|
||||
gerror.clear();
|
||||
sleep(1);
|
||||
} else if (created) {
|
||||
// Opening newly created address books often failed in
|
||||
// old EDS releases - try again. Probably covered by
|
||||
// more recently added E_CLIENT_ERROR_BUSY check above.
|
||||
gerror.clear();
|
||||
sleep(5);
|
||||
retries++;
|
||||
} else {
|
||||
throwError(SE_HERE, "opening database", gerror);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#ifdef USE_GNOME_KEYRING
|
||||
|
||||
extern "C" {
|
||||
#include <gnome-keyring.h>
|
||||
#include <libsecret/secret.h>
|
||||
}
|
||||
|
||||
#include "GNOMEPlatform.h"
|
||||
|
@ -30,46 +30,11 @@ extern "C" {
|
|||
#include <syncevo/Exception.h>
|
||||
#include <syncevo/UserInterface.h>
|
||||
#include <syncevo/SyncConfig.h>
|
||||
#include <syncevo/GLibSupport.h>
|
||||
|
||||
#include <syncevo/declarations.h>
|
||||
SE_BEGIN_CXX
|
||||
|
||||
// Occasionally, libgnome-keyring fails with the following error messages:
|
||||
// Gkr: received an invalid, unencryptable, or non-utf8 secret
|
||||
// Gkr: call to daemon returned an invalid response: (null).(null)
|
||||
//
|
||||
// We work around that by retrying the operation a few times, for at
|
||||
// most this period of time. Didn't really help, so disable it for now
|
||||
// by using a zero duration.
|
||||
static const double GNOMEKeyringRetryDuration = 2; // seconds
|
||||
static const double GNOMEKeyringRetryInterval = 0.1; // seconds
|
||||
|
||||
/**
|
||||
* libgnome-keyring has an internal gkr_reset_session()
|
||||
* method which gets called when the "org.freedesktop.secrets"
|
||||
* disconnects from the D-Bus session bus.
|
||||
*
|
||||
* We cannot call that method directly, but we can get it called by
|
||||
* faking the "disconnect" signal. That works because
|
||||
* on_connection_filter() in gkr-operation.c doesn't check who the
|
||||
* sender of the signal is.
|
||||
*
|
||||
* Once gkr_reset_session() got called, the next operation will
|
||||
* re-establish the connection. After the failure above, the second
|
||||
* attempt usually works.
|
||||
*
|
||||
* Any other client using libgnome-keyring will also be tricked into
|
||||
* disconnecting temporarily. That should be fine, any running
|
||||
* operation will continue to run and complete (?).
|
||||
*/
|
||||
static void FlushGNOMEKeyring()
|
||||
{
|
||||
// Invoking dbus-send is easier than writing this in C++.
|
||||
// Besides, it ensures that the signal comes from some other
|
||||
// process. Not sure whether signals are sent back to the sender.
|
||||
system("dbus-send --session --type=signal /org/freedesktop/DBus org.freedesktop.DBus.NameOwnerChanged string:'org.freedesktop.secrets' string:':9.99' string:''");
|
||||
}
|
||||
|
||||
/**
|
||||
* GNOME keyring distinguishes between empty and unset
|
||||
* password keys. This function returns NULL for an
|
||||
|
@ -97,6 +62,56 @@ static bool UseGNOMEKeyring(const InitStateTri &keyring)
|
|||
return true;
|
||||
}
|
||||
|
||||
class LibSecretHash : public GHashTableCXX
|
||||
{
|
||||
std::list<std::string> m_buffer;
|
||||
|
||||
public:
|
||||
LibSecretHash(const ConfigPasswordKey &key) :
|
||||
GHashTableCXX(g_hash_table_new(g_str_hash, g_str_equal), TRANSFER_REF)
|
||||
{
|
||||
// see https://developer.gnome.org/libsecret/0.16/libsecret-SecretSchema.html#SECRET-SCHEMA-COMPAT-NETWORK:CAPS
|
||||
insert("user", key.user);
|
||||
insert("domain", key.domain);
|
||||
insert("server", key.server);
|
||||
insert("object", key.object);
|
||||
insert("protocol", key.protocol);
|
||||
insert("authtype", key.authtype);
|
||||
if (key.port) {
|
||||
std::string value = StringPrintf("%d", key.port);
|
||||
insert("port", value);
|
||||
}
|
||||
}
|
||||
|
||||
/** Keys are expected to be constants and not copied. Values are copied. */
|
||||
void insert(const char *key, const std::string &value)
|
||||
{
|
||||
if (!value.empty()) {
|
||||
m_buffer.push_back(value);
|
||||
g_hash_table_insert(get(),
|
||||
const_cast<char *>(key),
|
||||
const_cast<char *>(m_buffer.back().c_str()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Sometimes libsecret and GNOME Keyring fail to initialize
|
||||
* the encryption: https://bugzilla.gnome.org/show_bug.cgi?id=778357
|
||||
* If that happens, then trying with a new SecretService instance
|
||||
* may work.
|
||||
*
|
||||
* When libsecret detects that, we get a well-defined error.
|
||||
* When GNOME Keyring detects it, the error is less obvious.
|
||||
*/
|
||||
static bool IsSharedSecretError(const GErrorCXX &gerror)
|
||||
{
|
||||
bool result = gerror.matches(SECRET_ERROR, SECRET_ERROR_PROTOCOL) /* = "received an invalid or unencryptable secret" */ ||
|
||||
strstr(gerror->message, "The secret was transferred or encrypted in an invalid way");
|
||||
SE_LOG_DEBUG(NULL, "IsSharedSecretError: %d/%d/%s: %s", (int)gerror->domain, (int)gerror->code, gerror->message, result ? "yes" : "no");
|
||||
return result;
|
||||
}
|
||||
|
||||
bool GNOMELoadPasswordSlot(const InitStateTri &keyring,
|
||||
const std::string &passwordName,
|
||||
const std::string &descr,
|
||||
|
@ -108,46 +123,49 @@ bool GNOMELoadPasswordSlot(const InitStateTri &keyring,
|
|||
return false;
|
||||
}
|
||||
|
||||
GnomeKeyringResult result = GNOME_KEYRING_RESULT_OK;
|
||||
GList* list;
|
||||
Timespec start = Timespec::monotonic();
|
||||
double sleepSecs = 0;
|
||||
do {
|
||||
if (sleepSecs != 0) {
|
||||
SE_LOG_DEBUG(NULL, "%s: previous attempt to load password '%s' from GNOME keyring failed, will try again: %s",
|
||||
key.description.c_str(),
|
||||
key.toString().c_str(),
|
||||
gnome_keyring_result_to_message(result));
|
||||
FlushGNOMEKeyring();
|
||||
Sleep(sleepSecs);
|
||||
}
|
||||
result = gnome_keyring_find_network_password_sync(passwdStr(key.user),
|
||||
passwdStr(key.domain),
|
||||
passwdStr(key.server),
|
||||
passwdStr(key.object),
|
||||
passwdStr(key.protocol),
|
||||
passwdStr(key.authtype),
|
||||
key.port,
|
||||
&list);
|
||||
sleepSecs = GNOMEKeyringRetryInterval;
|
||||
} while (result != GNOME_KEYRING_RESULT_OK &&
|
||||
(Timespec::monotonic() - start).duration() < GNOMEKeyringRetryDuration);
|
||||
LibSecretHash hash(key);
|
||||
for (int i = 0; ; i++ ) {
|
||||
GErrorCXX gerror;
|
||||
PlainGStr result(secret_password_lookupv_sync(SECRET_SCHEMA_COMPAT_NETWORK,
|
||||
hash,
|
||||
NULL,
|
||||
gerror));
|
||||
|
||||
// if find password stored in gnome keyring
|
||||
if(result == GNOME_KEYRING_RESULT_OK && list && list->data ) {
|
||||
GnomeKeyringNetworkPasswordData *key_data;
|
||||
key_data = (GnomeKeyringNetworkPasswordData*)list->data;
|
||||
password = std::string(key_data->password);
|
||||
gnome_keyring_network_password_list_free(list);
|
||||
SE_LOG_DEBUG(NULL, "%s: loaded password from GNOME keyring using %s",
|
||||
key.description.c_str(),
|
||||
key.toString().c_str());
|
||||
} else {
|
||||
SE_LOG_DEBUG(NULL, "password not in GNOME keyring using %s: %s",
|
||||
key.toString().c_str(),
|
||||
result == GNOME_KEYRING_RESULT_NO_MATCH ? "no match" :
|
||||
result != GNOME_KEYRING_RESULT_OK ? gnome_keyring_result_to_message(result) :
|
||||
"empty result list");
|
||||
// if find password stored in gnome keyring
|
||||
if (gerror) {
|
||||
/* It is uncertain whether we end up here at all when such
|
||||
an error occurs. Check just in case. */
|
||||
if (IsSharedSecretError(gerror) &&
|
||||
i < 3) {
|
||||
SE_LOG_DEBUG(NULL, "disconnecting secret service: %u/%d = %s", gerror->domain, gerror->code, gerror->message);
|
||||
secret_service_disconnect();
|
||||
} else {
|
||||
gerror.throwError(SE_HERE, StringPrintf("looking up password '%s'", descr.c_str()));
|
||||
}
|
||||
} else if (result.get()) {
|
||||
SE_LOG_DEBUG(NULL, "%s: loaded password from GNOME keyring using %s",
|
||||
key.description.c_str(),
|
||||
key.toString().c_str());
|
||||
password = result;
|
||||
break;
|
||||
} else {
|
||||
/*
|
||||
* There have been cases where "received an invalid or
|
||||
* unencryptable secret" was printed to the console right
|
||||
* before we end up here. Apparently the error doesn't
|
||||
* get propagated properly to us.
|
||||
*
|
||||
* To cope with that, we try to disconnect and check again.
|
||||
*/
|
||||
if (i < 3) {
|
||||
SE_LOG_DEBUG(NULL, "disconnecting secret service: password not found");
|
||||
secret_service_disconnect();
|
||||
} else {
|
||||
SE_LOG_DEBUG(NULL, "password not in GNOME keyring using %s",
|
||||
key.toString().c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -173,40 +191,38 @@ bool GNOMESavePasswordSlot(const InitStateTri &keyring,
|
|||
key.toString().c_str()));
|
||||
}
|
||||
|
||||
guint32 itemId;
|
||||
GnomeKeyringResult result = GNOME_KEYRING_RESULT_OK;
|
||||
// write password to keyring
|
||||
Timespec start = Timespec::monotonic();
|
||||
double sleepSecs = 0;
|
||||
do {
|
||||
if (sleepSecs != 0) {
|
||||
SE_LOG_DEBUG(NULL, "%s: previous attempt to save password '%s' in GNOME keyring failed, will try again: %s",
|
||||
key.description.c_str(),
|
||||
key.toString().c_str(),
|
||||
gnome_keyring_result_to_message(result));
|
||||
FlushGNOMEKeyring();
|
||||
Sleep(sleepSecs);
|
||||
}
|
||||
result = gnome_keyring_set_network_password_sync(NULL,
|
||||
passwdStr(key.user),
|
||||
passwdStr(key.domain),
|
||||
passwdStr(key.server),
|
||||
passwdStr(key.object),
|
||||
passwdStr(key.protocol),
|
||||
passwdStr(key.authtype),
|
||||
key.port,
|
||||
password.c_str(),
|
||||
&itemId);
|
||||
sleepSecs = GNOMEKeyringRetryInterval;
|
||||
} while (result != GNOME_KEYRING_RESULT_OK &&
|
||||
(Timespec::monotonic() - start).duration() < GNOMEKeyringRetryDuration);
|
||||
if (result != GNOME_KEYRING_RESULT_OK) {
|
||||
Exception::throwError(SE_HERE, StringPrintf("%s: saving password '%s' in GNOME keyring failed: %s",
|
||||
key.description.c_str(),
|
||||
key.toString().c_str(),
|
||||
gnome_keyring_result_to_message(result)));
|
||||
LibSecretHash hash(key);
|
||||
std::string label;
|
||||
if (!key.user.empty() && !key.server.empty()) {
|
||||
// This emulates the behavior of libgnomekeyring.
|
||||
label = key.user + "@" + key.server;
|
||||
} else {
|
||||
label = passwordName;
|
||||
}
|
||||
for (int i = 0; ; i++) {
|
||||
GErrorCXX gerror;
|
||||
gboolean result = secret_password_storev_sync(SECRET_SCHEMA_COMPAT_NETWORK,
|
||||
hash,
|
||||
NULL,
|
||||
label.c_str(),
|
||||
password.c_str(),
|
||||
NULL,
|
||||
gerror);
|
||||
if (result) {
|
||||
SE_LOG_DEBUG(NULL, "saved password in GNOME keyring using %s", key.toString().c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
if (IsSharedSecretError(gerror) &&
|
||||
i < 3) {
|
||||
SE_LOG_DEBUG(NULL, "disconnecting secret service: %u/%d = %s", gerror->domain, gerror->code, gerror->message);
|
||||
secret_service_disconnect();
|
||||
} else {
|
||||
gerror.throwError(SE_HERE, StringPrintf("%s: saving password '%s' in GNOME keyring",
|
||||
key.description.c_str(),
|
||||
key.toString().c_str()));
|
||||
}
|
||||
}
|
||||
SE_LOG_DEBUG(NULL, "saved password in GNOME keyring using %s", key.toString().c_str());
|
||||
|
||||
// handled
|
||||
return true;
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
PKG_CHECK_MODULES(KEYRING, [gnome-keyring-1 >= 2.20], HAVE_KEYRING=yes, HAVE_KEYRING=no)
|
||||
# According to https://developer.gnome.org/libsecret/0.16/libsecret-Password-storage.html#secret-password-store-sync
|
||||
# the simple API was still considered unstable. All supported distros
|
||||
# now have 0.18 where the API is stable.
|
||||
PKG_CHECK_MODULES(KEYRING, [libsecret-1 >= 0.18], HAVE_KEYRING=yes, HAVE_KEYRING=no)
|
||||
AC_ARG_ENABLE(gnome-keyring,
|
||||
AS_HELP_STRING([--enable-gnome-keyring],
|
||||
[enables or disables support for the GNOME keyring; default is on if development files are available]),
|
||||
[enables or disables support for the GNOME keyring via libsecret; default is on if development files are available]),
|
||||
[enable_gnome_keyring="$enableval"
|
||||
test "$enable_gnome_keyring" = "yes" || test "$enable_gnome_keyring" = "no" || AC_MSG_ERROR([invalid value for --enable-gnome-keyring: $enable_gnome_keyring])
|
||||
test "$enable_gnome_keyring" = "no" || test "$HAVE_KEYRING" = "yes" || AC_MSG_ERROR([gnome-keyring-1 pkg >= 2.20 not found, needed for --enable-gnome-keyring])],
|
||||
test "$enable_gnome_keyring" = "no" || test "$HAVE_KEYRING" = "yes" || AC_MSG_ERROR([libsecret-1 >= 0.18 not found, needed for --enable-gnome-keyring])],
|
||||
enable_gnome_keyring="$HAVE_KEYRING")
|
||||
if test $enable_gnome_keyring = "yes"; then
|
||||
have_keyring=yes
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <syncevo/GLibSupport.h>
|
||||
#include <syncevo/GVariantSupport.h>
|
||||
#include <syncevo/SoupTransportAgent.h>
|
||||
#include <syncevo/CurlTransportAgent.h>
|
||||
#include <json.h>
|
||||
|
||||
#include <syncevo/declarations.h>
|
||||
|
@ -54,10 +55,10 @@ public:
|
|||
m_refreshToken(refreshToken)
|
||||
{
|
||||
#ifdef ENABLE_LIBSOUP
|
||||
boost::shared_ptr<SoupTransportAgent> agent(new SoupTransportAgent(static_cast<GMainLoop *>(NULL)));
|
||||
m_agent = agent;
|
||||
m_agent = SoupTransportAgent::create(static_cast<GMainLoop *>(NULL));
|
||||
#elif defined(ENABLE_LIBCURL)
|
||||
m_agent = new CurlTransportAgent();
|
||||
boost::shared_ptr<CurlTransportAgent> agent(new CurlTransportAgent());
|
||||
m_agent = agent;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -291,7 +291,7 @@ private:
|
|||
|
||||
PbapSyncSource &m_parent;
|
||||
boost::weak_ptr<PbapSession> m_self;
|
||||
std::auto_ptr<GDBusCXX::DBusRemoteObject> m_client;
|
||||
std::unique_ptr<GDBusCXX::DBusRemoteObject> m_client;
|
||||
bool m_frozen;
|
||||
enum {
|
||||
OBEXD_OLD, // obexd < 0.47
|
||||
|
@ -333,14 +333,14 @@ private:
|
|||
Transfers m_transfers;
|
||||
std::string m_currentTransfer;
|
||||
|
||||
std::auto_ptr<GDBusCXX::SignalWatch3<GDBusCXX::Path_t, std::string, std::string> >
|
||||
std::unique_ptr<GDBusCXX::SignalWatch3<GDBusCXX::Path_t, std::string, std::string> >
|
||||
m_errorSignal;
|
||||
void errorCb(const GDBusCXX::Path_t &path, const std::string &error,
|
||||
const std::string &msg);
|
||||
|
||||
// Bluez 5
|
||||
typedef GDBusCXX::SignalWatch4<GDBusCXX::Path_t, std::string, Params, std::vector<std::string> > PropChangedSignal_t;
|
||||
std::auto_ptr<PropChangedSignal_t> m_propChangedSignal;
|
||||
std::unique_ptr<PropChangedSignal_t> m_propChangedSignal;
|
||||
void propChangedCb(const GDBusCXX::Path_t &path,
|
||||
const std::string &interface,
|
||||
const Params &changed,
|
||||
|
@ -348,13 +348,13 @@ private:
|
|||
|
||||
// new obexd API
|
||||
typedef GDBusCXX::SignalWatch1<GDBusCXX::Path_t> CompleteSignal_t;
|
||||
std::auto_ptr<CompleteSignal_t> m_completeSignal;
|
||||
std::unique_ptr<CompleteSignal_t> m_completeSignal;
|
||||
void completeCb(const GDBusCXX::Path_t &path);
|
||||
typedef GDBusCXX::SignalWatch3<GDBusCXX::Path_t, std::string, boost::variant<int64_t> > PropertyChangedSignal_t;
|
||||
std::auto_ptr<PropertyChangedSignal_t> m_propertyChangedSignal;
|
||||
std::unique_ptr<PropertyChangedSignal_t> m_propertyChangedSignal;
|
||||
void propertyChangedCb(const GDBusCXX::Path_t &path, const std::string &name, const boost::variant<int64_t> &value);
|
||||
|
||||
std::auto_ptr<GDBusCXX::DBusRemoteObject> m_session;
|
||||
std::unique_ptr<GDBusCXX::DBusRemoteObject> m_session;
|
||||
};
|
||||
|
||||
PbapSession::PbapSession(PbapSyncSource &parent) :
|
||||
|
|
|
@ -66,7 +66,6 @@ private:
|
|||
TQString appId;
|
||||
|
||||
KNotesIface_stub *kn_iface;
|
||||
DCOPClient *kn_dcop;
|
||||
|
||||
/** Ugly hack to restart KNotes if it was running */
|
||||
bool knotesWasRunning;
|
||||
|
|
|
@ -721,8 +721,7 @@ SubSyncSource::SubItemResult CalDAVSource::insertSubItem(const std::string &luid
|
|||
eptr<icalcomponent> fullcal = event.m_calendar;
|
||||
loadItem(event);
|
||||
event.m_sequence++;
|
||||
lastmodtime = icaltime_from_timet(event.m_lastmodtime, false);
|
||||
lastmodtime.is_utc = 1;
|
||||
lastmodtime = icaltime_from_timet_with_zone(event.m_lastmodtime, false, icaltimezone_get_utc_timezone());
|
||||
event.m_calendar = fullcal;
|
||||
for (icalcomponent *comp = icalcomponent_get_first_component(event.m_calendar, ICAL_VEVENT_COMPONENT);
|
||||
comp;
|
||||
|
|
|
@ -436,7 +436,7 @@ public:
|
|||
private:
|
||||
bool m_initialized;
|
||||
string m_clientID;
|
||||
std::auto_ptr<TestEvolution> m_clientB;
|
||||
std::unique_ptr<TestEvolution> m_clientB;
|
||||
const TestRegistry &m_configs;
|
||||
|
||||
/** prefix, username, password to be used for local databases */
|
||||
|
|
|
@ -24,7 +24,7 @@ noinst_PROGRAMS += src/dbus/glib/test-syncevo-dbus
|
|||
|
||||
src_dbus_glib_test_syncevo_dbus_SOURCES = src/dbus/glib/test.c
|
||||
src_dbus_glib_test_syncevo_dbus_LDADD = $(DBUS_GLIB_LIBS) $(src_dbus_glib_lib)
|
||||
src_dbus_glib_test_syncevo_dbus_CFLAGS = $(DBUS_GLIB_CFLAGS) $(SYNCEVO_WFLAGS)
|
||||
src_dbus_glib_test_syncevo_dbus_CFLAGS = $(DBUS_GLIB_CFLAGS) $(SYNCEVO_WFLAGS_DEPRECATED)
|
||||
src_dbus_glib_test_syncevo_dbus_CPPFLAGS = $(src_dbus_glib_cppflags)
|
||||
|
||||
src_dbus_glib_built_sources = \
|
||||
|
@ -89,7 +89,7 @@ src_dbus_glib_libsyncevo_dbus_la_CFLAGS = \
|
|||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
$(DBUS_GLIB_CFLAGS) \
|
||||
$(SYNCEVO_WFLAGS)
|
||||
$(SYNCEVO_WFLAGS_DEPRECATED)
|
||||
|
||||
src_dbus_glib_libsyncevo_dbus_la_LIBADD = \
|
||||
$(DBUS_GLIB_LIBS)
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
#include <syncevo/SyncContext.h>
|
||||
#include <syncevo/SmartPtr.h>
|
||||
#include <syncevo/util.h>
|
||||
#include <syncevo/timeout.h>
|
||||
|
||||
#include "notification-manager-factory.h"
|
||||
#include "timeout.h"
|
||||
|
||||
SE_BEGIN_CXX
|
||||
|
||||
|
|
|
@ -20,10 +20,11 @@
|
|||
#ifndef INFO_REQ_H
|
||||
#define INFO_REQ_H
|
||||
|
||||
#include <syncevo/timeout.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "gdbus-cxx-bridge.h"
|
||||
#include "timeout.h"
|
||||
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
|
|
|
@ -146,6 +146,12 @@ class IndividualDataCompare : public std::binary_function<IndividualData, Indivi
|
|||
{
|
||||
return m_compare->compare(a.m_criteria, b.m_criteria);
|
||||
}
|
||||
|
||||
IndividualDataCompare & operator = (const IndividualDataCompare &other)
|
||||
{
|
||||
m_compare = other.m_compare;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include "persona-details.h"
|
||||
#include "folks.h"
|
||||
|
||||
#include <boost/typeof/typeof.hpp>
|
||||
|
||||
SE_GLIB_TYPE(GDateTime, g_date_time)
|
||||
SE_GOBJECT_TYPE(GTimeZone)
|
||||
SE_GOBJECT_TYPE(GObject)
|
||||
|
@ -396,7 +398,7 @@ static void DBus2AbstractField(GDBusCXX::ExtractArgs &context,
|
|||
typedef std::vector< std::pair< std::string, std::vector<std::string> > > Details_t;
|
||||
|
||||
Details_t value;
|
||||
GDBusCXX::dbus_traits<typeof(value)>::get(context, valueIter, value);
|
||||
GDBusCXX::dbus_traits<BOOST_TYPEOF(value)>::get(context, valueIter, value);
|
||||
GeeHashSetCXX set(gee_hash_set_new(detailType,
|
||||
g_object_ref,
|
||||
g_object_unref,
|
||||
|
@ -435,7 +437,7 @@ static void DBus2SimpleAbstractField(GDBusCXX::ExtractArgs &context,
|
|||
typedef std::vector<std::string> Details_t;
|
||||
|
||||
Details_t value;
|
||||
GDBusCXX::dbus_traits<typeof(value)>::get(context, valueIter, value);
|
||||
GDBusCXX::dbus_traits<BOOST_TYPEOF(value)>::get(context, valueIter, value);
|
||||
GeeHashSetCXX set(gee_hash_set_new(detailType,
|
||||
g_object_ref,
|
||||
g_object_unref,
|
||||
|
@ -463,7 +465,7 @@ static void DBus2Role(GDBusCXX::ExtractArgs &context,
|
|||
typedef std::vector<StringMap> Details_t;
|
||||
|
||||
Details_t value;
|
||||
GDBusCXX::dbus_traits<typeof(value)>::get(context, valueIter, value);
|
||||
GDBusCXX::dbus_traits<BOOST_TYPEOF(value)>::get(context, valueIter, value);
|
||||
GeeHashSetCXX set(gee_hash_set_new(FOLKS_TYPE_ROLE_FIELD_DETAILS,
|
||||
g_object_ref,
|
||||
g_object_unref,
|
||||
|
@ -502,7 +504,7 @@ static void DBus2Groups(GDBusCXX::ExtractArgs &context,
|
|||
PersonaDetails &details)
|
||||
{
|
||||
std::list<std::string> value;
|
||||
GDBusCXX::dbus_traits<typeof(value)>::get(context, valueIter, value);
|
||||
GDBusCXX::dbus_traits<BOOST_TYPEOF(value)>::get(context, valueIter, value);
|
||||
GeeHashSetCXX set(gee_hash_set_new(G_TYPE_STRING, (GBoxedCopyFunc)g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL), TRANSFER_REF);
|
||||
BOOST_FOREACH(const std::string &entry, value) {
|
||||
gee_collection_add(GEE_COLLECTION(set.get()),
|
||||
|
@ -524,7 +526,7 @@ static void DBus2Addr(GDBusCXX::ExtractArgs &context,
|
|||
typedef std::vector< std::pair< StringMap, std::vector<std::string> > > Details_t;
|
||||
|
||||
Details_t value;
|
||||
GDBusCXX::dbus_traits<typeof(value)>::get(context, valueIter, value);
|
||||
GDBusCXX::dbus_traits<BOOST_TYPEOF(value)>::get(context, valueIter, value);
|
||||
GeeHashSetCXX set(gee_hash_set_new(FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS,
|
||||
g_object_ref,
|
||||
g_object_unref,
|
||||
|
@ -612,7 +614,7 @@ void DBus2PersonaDetails(GDBusCXX::ExtractArgs &context,
|
|||
new GValueObjectCXX(g_file_icon_new(file.get()), TRANSFER_REF));
|
||||
} else if (key == CONTACT_HASH_BIRTHDAY) {
|
||||
boost::tuple<int, int, int> value;
|
||||
GDBusCXX::dbus_traits<typeof(value)>::get(context, valueIter, value);
|
||||
GDBusCXX::dbus_traits<BOOST_TYPEOF(value)>::get(context, valueIter, value);
|
||||
GDateTimeCXX local(g_date_time_new_local(value.get<0>(),
|
||||
value.get<1>(),
|
||||
value.get<2>(),
|
||||
|
@ -623,7 +625,7 @@ void DBus2PersonaDetails(GDBusCXX::ExtractArgs &context,
|
|||
new GValueDateTimeCXX(g_date_time_to_utc(local.get()), TRANSFER_REF));
|
||||
} else if (key == CONTACT_HASH_LOCATION) {
|
||||
boost::tuple<double, double> value;
|
||||
GDBusCXX::dbus_traits<typeof(value)>::get(context, valueIter, value);
|
||||
GDBusCXX::dbus_traits<BOOST_TYPEOF(value)>::get(context, valueIter, value);
|
||||
FolksLocationCXX location(folks_location_new(value.get<0>(),
|
||||
value.get<1>()),
|
||||
TRANSFER_REF);
|
||||
|
|
|
@ -65,7 +65,7 @@ static const boost::locale::collator_base::level_type DEFAULT_COLLATION_LEVEL =
|
|||
class CompareBoost : public IndividualCompare, private boost::noncopyable {
|
||||
std::locale m_locale;
|
||||
const boost::locale::collator<char> &m_collator;
|
||||
std::auto_ptr<icu::Transliterator> m_trans;
|
||||
std::unique_ptr<icu::Transliterator> m_trans;
|
||||
|
||||
public:
|
||||
CompareBoost(const std::locale &locale);
|
||||
|
|
|
@ -295,7 +295,7 @@ void ReadOperations::checkSource(const std::string &sourceName)
|
|||
try {
|
||||
// this can already throw exceptions when the config is invalid
|
||||
SyncSourceParams params(sourceName, config->getSyncSourceNodes(sourceName), config);
|
||||
auto_ptr<SyncSource> syncSource(SyncSource::createSource(params, false, config.get()));
|
||||
unique_ptr<SyncSource> syncSource(SyncSource::createSource(params, false, config.get()));
|
||||
|
||||
if (syncSource.get()) {
|
||||
syncSource->open();
|
||||
|
@ -318,7 +318,7 @@ void ReadOperations::getDatabases(const string &sourceName, SourceDatabases_t &d
|
|||
SyncSourceParams params(sourceName, config->getSyncSourceNodes(sourceName), config);
|
||||
const SourceRegistry ®istry(SyncSource::getSourceRegistry());
|
||||
BOOST_FOREACH(const RegisterSyncSource *sourceInfo, registry) {
|
||||
auto_ptr<SyncSource> source(sourceInfo->m_create(params));
|
||||
unique_ptr<SyncSource> source(sourceInfo->m_create(params));
|
||||
if (!source.get()) {
|
||||
continue;
|
||||
} else if (source->isInactive()) {
|
||||
|
|
|
@ -46,7 +46,6 @@ src_dbus_server_server_h_files = \
|
|||
src/dbus/server/session-common.h \
|
||||
src/dbus/server/source-progress.h \
|
||||
src/dbus/server/source-status.h \
|
||||
src/dbus/server/timeout.h \
|
||||
src/dbus/server/timer.h
|
||||
|
||||
src_dbus_server_libsyncevodbusserver_la_SOURCES = \
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
#include <boost/bind.hpp>
|
||||
|
||||
#include <syncevo/GLibSupport.h>
|
||||
#include <syncevo/timeout.h>
|
||||
|
||||
#include "server.h"
|
||||
#include "info-req.h"
|
||||
#include "connection.h"
|
||||
#include "bluez-manager.h"
|
||||
#include "session.h"
|
||||
#include "timeout.h"
|
||||
#include "restart.h"
|
||||
#include "client.h"
|
||||
#include "auto-sync-manager.h"
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
#include <boost/signals2.hpp>
|
||||
|
||||
#include <syncevo/SyncConfig.h>
|
||||
#include <syncevo/timeout.h>
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "auto-term.h"
|
||||
#include "timeout.h"
|
||||
#include "dbus-callbacks.h"
|
||||
#include "read-operations.h"
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <gdbus-cxx-bridge.h>
|
||||
|
||||
#include <syncevo/SuspendFlags.h>
|
||||
#include <syncevo/timeout.h>
|
||||
|
||||
#include "session-common.h"
|
||||
#include "read-operations.h"
|
||||
|
@ -34,7 +35,6 @@
|
|||
#include "source-progress.h"
|
||||
#include "source-status.h"
|
||||
#include "timer.h"
|
||||
#include "timeout.h"
|
||||
#include "resource.h"
|
||||
#include "dbus-callbacks.h"
|
||||
|
||||
|
|
|
@ -1977,7 +1977,7 @@ class DBusResult : virtual public Result
|
|||
|
||||
virtual Watch *createWatch(const boost::function<void (void)> &callback)
|
||||
{
|
||||
std::auto_ptr<Watch> watch(new Watch(m_conn, callback));
|
||||
std::unique_ptr<Watch> watch(new Watch(m_conn, callback));
|
||||
watch->activate(dbus_message_get_sender(m_msg.get()));
|
||||
return watch.release();
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ class Test {
|
|||
|
||||
static gboolean method_idle(gpointer data)
|
||||
{
|
||||
std::auto_ptr<async> mydata(static_cast<async *>(data));
|
||||
std::unique_ptr<async> mydata(static_cast<async *>(data));
|
||||
std::cout << "replying to method_async" << std::endl;
|
||||
mydata->m_result->done("Hello World, asynchronous and delayed");
|
||||
return false;
|
||||
|
@ -269,7 +269,7 @@ int main(int argc, char *argv[])
|
|||
exit(1);
|
||||
}
|
||||
|
||||
std::auto_ptr<DBusTest> test(new DBusTest(conn));
|
||||
std::unique_ptr<DBusTest> test(new DBusTest(conn));
|
||||
test->activate();
|
||||
test->signal(42, "hello world", std::map<int32_t, int32_t>());
|
||||
test->deactivate();
|
||||
|
|
|
@ -484,7 +484,7 @@ Watch::~Watch()
|
|||
void getWatch(ExtractArgs &context,
|
||||
boost::shared_ptr<Watch> &value)
|
||||
{
|
||||
std::auto_ptr<Watch> watch(new Watch(context.m_conn));
|
||||
std::unique_ptr<Watch> watch(new Watch(context.m_conn));
|
||||
watch->activate((context.m_msg && *context.m_msg) ?
|
||||
g_dbus_message_get_sender(*context.m_msg) :
|
||||
context.m_sender);
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <gio/gio.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include <map>
|
||||
#include <list>
|
||||
|
@ -111,8 +112,14 @@ typedef GDBusMessage message_type;
|
|||
typedef GVariantBuilder builder_type;
|
||||
typedef GVariantIter reader_type;
|
||||
|
||||
struct GDBusMessageUnref
|
||||
{
|
||||
void operator () (GDBusMessage *ptr) const { g_object_unref(ptr); }
|
||||
};
|
||||
typedef std::unique_ptr<GDBusMessage, GDBusMessageUnref> GDBusMessageUnique;
|
||||
|
||||
/**
|
||||
* Simple auto_ptr for GVariant.
|
||||
* Simple unique_ptr for GVariant.
|
||||
*/
|
||||
class GVariantCXX : boost::noncopyable
|
||||
{
|
||||
|
@ -197,6 +204,13 @@ class DBusConnectionPtr : public boost::intrusive_ptr<GDBusConnection>
|
|||
m_name(other.m_name)
|
||||
{}
|
||||
|
||||
DBusConnectionPtr & operator = (const DBusConnectionPtr &other)
|
||||
{
|
||||
*static_cast<boost::intrusive_ptr<GDBusConnection> *>(this) = static_cast<const boost::intrusive_ptr<GDBusConnection> &>(other);
|
||||
m_name = other.m_name;
|
||||
return *this;
|
||||
}
|
||||
|
||||
GDBusConnection *reference(void) throw()
|
||||
{
|
||||
GDBusConnection *conn = get();
|
||||
|
@ -436,7 +450,7 @@ struct AppendArgs {
|
|||
GDBusMessage *m_msg;
|
||||
GVariantBuilder m_builder;
|
||||
|
||||
AppendArgs(const std::auto_ptr<GDBusMessage> &msg) {
|
||||
AppendArgs(const GDBusMessageUnique &msg) {
|
||||
m_msg = msg.get();
|
||||
if (!m_msg) {
|
||||
throw std::runtime_error("NULL GDBusMessage reply");
|
||||
|
@ -2718,7 +2732,7 @@ class DBusResult : virtual public Result
|
|||
|
||||
virtual Watch *createWatch(const boost::function<void (void)> &callback)
|
||||
{
|
||||
std::auto_ptr<Watch> watch(new Watch(m_conn, callback));
|
||||
std::unique_ptr<Watch> watch(new Watch(m_conn, callback));
|
||||
watch->activate(g_dbus_message_get_sender(m_msg.get()));
|
||||
return watch.release();
|
||||
}
|
||||
|
@ -3175,7 +3189,7 @@ struct MakeMethodEntry< boost::function<void (A1, A2, A3, A4, A5, A6, A7, A8, A9
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
typename dbus_traits<A3>::host_type a3;
|
||||
|
@ -3268,7 +3282,7 @@ struct MakeMethodEntry< boost::function<R (A1, A2, A3, A4, A5, A6, A7, A8, A9)>
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<R>::host_type r;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
|
@ -3359,7 +3373,7 @@ struct MakeMethodEntry< boost::function<void (A1, A2, A3, A4, A5, A6, A7, A8, A9
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
typename dbus_traits<A3>::host_type a3;
|
||||
|
@ -3448,7 +3462,7 @@ struct MakeMethodEntry< boost::function<R (A1, A2, A3, A4, A5, A6, A7, A8)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<R>::host_type r;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
|
@ -3536,7 +3550,7 @@ struct MakeMethodEntry< boost::function<void (A1, A2, A3, A4, A5, A6, A7, A8)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
typename dbus_traits<A3>::host_type a3;
|
||||
|
@ -3622,7 +3636,7 @@ struct MakeMethodEntry< boost::function<R (A1, A2, A3, A4, A5, A6, A7)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<R>::host_type r;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
|
@ -3706,7 +3720,7 @@ struct MakeMethodEntry< boost::function<void (A1, A2, A3, A4, A5, A6, A7)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
typename dbus_traits<A3>::host_type a3;
|
||||
|
@ -3789,7 +3803,7 @@ struct MakeMethodEntry< boost::function<R (A1, A2, A3, A4, A5, A6)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<R>::host_type r;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
|
@ -3871,7 +3885,7 @@ struct MakeMethodEntry< boost::function<void (A1, A2, A3, A4, A5, A6)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
typename dbus_traits<A3>::host_type a3;
|
||||
|
@ -3950,7 +3964,7 @@ struct MakeMethodEntry< boost::function<R (A1, A2, A3, A4, A5)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<R>::host_type r;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
|
@ -4027,7 +4041,7 @@ struct MakeMethodEntry< boost::function<void (A1, A2, A3, A4, A5)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
typename dbus_traits<A3>::host_type a3;
|
||||
|
@ -4103,7 +4117,7 @@ struct MakeMethodEntry< boost::function<R (A1, A2, A3, A4)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<R>::host_type r;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
|
@ -4175,7 +4189,7 @@ struct MakeMethodEntry< boost::function<void (A1, A2, A3, A4)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
typename dbus_traits<A3>::host_type a3;
|
||||
|
@ -4246,7 +4260,7 @@ struct MakeMethodEntry< boost::function<R (A1, A2, A3)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<R>::host_type r;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
|
@ -4315,7 +4329,7 @@ struct MakeMethodEntry< boost::function<void (A1, A2, A3)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
typename dbus_traits<A3>::host_type a3;
|
||||
|
@ -4383,7 +4397,7 @@ struct MakeMethodEntry< boost::function<R (A1, A2)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<R>::host_type r;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
|
@ -4449,7 +4463,7 @@ struct MakeMethodEntry< boost::function<void (A1, A2)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
typename dbus_traits<A2>::host_type a2;
|
||||
|
||||
|
@ -4514,7 +4528,7 @@ struct MakeMethodEntry< boost::function<R (A1)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<R>::host_type r;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
|
||||
|
@ -4577,7 +4591,7 @@ struct MakeMethodEntry< boost::function<void (A1)> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<A1>::host_type a1;
|
||||
|
||||
try {
|
||||
|
@ -4636,7 +4650,7 @@ struct MakeMethodEntry< boost::function<R ()> >
|
|||
GDBusMessage *msg, void *data)
|
||||
{
|
||||
try {
|
||||
std::auto_ptr<GDBusMessage> reply;
|
||||
GDBusMessageUnique reply;
|
||||
typename dbus_traits<R>::host_type r;
|
||||
|
||||
try {
|
||||
|
|
|
@ -79,7 +79,7 @@ src_gtk3_ui_sync_ui_CFLAGS = \
|
|||
-DTHEMEDIR=\""$(src_gtk3_ui_themercdir)"\" \
|
||||
-DLIBEXECDIR=\"@libexecdir@\" \
|
||||
-DSYNCEVOLUTION_LOCALEDIR=\"${SYNCEVOLUTION_LOCALEDIR}\" \
|
||||
$(SYNCEVO_WFLAGS)
|
||||
$(SYNCEVO_WFLAGS_DEPRECATED)
|
||||
src_gtk3_ui_sync_ui_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir) \
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
# Evolution 3.10
|
||||
libebook-1.2 14
|
||||
libebook-contacts-1.2 0
|
||||
libecal-1.2 16
|
||||
libedataserver-1.2 18
|
||||
# libical v1
|
||||
libical 1
|
11
src/src.am
11
src/src.am
|
@ -18,12 +18,14 @@ include $(top_srcdir)/src/syncevo/syncevo.am
|
|||
src_cppflags += -I$(top_srcdir)/src/syncevo
|
||||
include $(top_srcdir)/src/backends/backends.am
|
||||
src_cppflags += $(addprefix -I$(top_srcdir)/,$(BACKENDS)) -I$(SYNTHESIS_SUBDIR)
|
||||
bin_PROGRAMS += src/syncevolution
|
||||
bin_SCRIPTS += src/synccompare
|
||||
include $(top_srcdir)/src/templates/templates.am
|
||||
else
|
||||
src_cppflags += -I$(top_srcdir)/$(SYNTHESIS_SUBDIR_INCLUDES)
|
||||
endif
|
||||
if COND_CMDLINE
|
||||
bin_PROGRAMS += src/syncevolution
|
||||
endif
|
||||
|
||||
include $(top_srcdir)/src/dbus/dbus.am
|
||||
src_cppflags += -I$(top_srcdir)/src/dbus
|
||||
|
@ -55,7 +57,6 @@ SYNCEVOLUTION_LDADD += @SYNCSOURCES@
|
|||
SYNCEVOLUTION_DEP += @SYNCSOURCES@
|
||||
endif
|
||||
dist_noinst_DATA += \
|
||||
src/shlibs.local \
|
||||
src/synthesis-includes/Makefile.am \
|
||||
src/synthesis-includes/Makefile.in
|
||||
|
||||
|
@ -182,8 +183,8 @@ distclean-local:
|
|||
rm -rf $(SYNTHESIS_SUBDIR)
|
||||
rm -rf $(CLEAN_CLIENT_SRC)
|
||||
|
||||
# Local sync helper executable. Built unconditionally at the moment,
|
||||
# thus creating a hard dependency on D-Bus.
|
||||
# Local sync helper executable. Depends on D-Bus for internal communication.
|
||||
if COND_LOCAL_SYNC
|
||||
libexec_PROGRAMS += src/syncevo-local-sync
|
||||
src_syncevo_local_sync_SOURCES = \
|
||||
src/syncevo-local-sync.cpp \
|
||||
|
@ -196,7 +197,7 @@ src_syncevo_local_sync_CPPFLAGS = -DHAVE_CONFIG_H -I$(gdbus_dir) $(src_cppflags)
|
|||
src_syncevo_local_sync_CXXFLAGS = $(PCRECPP_CFLAGS) $(SYNCEVOLUTION_CXXFLAGS) $(CORE_CXXFLAGS) $(GLIB_CFLAGS) $(DBUS_CFLAGS) $(LIBSOUP_CFLAGS) $(SYNCEVO_WFLAGS)
|
||||
src_syncevo_local_sync_LDFLAGS = $(PCRECPP_LIBS) $(CORE_LD_FLAGS) $(LIBSOUP_LIBS)
|
||||
src_syncevo_local_sync_DEPENDENCIES = $(top_builddir)/$(gdbus_build_dir)/libgdbussyncevo.la $(EXTRA_LTLIBRARIES) $(CORE_DEP) $(SYNTHESIS_DEP)
|
||||
|
||||
endif
|
||||
|
||||
# Do the linking here, as with all SyncEvolution executables.
|
||||
# Sources are compiled in dbus/server.
|
||||
|
|
|
@ -810,7 +810,7 @@ bool Cmdline::run() {
|
|||
if (!m_server.empty() || backend != sourceFilter.end()) {
|
||||
// list for specific backend
|
||||
params.m_name = sourceName;
|
||||
auto_ptr<SyncSource> source(SyncSource::createSource(params, false, NULL));
|
||||
unique_ptr<SyncSource> source(SyncSource::createSource(params, false, NULL));
|
||||
if (source.get() != NULL) {
|
||||
if (!m_server.empty() && nodes) {
|
||||
// ensure that we have passwords for this config
|
||||
|
@ -836,7 +836,7 @@ bool Cmdline::run() {
|
|||
// don't have a source name, so let's fall
|
||||
// back to the backend instead.
|
||||
params.m_name = type.m_backend;
|
||||
auto_ptr<SyncSource> source(SyncSource::createSource(params, false));
|
||||
unique_ptr<SyncSource> source(SyncSource::createSource(params, false));
|
||||
(this->*operation)(source.get(), header);
|
||||
} catch (...) {
|
||||
SE_LOG_ERROR(NULL, "%s:\naccessing databases failed", header.c_str());
|
||||
|
@ -1250,7 +1250,7 @@ bool Cmdline::run() {
|
|||
PasswordConfigProperty::CHECK_PASSWORD_RESOLVE_USERNAME,
|
||||
boost::assign::list_of(source));
|
||||
SyncSourceParams params(source, to->getSyncSourceNodes(source), to);
|
||||
auto_ptr<SyncSource> syncSource(SyncSource::createSource(params, false, to.get()));
|
||||
unique_ptr<SyncSource> syncSource(SyncSource::createSource(params, false, to.get()));
|
||||
if (syncSource.get() == NULL) {
|
||||
disable = "no backend available";
|
||||
} else {
|
||||
|
|
|
@ -43,6 +43,7 @@ typedef void *GMainLoop;
|
|||
#include <boost/type_traits/function_traits.hpp>
|
||||
#include <boost/utility/value_init.hpp>
|
||||
#include <boost/lambda/lambda.hpp>
|
||||
#include <boost/typeof/typeof.hpp>
|
||||
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
|
@ -407,7 +408,7 @@ struct GErrorCXX {
|
|||
GError *release() { GError *gerror = m_gerror; m_gerror = NULL; return gerror; }
|
||||
|
||||
/** checks whether the current error is the one passed as parameters */
|
||||
bool matches(GQuark domain, gint code) { return g_error_matches(m_gerror, domain, code); }
|
||||
bool matches(GQuark domain, gint code) const { return g_error_matches(m_gerror, domain, code); }
|
||||
|
||||
/**
|
||||
* Use this when passing GErrorCXX instance to C functions which need to set it.
|
||||
|
@ -730,7 +731,7 @@ template<class T, class F, F *finish, class A1, class A3, class A4, class A5> st
|
|||
A5_t retval3 = boost::value_initialized<A5_t>();
|
||||
T t = finish(reinterpret_cast<A1>(sourceObject),
|
||||
result, &retval1, &retval2, &retval3);
|
||||
std::auto_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
std::unique_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
(*cb)(t, retval1, retval2, retval3);
|
||||
} catch (...) {
|
||||
// called from C, must not let exception escape
|
||||
|
@ -755,7 +756,7 @@ template<class T, class F, F *finish, class A1, class A3, class A4> struct GAsyn
|
|||
A4_t retval2 = boost::value_initialized<A4_t>();
|
||||
T t = finish(reinterpret_cast<A1>(sourceObject),
|
||||
result, &retval1, &retval2, gerror);
|
||||
std::auto_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
std::unique_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
(*cb)(t, retval1, retval2, gerror);
|
||||
} catch (...) {
|
||||
// called from C, must not let exception escape
|
||||
|
@ -779,7 +780,7 @@ template<class T, class F, F *finish, class A1, class A3, class A4> struct GAsyn
|
|||
A4_t retval2 = boost::value_initialized<A4_t>();
|
||||
T t = finish(reinterpret_cast<A1>(sourceObject),
|
||||
result, &retval1, &retval2);
|
||||
std::auto_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
std::unique_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
(*cb)(t, retval1, retval2);
|
||||
} catch (...) {
|
||||
// called from C, must not let exception escape
|
||||
|
@ -802,7 +803,7 @@ template<class T, class F, F *finish, class A1, class A3> struct GAsyncReady4<T,
|
|||
A3_t retval = boost::value_initialized<A3_t>();
|
||||
T t = finish(reinterpret_cast<A1>(sourceObject),
|
||||
result, &retval, gerror);
|
||||
std::auto_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
std::unique_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
(*cb)(t, retval, gerror);
|
||||
} catch (...) {
|
||||
// called from C, must not let exception escape
|
||||
|
@ -822,7 +823,7 @@ template <class T, class F, F *finish, class A1> struct GAsyncReady3<T, F, finis
|
|||
GErrorCXX gerror;
|
||||
T t = finish(reinterpret_cast<A1>(sourceObject),
|
||||
result, gerror);
|
||||
std::auto_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
std::unique_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
(*cb)(t, gerror);
|
||||
} catch (...) {
|
||||
// called from C, must not let exception escape
|
||||
|
@ -843,7 +844,7 @@ template<class F, F *finish, class A1> struct GAsyncReady3<void, F, finish, A1,
|
|||
GErrorCXX gerror;
|
||||
finish(reinterpret_cast<A1>(sourceObject),
|
||||
result, gerror);
|
||||
std::auto_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
std::unique_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
(*cb)(gerror);
|
||||
} catch (...) {
|
||||
// called from C, must not let exception escape
|
||||
|
@ -863,7 +864,7 @@ template<class T, class F, F *finish, class A1> struct GAsyncReady2<T, F, finish
|
|||
try {
|
||||
T t = finish(reinterpret_cast<A1>(sourceObject),
|
||||
result);
|
||||
std::auto_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
std::unique_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
(*cb)(t);
|
||||
} catch (...) {
|
||||
// called from C, must not let exception escape
|
||||
|
@ -883,7 +884,7 @@ template<class T, class F, F *finish> struct GAsyncReady2<T, F, finish, GAsyncRe
|
|||
try {
|
||||
GErrorCXX gerror;
|
||||
T t = finish(result, gerror);
|
||||
std::auto_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
std::unique_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
(*cb)(t, gerror);
|
||||
} catch (...) {
|
||||
// called from C, must not let exception escape
|
||||
|
@ -903,7 +904,7 @@ template<class F, F *finish, class A1> struct GAsyncReady2<void, F, finish, A1,
|
|||
try {
|
||||
finish(reinterpret_cast<A1>(sourceObject),
|
||||
result);
|
||||
std::auto_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
std::unique_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
(*cb)();
|
||||
} catch (...) {
|
||||
// called from C, must not let exception escape
|
||||
|
@ -923,7 +924,7 @@ template<class F, F *finish> struct GAsyncReady2<void, F, finish, GAsyncResult *
|
|||
try {
|
||||
GErrorCXX gerror;
|
||||
finish(result, gerror);
|
||||
std::auto_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
std::unique_ptr<CXXFunctionCB_t> cb(static_cast<CXXFunctionCB_t *>(userData));
|
||||
(*cb)(gerror);
|
||||
} catch (...) {
|
||||
// called from C, must not let exception escape
|
||||
|
@ -937,9 +938,9 @@ template<class F, F *finish> struct GAsyncReady2<void, F, finish, GAsyncResult *
|
|||
* first switch based on arity of the finish function, then on its type
|
||||
*/
|
||||
#define SYNCEVO_GLIB_CALL_ASYNC_CXX(_prepare) \
|
||||
GAsyncReadyCXX< boost::remove_pointer<typeof(_prepare ## _finish)>::type, \
|
||||
GAsyncReadyCXX< boost::remove_pointer<BOOST_TYPEOF(_prepare ## _finish)>::type, \
|
||||
& _prepare ## _finish, \
|
||||
boost::function_traits<boost::remove_pointer<typeof(_prepare ## _finish)>::type>::arity >
|
||||
boost::function_traits<boost::remove_pointer<BOOST_TYPEOF(_prepare ## _finish)>::type>::arity >
|
||||
|
||||
/**
|
||||
* Macro for asynchronous methods which use a GAsyncReadyCallback to
|
||||
|
@ -1042,7 +1043,7 @@ template<> class GAsyncReadyDoneCXX<void>
|
|||
do { \
|
||||
bool done = false; \
|
||||
SYNCEVO_GLIB_CALL_ASYNC(_prepare, \
|
||||
GAsyncReadyDoneCXX<boost::function<typeof(_prepare ## _finish)>::result_type>::createCB(_res, _gerror, done), \
|
||||
GAsyncReadyDoneCXX<boost::function<BOOST_TYPEOF(_prepare ## _finish)>::result_type>::createCB(_res, _gerror, done), \
|
||||
_args); \
|
||||
GRunWhile(! boost::lambda::var(done)); \
|
||||
} while (false); \
|
||||
|
|
|
@ -699,7 +699,7 @@ public:
|
|||
|
||||
class ChildLogger : public Logger
|
||||
{
|
||||
std::auto_ptr<LogRedirect> m_parentLogger;
|
||||
std::unique_ptr<LogRedirect> m_parentLogger;
|
||||
boost::weak_ptr<LocalTransportChildImpl> m_child;
|
||||
|
||||
public:
|
||||
|
|
|
@ -25,28 +25,28 @@
|
|||
#include <libsoup/soup-status.h>
|
||||
#include <syncevo/Logging.h>
|
||||
|
||||
#ifdef HAVE_LIBSOUP_SOUP_GNOME_FEATURES_H
|
||||
#include <libsoup/soup-gnome-features.h>
|
||||
#endif
|
||||
|
||||
#include <syncevo/declarations.h>
|
||||
SE_BEGIN_CXX
|
||||
|
||||
boost::shared_ptr<SoupTransportAgent> SoupTransportAgent::create(GMainLoop *loop)
|
||||
{
|
||||
boost::shared_ptr<SoupTransportAgent> self(new SoupTransportAgent(loop));
|
||||
self->m_self = self;
|
||||
return self;
|
||||
}
|
||||
|
||||
SoupTransportAgent::SoupTransportAgent(GMainLoop *loop) :
|
||||
m_verifySSL(false),
|
||||
m_session(soup_session_async_new()),
|
||||
m_session(soup_session_new_with_options("timeout", 0, (void *)NULL)),
|
||||
m_loop(loop ?
|
||||
g_main_loop_ref(loop) :
|
||||
g_main_loop_new(NULL, TRUE),
|
||||
"Soup main loop"),
|
||||
m_status(INACTIVE),
|
||||
m_message(NULL),
|
||||
m_timeoutSeconds(0),
|
||||
m_response(0)
|
||||
{
|
||||
#ifdef HAVE_LIBSOUP_SOUP_GNOME_FEATURES_H
|
||||
// use default GNOME proxy settings
|
||||
soup_session_add_feature_by_type(m_session.get(), SOUP_TYPE_PROXY_RESOLVER_GNOME);
|
||||
#endif
|
||||
}
|
||||
|
||||
SoupTransportAgent::~SoupTransportAgent()
|
||||
|
@ -138,12 +138,14 @@ void SoupTransportAgent::send(const char *data, size_t len)
|
|||
soup_message_set_request(message.get(), m_contentType.c_str(),
|
||||
SOUP_MEMORY_TEMPORARY, data, len);
|
||||
m_status = ACTIVE;
|
||||
// We just keep a pointer for the timeout, without owning the message.
|
||||
m_message = message.get();
|
||||
if (m_timeoutSeconds) {
|
||||
m_message = message.get();
|
||||
m_timeoutEventSource = g_timeout_add_seconds(m_timeoutSeconds, TimeoutCallback, static_cast<gpointer> (this));
|
||||
m_timeout.runOnce(m_timeoutSeconds,
|
||||
boost::bind(&SoupTransportAgent::handleTimeoutWrapper, m_self));
|
||||
}
|
||||
soup_session_queue_message(m_session.get(), message.release(),
|
||||
SessionCallback, static_cast<gpointer>(this));
|
||||
SessionCallback, new boost::weak_ptr<SoupTransportAgent>(m_self));
|
||||
}
|
||||
|
||||
void SoupTransportAgent::cancel()
|
||||
|
@ -188,7 +190,6 @@ TransportAgent::Status SoupTransportAgent::wait(bool noReply)
|
|||
SE_THROW_EXCEPTION(TransportException, failure);
|
||||
}
|
||||
|
||||
m_timeoutEventSource.set(0);
|
||||
return m_status;
|
||||
}
|
||||
|
||||
|
@ -208,18 +209,29 @@ void SoupTransportAgent::SessionCallback(SoupSession *session,
|
|||
SoupMessage *msg,
|
||||
gpointer user_data)
|
||||
{
|
||||
static_cast<SoupTransportAgent *>(user_data)->HandleSessionCallback(session, msg);
|
||||
// A copy of the weak_ptr was created for us, which we need to delete now.
|
||||
boost::weak_ptr<SoupTransportAgent> *self = static_cast< boost::weak_ptr<SoupTransportAgent> *>(user_data);
|
||||
boost::shared_ptr<SoupTransportAgent> agent(self->lock());
|
||||
delete self;
|
||||
|
||||
if (agent.get()) {
|
||||
agent->HandleSessionCallback(session, msg);
|
||||
}
|
||||
}
|
||||
|
||||
void SoupTransportAgent::HandleSessionCallback(SoupSession *session,
|
||||
SoupMessage *msg)
|
||||
{
|
||||
// Message is no longer pending, so timeout no longer needed either.
|
||||
m_message = NULL;
|
||||
m_timeout.deactivate();
|
||||
|
||||
// keep a reference to the data
|
||||
m_responseContentType = "";
|
||||
if (msg->response_body) {
|
||||
m_response = soup_message_body_flatten(msg->response_body);
|
||||
const char *soupContentType = soup_message_headers_get(msg->response_headers,
|
||||
"Content-Type");
|
||||
const char *soupContentType = soup_message_headers_get_one(msg->response_headers,
|
||||
"Content-Type");
|
||||
if (soupContentType) {
|
||||
m_responseContentType = soupContentType;
|
||||
}
|
||||
|
@ -246,19 +258,24 @@ void SoupTransportAgent::HandleSessionCallback(SoupSession *session,
|
|||
g_main_loop_quit(m_loop.get());
|
||||
}
|
||||
|
||||
gboolean SoupTransportAgent::processCallback()
|
||||
void SoupTransportAgent::handleTimeout()
|
||||
{
|
||||
//stop the message processing and mark status as timeout
|
||||
guint message_status = SOUP_STATUS_CANCELLED;
|
||||
soup_session_cancel_message(m_session.get(), m_message, message_status);
|
||||
m_status = TIME_OUT;
|
||||
return FALSE;
|
||||
// Stop the message processing and mark status as timeout, if message is really still
|
||||
// pending.
|
||||
if (m_message) {
|
||||
guint message_status = SOUP_STATUS_CANCELLED;
|
||||
soup_session_cancel_message(m_session.get(), m_message, message_status);
|
||||
g_main_loop_quit(m_loop.get());
|
||||
m_status = TIME_OUT;
|
||||
}
|
||||
}
|
||||
|
||||
gboolean SoupTransportAgent::TimeoutCallback(gpointer transport)
|
||||
void SoupTransportAgent::handleTimeoutWrapper(const boost::weak_ptr<SoupTransportAgent> &agent)
|
||||
{
|
||||
SoupTransportAgent * sTransport = static_cast<SoupTransportAgent *>(transport);
|
||||
return sTransport->processCallback();
|
||||
boost::shared_ptr<SoupTransportAgent> self(agent.lock());
|
||||
if (self.get()) {
|
||||
self->handleTimeout();
|
||||
}
|
||||
}
|
||||
|
||||
SE_END_CXX
|
||||
|
|
|
@ -26,9 +26,12 @@
|
|||
|
||||
#include <syncevo/TransportAgent.h>
|
||||
#include <syncevo/SmartPtr.h>
|
||||
#include <syncevo/timeout.h>
|
||||
#include <libsoup/soup.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include <boost/weak_ptr.hpp>
|
||||
|
||||
#include <syncevo/declarations.h>
|
||||
SE_BEGIN_CXX
|
||||
|
||||
|
@ -55,7 +58,7 @@ class SoupTransportAgent : public HTTPTransportAgent
|
|||
* transport will increase the reference count;
|
||||
* if NULL a new loop in the default context is used
|
||||
*/
|
||||
SoupTransportAgent(GMainLoop *loop = NULL);
|
||||
static boost::shared_ptr<SoupTransportAgent> create(GMainLoop *loop = NULL);
|
||||
~SoupTransportAgent();
|
||||
|
||||
virtual void setURL(const std::string &url);
|
||||
|
@ -72,8 +75,8 @@ class SoupTransportAgent : public HTTPTransportAgent
|
|||
virtual Status wait(bool noReply = false);
|
||||
virtual void getReply(const char *&data, size_t &len, std::string &contentType);
|
||||
virtual void setTimeout(int seconds);
|
||||
gboolean processCallback();
|
||||
private:
|
||||
boost::weak_ptr<SoupTransportAgent> m_self;
|
||||
std::string m_proxyUser;
|
||||
std::string m_proxyPassword;
|
||||
std::string m_cacerts;
|
||||
|
@ -86,11 +89,10 @@ class SoupTransportAgent : public HTTPTransportAgent
|
|||
std::string m_failure;
|
||||
|
||||
SoupMessage *m_message;
|
||||
GLibEvent m_timeoutEventSource;
|
||||
Timeout m_timeout;
|
||||
int m_timeoutSeconds;
|
||||
|
||||
/** This function is called regularly to detect timeout */
|
||||
static gboolean TimeoutCallback (gpointer data);
|
||||
SoupTransportAgent(GMainLoop *loop);
|
||||
|
||||
/** response, copied from SoupMessage */
|
||||
eptr<SoupBuffer, SoupBuffer, GLibUnref> m_response;
|
||||
|
@ -102,6 +104,8 @@ class SoupTransportAgent : public HTTPTransportAgent
|
|||
gpointer user_data);
|
||||
void HandleSessionCallback(SoupSession *session,
|
||||
SoupMessage *msg);
|
||||
void handleTimeout();
|
||||
static void handleTimeoutWrapper(const boost::weak_ptr<SoupTransportAgent> &agent);
|
||||
};
|
||||
|
||||
SE_END_CXX
|
||||
|
|
|
@ -59,6 +59,7 @@ using namespace std;
|
|||
#include <boost/bind.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/lambda/bind.hpp>
|
||||
#include <boost/typeof/typeof.hpp>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
|
@ -1681,7 +1682,7 @@ boost::shared_ptr<TransportAgent> SyncContext::createTransportAgent(void *gmainl
|
|||
} else if (boost::starts_with(url, "http://") ||
|
||||
boost::starts_with(url, "https://")) {
|
||||
#ifdef ENABLE_LIBSOUP
|
||||
boost::shared_ptr<SoupTransportAgent> agent(new SoupTransportAgent(static_cast<GMainLoop *>(gmainloop)));
|
||||
boost::shared_ptr<SoupTransportAgent> agent(SoupTransportAgent::create(static_cast<GMainLoop *>(gmainloop)));
|
||||
agent->setConfig(*this);
|
||||
InitializeTransport(agent, timeout);
|
||||
return agent;
|
||||
|
@ -3284,8 +3285,8 @@ void SyncContext::initMain(const char *appname)
|
|||
typedef void (*LogFunc_t)(int level, const char *str);
|
||||
void (*set_log_function)(LogFunc_t func);
|
||||
|
||||
set_log_level = (typeof(set_log_level))dlsym(RTLD_DEFAULT, "gnutls_global_set_log_level");
|
||||
set_log_function = (typeof(set_log_function))dlsym(RTLD_DEFAULT, "gnutls_global_set_log_function");
|
||||
set_log_level = (BOOST_TYPEOF(set_log_level))dlsym(RTLD_DEFAULT, "gnutls_global_set_log_level");
|
||||
set_log_function = (BOOST_TYPEOF(set_log_function))dlsym(RTLD_DEFAULT, "gnutls_global_set_log_function");
|
||||
|
||||
if (set_log_level && set_log_function) {
|
||||
set_log_level(atoi(gnutlsdbg));
|
||||
|
@ -3969,7 +3970,7 @@ SyncMLStatus SyncContext::doSync()
|
|||
sysync::STEPCMD_CLIENTSTART;
|
||||
SharedSession session = m_engine.OpenSession(m_sessionID);
|
||||
SharedBuffer sendBuffer;
|
||||
std::auto_ptr<SessionSentinel> sessionSentinel(new SessionSentinel(*this, session));
|
||||
std::unique_ptr<SessionSentinel> sessionSentinel(new SessionSentinel(*this, session));
|
||||
|
||||
if (m_serverMode && !m_localSync) {
|
||||
m_engine.WriteSyncMLBuffer(session,
|
||||
|
|
|
@ -608,7 +608,10 @@ class SyncContext : public SyncConfig {
|
|||
int32_t m_extra1, m_extra2, m_extra3;
|
||||
|
||||
SyncSourceEvent() :
|
||||
m_type(sysync::PEV_NOP)
|
||||
m_type(sysync::PEV_NOP),
|
||||
m_extra1(0),
|
||||
m_extra2(0),
|
||||
m_extra3(0)
|
||||
{}
|
||||
|
||||
SyncSourceEvent(sysync::TProgressEventEnum type,
|
||||
|
|
|
@ -465,15 +465,15 @@ SyncSource *SyncSource::createSource(const SyncSourceParams ¶ms, bool error,
|
|||
}
|
||||
|
||||
const SourceRegistry ®istry(getSourceRegistry());
|
||||
auto_ptr<SyncSource> source;
|
||||
unique_ptr<SyncSource> source;
|
||||
BOOST_FOREACH(const RegisterSyncSource *sourceInfos, registry) {
|
||||
auto_ptr<SyncSource> nextSource(sourceInfos->m_create(params));
|
||||
unique_ptr<SyncSource> nextSource(sourceInfos->m_create(params));
|
||||
if (nextSource.get()) {
|
||||
if (source.get()) {
|
||||
Exception::throwError(SE_HERE, params.getDisplayName() + ": backend " + sourceType.m_backend +
|
||||
" is ambiguous, avoid the alias and pick a specific backend instead directly");
|
||||
}
|
||||
source = nextSource;
|
||||
source = std::move(nextSource);
|
||||
}
|
||||
}
|
||||
if (source.get()) {
|
||||
|
@ -1694,7 +1694,7 @@ void SyncSourceAdmin::entry2mapid(const string &key, const string &value, sysync
|
|||
|
||||
void SyncSourceAdmin::init(SyncSource::Operations &ops,
|
||||
const boost::shared_ptr<ConfigNode> &config,
|
||||
const std::string adminPropertyName,
|
||||
const std::string &adminPropertyName,
|
||||
const boost::shared_ptr<ConfigNode> &mapping)
|
||||
{
|
||||
m_configNode = config;
|
||||
|
|
|
@ -857,7 +857,6 @@ template<class F> class OperationWrapperSwitch<F, 0, sysync::TSyError>
|
|||
PreSignal &getPreSignal() const { return const_cast<PreSignal &>(m_pre); }
|
||||
PostSignal &getPostSignal() const { return const_cast<PostSignal &>(m_post); }
|
||||
|
||||
|
||||
OperationWrapperSwitch(SyncSourceName &source) :
|
||||
m_source(source),
|
||||
m_pre(OperationSlotInvoker(source)),
|
||||
|
@ -2150,7 +2149,7 @@ class SyncSource : virtual public SyncSourceBase, public SyncSourceConfig, publi
|
|||
|
||||
/* implementation of SyncSourceBase */
|
||||
virtual std::string getName() const { return SyncSourceConfig::getName(); }
|
||||
virtual std::string getDisplayName() const { return m_name.c_str(); }
|
||||
virtual std::string getDisplayName() const { return m_name; }
|
||||
virtual void setDisplayName(const std::string &name) { m_name = name; }
|
||||
virtual long getNumDeleted() const { return m_numDeleted; }
|
||||
virtual void setNumDeleted(long num) { m_numDeleted = num; }
|
||||
|
@ -2994,7 +2993,7 @@ class SyncSourceAdmin : public virtual SyncSourceBase
|
|||
/** flexible initialization */
|
||||
void init(SyncSource::Operations &ops,
|
||||
const boost::shared_ptr<ConfigNode> &config,
|
||||
const std::string adminPropertyName,
|
||||
const std::string &adminPropertyName,
|
||||
const boost::shared_ptr<ConfigNode> &mapping);
|
||||
|
||||
/**
|
||||
|
|
|
@ -475,7 +475,7 @@ bool SyncEvolution_ReadNextMapItem( CContext aContext, MapID mID, bool aFirst )
|
|||
{
|
||||
SyncSource *source = DBC( aContext );
|
||||
if (!source) {
|
||||
return LOCERR_WRONGUSAGE;
|
||||
return false;
|
||||
}
|
||||
bool res = false;
|
||||
try {
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include <dlfcn.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <boost/typeof/typeof.hpp>
|
||||
|
||||
#include <syncevo/declarations.h>
|
||||
namespace {
|
||||
static std::string &getLookupDebug() { static std::string lookupDebug; return lookupDebug; }
|
||||
|
@ -100,10 +102,10 @@ dbus_connection_send_with_reply (void *connection,
|
|||
void **pending_return,
|
||||
int timeout_milliseconds)
|
||||
{
|
||||
static typeof(dbus_connection_send_with_reply) *real_func;
|
||||
static BOOST_TYPEOF(dbus_connection_send_with_reply) *real_func;
|
||||
|
||||
if (!real_func) {
|
||||
real_func = (typeof(dbus_connection_send_with_reply) *)dlsym(RTLD_NEXT, "dbus_connection_send_with_reply");
|
||||
real_func = (BOOST_TYPEOF(dbus_connection_send_with_reply) *)dlsym(RTLD_NEXT, "dbus_connection_send_with_reply");
|
||||
}
|
||||
return real_func ?
|
||||
real_func(connection, message, pending_return,
|
||||
|
|
|
@ -184,7 +184,7 @@ decode (const void *ptr)
|
|||
else
|
||||
{
|
||||
const unsigned char *p = ptr;
|
||||
int result = *p & (1 << (CHAR_BIT - 1)) ? ~0 : 0;
|
||||
unsigned result = *p & (1 << (CHAR_BIT - 1)) ? ~0 : 0;
|
||||
|
||||
result = (result << 8) | *p++;
|
||||
result = (result << 8) | *p++;
|
||||
|
@ -224,7 +224,7 @@ find_transidx (time_t *transitions, ttinfo *types, int *trans_idx, long int num_
|
|||
struct icaltimetype itime;
|
||||
|
||||
now = time (NULL);
|
||||
itime = icaltime_from_timet (now, 0);
|
||||
itime = icaltime_from_timet_with_zone (now, 0, NULL);
|
||||
itime.month = itime.day = 1;
|
||||
itime.hour = itime.minute = itime.second = 0;
|
||||
year_start = icaltime_as_timet(itime);
|
||||
|
@ -304,13 +304,13 @@ adjust_dtstart_day_to_rrule (icalcomponent *comp, struct icalrecurrencetype rule
|
|||
icalrecur_iterator *iter;
|
||||
|
||||
now = time (NULL);
|
||||
itime = icaltime_from_timet (now, 0);
|
||||
itime = icaltime_from_timet_with_zone (now, 0, NULL);
|
||||
itime.month = itime.day = 1;
|
||||
itime.hour = itime.minute = itime.second = 0;
|
||||
year_start = icaltime_as_timet(itime);
|
||||
|
||||
comp_start = icalcomponent_get_dtstart (comp);
|
||||
start = icaltime_from_timet (year_start, 0);
|
||||
start = icaltime_from_timet_with_zone (year_start, 0, NULL);
|
||||
|
||||
iter = icalrecur_iterator_new (rule, start);
|
||||
iter_start = icalrecur_iterator_next (iter);
|
||||
|
@ -478,7 +478,7 @@ icaltzutil_fetch_timezone (const char *location)
|
|||
trans = transitions [stdidx] + types [zp_idx].gmtoff;
|
||||
else
|
||||
trans = types [zp_idx].gmtoff;
|
||||
icaltime = icaltime_from_timet (trans, 0);
|
||||
icaltime = icaltime_from_timet_with_zone (trans, 0, NULL);
|
||||
dtstart = icaltime;
|
||||
dtstart.year = 1970;
|
||||
dtstart.minute = dtstart.second = 0;
|
||||
|
@ -520,7 +520,7 @@ icaltzutil_fetch_timezone (const char *location)
|
|||
trans = transitions [dstidx] + types [zp_idx].gmtoff;
|
||||
else
|
||||
trans = types [zp_idx].gmtoff;
|
||||
icaltime = icaltime_from_timet (trans, 0);
|
||||
icaltime = icaltime_from_timet_with_zone (trans, 0, NULL);
|
||||
dtstart = icaltime;
|
||||
dtstart.year = 1970;
|
||||
dtstart.minute = dtstart.second = 0;
|
||||
|
|
|
@ -210,6 +210,7 @@ src_syncevo_libsyncevolution_include_HEADERS = \
|
|||
src/syncevo/IdentityProvider.h \
|
||||
src/syncevo/GuardFD.h \
|
||||
src/syncevo/util.h \
|
||||
src/syncevo/timeout.h \
|
||||
src/syncevo/BoostHelper.h \
|
||||
src/syncevo/SuspendFlags.h \
|
||||
src/syncevo/SyncContext.h \
|
||||
|
|
|
@ -363,6 +363,7 @@ template<class T> class Init {
|
|||
Init() : m_value(boost::value_initialized<T>()) {}
|
||||
Init(const Init &other) : m_value(other.m_value) {}
|
||||
Init & operator = (const T &val) { m_value = val; return *this; }
|
||||
Init & operator = (const Init &other) { m_value = other.m_value; return *this; }
|
||||
operator const T & () const { return m_value; }
|
||||
operator T & () { return m_value; }
|
||||
private:
|
||||
|
|
|
@ -54,6 +54,8 @@ using namespace GDBusCXX;
|
|||
|
||||
#endif
|
||||
|
||||
#include <boost/typeof/typeof.hpp>
|
||||
|
||||
#include <syncevo/Cmdline.h>
|
||||
#include <syncevo/SyncContext.h>
|
||||
#include <syncevo/SuspendFlags.h>
|
||||
|
@ -74,10 +76,10 @@ SE_BEGIN_CXX
|
|||
#undef e_contact_new_from_vcard
|
||||
extern "C" EContact *e_contact_new_from_vcard(const char *vcard)
|
||||
{
|
||||
static typeof(e_contact_new_from_vcard) *impl;
|
||||
static BOOST_TYPEOF(e_contact_new_from_vcard) *impl;
|
||||
|
||||
if (!impl) {
|
||||
impl = (typeof(impl))dlsym(RTLD_NEXT, "e_contact_new_from_vcard");
|
||||
impl = (BOOST_TYPEOF(impl))dlsym(RTLD_NEXT, "e_contact_new_from_vcard");
|
||||
}
|
||||
|
||||
// Old versions of EDS-DBus parse_changes_array() call
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
#include <boost/lambda/if.hpp>
|
||||
#include <boost/lambda/casts.hpp>
|
||||
#include <boost/lambda/switch.hpp>
|
||||
#include <boost/typeof/typeof.hpp>
|
||||
|
||||
#include <pcrecpp.h>
|
||||
|
||||
|
@ -161,7 +162,7 @@ public:
|
|||
}
|
||||
|
||||
virtual SyncContext *createSyncClient() {
|
||||
std::auto_ptr<SyncContext> context(new SyncContext(m_server, true));
|
||||
std::unique_ptr<SyncContext> context(new SyncContext(m_server, true));
|
||||
boost::shared_ptr<SimpleUserInterface> ui(new SimpleUserInterface(context->getKeyring()));
|
||||
context->setUserInterface(ui);
|
||||
return context.release();
|
||||
|
@ -364,9 +365,9 @@ static void stripComponent(std::string &data,
|
|||
* is created for each source (see TestEvolution::createSource() and
|
||||
* SyncConfig::getSyncSourceNodes()).
|
||||
*/
|
||||
class TestingSyncSourcePtr : public std::auto_ptr<TestingSyncSource>
|
||||
class TestingSyncSourcePtr : public std::unique_ptr<TestingSyncSource>
|
||||
{
|
||||
typedef std::auto_ptr<TestingSyncSource> base_t;
|
||||
typedef std::unique_ptr<TestingSyncSource> base_t;
|
||||
bool m_active;
|
||||
|
||||
static StringMap m_anchors;
|
||||
|
@ -391,6 +392,9 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
// Not implemented, only declared to keep cppcheck happy.
|
||||
TestingSyncSourcePtr &operator = (const TestingSyncSourcePtr &other);
|
||||
|
||||
enum Flags {
|
||||
SLOW, /**< erase anchor, start accessing database from scratch */
|
||||
INCREMENTAL /**< allow source to do incremental data read */
|
||||
|
@ -1106,10 +1110,10 @@ void LocalTests::testOpen() {
|
|||
// check requirements
|
||||
CT_ASSERT(config.m_createSourceA);
|
||||
|
||||
// Intentionally use the plain auto_ptr here and
|
||||
// Intentionally use the plain unique_ptr here and
|
||||
// call open directly. That way it is a bit more clear
|
||||
// what happens and where it fails, if it fails.
|
||||
std::auto_ptr<TestingSyncSource> source;
|
||||
std::unique_ptr<TestingSyncSource> source;
|
||||
CT_ASSERT_NO_THROW(source.reset(createSourceA()));
|
||||
// got a sync source?
|
||||
CT_ASSERT(source.get() != 0);
|
||||
|
@ -1685,7 +1689,7 @@ void LocalTests::testRemoveProperties() {
|
|||
// compare
|
||||
TestingSyncSourcePtr copy;
|
||||
SOURCE_ASSERT_NO_FAILURE(copy.get(), copy.reset(createSourceA(), TestingSyncSourcePtr::SLOW));
|
||||
std::auto_ptr<ScopedEnvChange> envProps;
|
||||
std::unique_ptr<ScopedEnvChange> envProps;
|
||||
if (currentServer() == "googlecontacts") {
|
||||
// Google CardDAV server does not remove X- properties when
|
||||
// they are not sent at all. TODO (?): send them as empty
|
||||
|
@ -3163,8 +3167,6 @@ void SyncTests::refreshClient(SyncOptions options) {
|
|||
|
||||
// delete all items, locally and on server using refresh-from-client sync
|
||||
void SyncTests::testDeleteAllRefresh() {
|
||||
source_it it;
|
||||
|
||||
// start with clean local data
|
||||
CT_ASSERT_NO_THROW(allSourcesDeleteAll());
|
||||
|
||||
|
@ -3177,7 +3179,7 @@ void SyncTests::testDeleteAllRefresh() {
|
|||
deleteAll(DELETE_ALL_REFRESH);
|
||||
|
||||
// nothing stored locally?
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceA()));
|
||||
SOURCE_ASSERT_EQUAL(source.get(), 0, countItems(source.get()));
|
||||
|
@ -3189,7 +3191,7 @@ void SyncTests::testDeleteAllRefresh() {
|
|||
"check",
|
||||
SyncOptions(SYNC_SLOW,
|
||||
CheckSyncReport(0,0,0, 0,0,0, true, SYNC_SLOW)));
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceA()));
|
||||
SOURCE_ASSERT_EQUAL(source.get(), 0, countItems(source.get()));
|
||||
|
@ -3240,8 +3242,6 @@ void SyncTests::testDeleteAllSync()
|
|||
// test that a refresh sync from an empty server leads to an empty datatbase
|
||||
// and no changes are sent to server during next two-way sync
|
||||
void SyncTests::testRefreshFromServerSemantic() {
|
||||
source_it it;
|
||||
|
||||
// clean client and server
|
||||
CT_ASSERT_NO_THROW(deleteAll());
|
||||
|
||||
|
@ -3253,7 +3253,7 @@ void SyncTests::testRefreshFromServerSemantic() {
|
|||
CheckSyncReport(0,0,-1, 0,0,0, true, SYNC_REFRESH_FROM_REMOTE)));
|
||||
|
||||
// check
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceA()));
|
||||
SOURCE_ASSERT_EQUAL(source.get(), 0, countItems(source.get()));
|
||||
|
@ -3268,8 +3268,6 @@ void SyncTests::testRefreshFromServerSemantic() {
|
|||
// test that a refresh sync from an empty client leads to an empty datatbase
|
||||
// and no changes are sent to server during next two-way sync
|
||||
void SyncTests::testRefreshFromClientSemantic() {
|
||||
source_it it;
|
||||
|
||||
// clean client and server
|
||||
CT_ASSERT_NO_THROW(deleteAll());
|
||||
|
||||
|
@ -3303,8 +3301,6 @@ void SyncTests::testRefreshFromClientSemantic() {
|
|||
// - refresh from client
|
||||
// => no items should now be listed as new, updated or deleted for this client during another sync
|
||||
void SyncTests::testRefreshStatus() {
|
||||
source_it it;
|
||||
|
||||
CT_ASSERT_NO_THROW(allSourcesInsert(false));
|
||||
CT_ASSERT_NO_THROW(allSourcesDeleteAll());
|
||||
CT_ASSERT_NO_THROW(allSourcesInsert());
|
||||
|
@ -3406,15 +3402,15 @@ void SyncTests::doRestartSync(SyncMode mode)
|
|||
(boost::lambda::if_then(boost::lambda::var(needToConnect),
|
||||
(boost::lambda::var(needToConnect) = false,
|
||||
boost::lambda::bind(connectSourceSignal<SyncSource::Operations::StartDataRead_t,
|
||||
typeof(&SyncSource::Operations::StartDataRead_t::getPreSignal),
|
||||
typeof(start)>,
|
||||
BOOST_TYPEOF(&SyncSource::Operations::StartDataRead_t::getPreSignal),
|
||||
BOOST_TYPEOF(start)>,
|
||||
boost::lambda::_1,
|
||||
&SyncSource::Operations::m_startDataRead,
|
||||
&SyncSource::Operations::StartDataRead_t::getPreSignal,
|
||||
boost::cref(start)),
|
||||
boost::lambda::bind(connectSourceSignal<SyncSource::Operations::EndDataWrite_t,
|
||||
typeof(&SyncSource::Operations::EndDataWrite_t::getPostSignal),
|
||||
typeof(end)>,
|
||||
BOOST_TYPEOF(&SyncSource::Operations::EndDataWrite_t::getPostSignal),
|
||||
BOOST_TYPEOF(end)>,
|
||||
boost::lambda::_1,
|
||||
&SyncSource::Operations::m_endDataWrite,
|
||||
&SyncSource::Operations::EndDataWrite_t::getPostSignal,
|
||||
|
@ -3753,8 +3749,8 @@ void SyncTests::testManyRestarts()
|
|||
(boost::lambda::if_then(boost::lambda::var(needToConnect),
|
||||
(boost::lambda::var(needToConnect) = false,
|
||||
boost::lambda::bind(connectSourceSignal<SyncSource::Operations::StartDataRead_t,
|
||||
typeof(&SyncSource::Operations::StartDataRead_t::getPreSignal),
|
||||
typeof(start)>,
|
||||
BOOST_TYPEOF(&SyncSource::Operations::StartDataRead_t::getPreSignal),
|
||||
BOOST_TYPEOF(start)>,
|
||||
boost::lambda::_1,
|
||||
&SyncSource::Operations::m_startDataRead,
|
||||
&SyncSource::Operations::StartDataRead_t::getPreSignal,
|
||||
|
@ -3832,8 +3828,7 @@ void SyncTests::testUpdate() {
|
|||
// setup client A, B and server so that they all contain the same item
|
||||
CT_ASSERT_NO_THROW(doCopy());
|
||||
|
||||
source_it it;
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->update(it->second->createSourceA, it->second->config.m_updateItem));
|
||||
}
|
||||
|
||||
|
@ -3856,8 +3851,7 @@ void SyncTests::testComplexUpdate() {
|
|||
// setup client A, B and server so that they all contain the same item
|
||||
CT_ASSERT_NO_THROW(doCopy());
|
||||
|
||||
source_it it;
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
it->second->update(it->second->createSourceA,
|
||||
/* this test might get executed with some sources which have
|
||||
a complex update item while others don't: use the normal update item
|
||||
|
@ -3915,13 +3909,12 @@ void SyncTests::testMerge() {
|
|||
CT_ASSERT_NO_THROW(doCopy());
|
||||
|
||||
// update in client A
|
||||
source_it it;
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->update(it->second->createSourceA, it->second->config.m_mergeItem1));
|
||||
}
|
||||
|
||||
// update in client B
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->update(it->second->createSourceA, it->second->config.m_mergeItem2));
|
||||
}
|
||||
|
||||
|
@ -3941,7 +3934,7 @@ void SyncTests::testMerge() {
|
|||
CheckSyncReport(-1,-1,-1, -1,-1,-1, true, SYNC_TWO_WAY)));
|
||||
|
||||
// figure out how the conflict during ".conflict" was handled
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
TestingSyncSourcePtr copy;
|
||||
SOURCE_ASSERT_NO_FAILURE(copy.get(), copy.reset(it->second->createSourceA()));
|
||||
int numItems = 0;
|
||||
|
@ -3979,8 +3972,7 @@ void SyncTests::testTwinning() {
|
|||
CT_ASSERT_NO_THROW(deleteAll());
|
||||
|
||||
// import test data
|
||||
source_it it;
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->testImport());
|
||||
}
|
||||
|
||||
|
@ -4017,8 +4009,7 @@ void SyncTests::doOneWayFromRemote(SyncMode oneWayFromRemote) {
|
|||
|
||||
// check that everything is empty, also resets change tracking
|
||||
// in second sources of each client
|
||||
source_it it;
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4026,7 +4017,7 @@ void SyncTests::doOneWayFromRemote(SyncMode oneWayFromRemote) {
|
|||
CT_ASSERT_NO_THROW(source.reset());
|
||||
}
|
||||
}
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4036,14 +4027,14 @@ void SyncTests::doOneWayFromRemote(SyncMode oneWayFromRemote) {
|
|||
}
|
||||
|
||||
// add one item on first client, copy to server, and check change tracking via second source
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->insertManyItems(it->second->createSourceA, 200, 1));
|
||||
}
|
||||
doSync(__FILE__, __LINE__,
|
||||
"send",
|
||||
SyncOptions(SYNC_TWO_WAY,
|
||||
CheckSyncReport(0,0,0, 1,0,0, true, SYNC_TWO_WAY)));
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4057,7 +4048,7 @@ void SyncTests::doOneWayFromRemote(SyncMode oneWayFromRemote) {
|
|||
|
||||
// add a different item on second client, one-way-from-server
|
||||
// => one item added locally, none sent to server
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->insertManyItems(it->second->createSourceA, 2, 1));
|
||||
|
||||
if (it->second->config.m_createSourceB) {
|
||||
|
@ -4074,7 +4065,7 @@ void SyncTests::doOneWayFromRemote(SyncMode oneWayFromRemote) {
|
|||
"recv",
|
||||
SyncOptions(oneWayFromRemote,
|
||||
CheckSyncReport(1,0,0, 0,0,0, true, SYNC_ONE_WAY_FROM_REMOTE)));
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4092,7 +4083,7 @@ void SyncTests::doOneWayFromRemote(SyncMode oneWayFromRemote) {
|
|||
"check",
|
||||
SyncOptions(SYNC_TWO_WAY,
|
||||
CheckSyncReport(0,0,0, 0,0,0, true, SYNC_TWO_WAY)));
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4105,7 +4096,7 @@ void SyncTests::doOneWayFromRemote(SyncMode oneWayFromRemote) {
|
|||
}
|
||||
|
||||
// delete items on clientA, sync to server
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->deleteAll(it->second->createSourceA));
|
||||
|
||||
if (it->second->config.m_createSourceB) {
|
||||
|
@ -4122,7 +4113,7 @@ void SyncTests::doOneWayFromRemote(SyncMode oneWayFromRemote) {
|
|||
"delete",
|
||||
SyncOptions(SYNC_TWO_WAY,
|
||||
CheckSyncReport(0,0,0, 0,0,1, true, SYNC_TWO_WAY)));
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4140,7 +4131,7 @@ void SyncTests::doOneWayFromRemote(SyncMode oneWayFromRemote) {
|
|||
"delete",
|
||||
SyncOptions(oneWayFromRemote,
|
||||
CheckSyncReport(0,0,1, 0,0,0, true, SYNC_ONE_WAY_FROM_REMOTE)));
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4181,8 +4172,7 @@ void SyncTests::doOneWayFromLocal(SyncMode oneWayFromLocal) {
|
|||
|
||||
// check that everything is empty, also resets change tracking
|
||||
// in second sources of each client
|
||||
source_it it;
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4190,7 +4180,7 @@ void SyncTests::doOneWayFromLocal(SyncMode oneWayFromLocal) {
|
|||
CT_ASSERT_NO_THROW(source.reset());
|
||||
}
|
||||
}
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4200,14 +4190,14 @@ void SyncTests::doOneWayFromLocal(SyncMode oneWayFromLocal) {
|
|||
}
|
||||
|
||||
// add one item on first client, copy to server, and check change tracking via second source
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->insertManyItems(it->second->createSourceA, 1, 1));
|
||||
}
|
||||
doSync(__FILE__, __LINE__,
|
||||
"send",
|
||||
SyncOptions(SYNC_TWO_WAY,
|
||||
CheckSyncReport(0,0,0, 1,0,0, true, SYNC_TWO_WAY)));
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4221,7 +4211,7 @@ void SyncTests::doOneWayFromLocal(SyncMode oneWayFromLocal) {
|
|||
|
||||
// add a different item on second client, one-way-from-client
|
||||
// => no item added locally, one sent to server
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->insertManyItems(it->second->createSourceA, 2, 1));
|
||||
|
||||
if (it->second->config.m_createSourceB) {
|
||||
|
@ -4238,7 +4228,7 @@ void SyncTests::doOneWayFromLocal(SyncMode oneWayFromLocal) {
|
|||
"send",
|
||||
SyncOptions(oneWayFromLocal,
|
||||
CheckSyncReport(0,0,0, 1,0,0, true, SYNC_ONE_WAY_FROM_LOCAL)));
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4256,7 +4246,7 @@ void SyncTests::doOneWayFromLocal(SyncMode oneWayFromLocal) {
|
|||
"check",
|
||||
SyncOptions(SYNC_TWO_WAY,
|
||||
CheckSyncReport(1,0,0, 0,0,0, true, SYNC_TWO_WAY)));
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4269,7 +4259,7 @@ void SyncTests::doOneWayFromLocal(SyncMode oneWayFromLocal) {
|
|||
}
|
||||
|
||||
// delete items on client B, sync to server
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->deleteAll(it->second->createSourceA));
|
||||
|
||||
if (it->second->config.m_createSourceB) {
|
||||
|
@ -4286,7 +4276,7 @@ void SyncTests::doOneWayFromLocal(SyncMode oneWayFromLocal) {
|
|||
"delete",
|
||||
SyncOptions(oneWayFromLocal,
|
||||
CheckSyncReport(0,0,0, 0,0,1, true, SYNC_ONE_WAY_FROM_LOCAL)));
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4304,7 +4294,7 @@ void SyncTests::doOneWayFromLocal(SyncMode oneWayFromLocal) {
|
|||
"delete",
|
||||
SyncOptions(SYNC_TWO_WAY,
|
||||
CheckSyncReport(0,0,1, 0,0,0, true, SYNC_TWO_WAY)));
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4420,8 +4410,7 @@ void SyncTests::testItems() {
|
|||
CT_ASSERT_NO_THROW(deleteAll());
|
||||
|
||||
// import data
|
||||
source_it it;
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->testImport());
|
||||
}
|
||||
|
||||
|
@ -4439,8 +4428,7 @@ void SyncTests::testItemsXML() {
|
|||
CT_ASSERT_NO_THROW(deleteAll());
|
||||
|
||||
// import data
|
||||
source_it it;
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->testImport());
|
||||
}
|
||||
|
||||
|
@ -4460,8 +4448,7 @@ void SyncTests::testExtensions() {
|
|||
CT_ASSERT_NO_THROW(deleteAll());
|
||||
|
||||
// import data and create reference data
|
||||
source_it it;
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->testImport());
|
||||
|
||||
string refDir = getCurrentTest() + "." + it->second->config.m_sourceName + ".ref.dat";
|
||||
|
@ -4488,7 +4475,7 @@ void SyncTests::testExtensions() {
|
|||
CT_ASSERT_NO_THROW(accessClientB->refreshClient(SyncOptions()));
|
||||
|
||||
// update on client B
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->updateData(it->second->createSourceB));
|
||||
}
|
||||
|
||||
|
@ -4497,7 +4484,7 @@ void SyncTests::testExtensions() {
|
|||
doSync(__FILE__, __LINE__, "patch", SyncOptions(SYNC_TWO_WAY));
|
||||
|
||||
bool equal = true;
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
string refDir = getCurrentTest() + "." + it->second->config.m_sourceName + ".ref.dat";
|
||||
simplifyFilename(refDir);
|
||||
TestingSyncSourcePtr source;
|
||||
|
@ -4538,8 +4525,7 @@ void SyncTests::testAddUpdate() {
|
|||
accessClientB->refreshClient();
|
||||
|
||||
// add item
|
||||
source_it it;
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->insert(it->second->createSourceA, it->second->config.m_insertItem, false));
|
||||
}
|
||||
doSync(__FILE__, __LINE__,
|
||||
|
@ -4548,7 +4534,7 @@ void SyncTests::testAddUpdate() {
|
|||
CheckSyncReport(0,0,0, 1,0,0, true, SYNC_TWO_WAY)));
|
||||
|
||||
// update it
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->update(it->second->createSourceB, it->second->config.m_updateItem));
|
||||
}
|
||||
doSync(__FILE__, __LINE__,
|
||||
|
@ -4592,9 +4578,8 @@ void SyncTests::testManyItems() {
|
|||
|
||||
// import artificial data: make them large to generate some
|
||||
// real traffic and test buffer handling
|
||||
source_it it;
|
||||
int num_items = defNumItems();
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->insertManyItems(it->second->createSourceA, 0, num_items, 2000));
|
||||
}
|
||||
|
||||
|
@ -4636,9 +4621,8 @@ void SyncTests::testManyDeletes() {
|
|||
|
||||
// import artificial data: make them small, we just want
|
||||
// many of them
|
||||
source_it it;
|
||||
int num_items = defNumItems();
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->insertManyItems(it->second->createSourceA, 0, num_items, 100));
|
||||
}
|
||||
|
||||
|
@ -4794,8 +4778,7 @@ void SyncTests::testDeleteBothSides()
|
|||
"delete-item-A",
|
||||
SyncOptions(SYNC_TWO_WAY,
|
||||
CheckSyncReport(0,0,0, 0,0,1, true, SYNC_TWO_WAY)));
|
||||
source_it it;
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -4811,7 +4794,7 @@ void SyncTests::testDeleteBothSides()
|
|||
"delete-item-B",
|
||||
SyncOptions(SYNC_TWO_WAY,
|
||||
CheckSyncReport(0,0,0, 0,0,-1, true, SYNC_TWO_WAY)));
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
if (it->second->config.m_createSourceB) {
|
||||
TestingSyncSourcePtr source;
|
||||
SOURCE_ASSERT_NO_FAILURE(source.get(), source.reset(it->second->createSourceB()));
|
||||
|
@ -5086,14 +5069,12 @@ void SyncTests::testAddBothSidesRefresh()
|
|||
*/
|
||||
void SyncTests::testLinkedItemsParentChild()
|
||||
{
|
||||
source_it it;
|
||||
|
||||
// clean server, client A and client B
|
||||
CT_ASSERT_NO_THROW(deleteAll());
|
||||
accessClientB->refreshClient();
|
||||
|
||||
// create and copy parent item
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT(!it->second->config.m_linkedItems.empty());
|
||||
CT_ASSERT(it->second->config.m_linkedItems[0].size() >= 2);
|
||||
TestingSyncSourcePtr source;
|
||||
|
@ -5107,7 +5088,7 @@ void SyncTests::testLinkedItemsParentChild()
|
|||
CheckSyncReport(0,0,0, 1,0,0, true, SYNC_TWO_WAY)));
|
||||
|
||||
// create independent item, refresh client B and server
|
||||
for (it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
for (source_it it = accessClientB->sources.begin(); it != accessClientB->sources.end(); ++it) {
|
||||
CT_ASSERT_NO_THROW(it->second->insert(it->second->createSourceA,
|
||||
it->second->config.m_insertItem,
|
||||
false));
|
||||
|
@ -5118,7 +5099,7 @@ void SyncTests::testLinkedItemsParentChild()
|
|||
CheckSyncReport(1,0,0, 1,0,0, true, SYNC_TWO_WAY)));
|
||||
|
||||
// add child on client A
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT(!it->second->config.m_linkedItems.empty());
|
||||
CT_ASSERT(it->second->config.m_linkedItems[0].size() >= 2);
|
||||
TestingSyncSourcePtr source;
|
||||
|
@ -5149,14 +5130,12 @@ void SyncTests::testLinkedItemsParentChild()
|
|||
*/
|
||||
void SyncTests::testLinkedItemsChild()
|
||||
{
|
||||
source_it it;
|
||||
|
||||
// clean server, client A and client B
|
||||
CT_ASSERT_NO_THROW(deleteAll());
|
||||
accessClientB->refreshClient();
|
||||
|
||||
// create and copy child item
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT(!it->second->config.m_linkedItems.empty());
|
||||
CT_ASSERT(it->second->config.m_linkedItems[0].size() >= 2);
|
||||
TestingSyncSourcePtr source;
|
||||
|
@ -5187,14 +5166,12 @@ void SyncTests::testLinkedItemsChild()
|
|||
*/
|
||||
void SyncTests::testLinkedItemsChildParent()
|
||||
{
|
||||
source_it it;
|
||||
|
||||
// clean server, client A and client B
|
||||
CT_ASSERT_NO_THROW(deleteAll());
|
||||
accessClientB->refreshClient();
|
||||
|
||||
// create and copy child item
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT(!it->second->config.m_linkedItems[0].empty());
|
||||
CT_ASSERT(it->second->config.m_linkedItems[0].size() >= 2);
|
||||
TestingSyncSourcePtr source;
|
||||
|
@ -5212,7 +5189,7 @@ void SyncTests::testLinkedItemsChildParent()
|
|||
CheckSyncReport(1,0,0, 0,0,0, true, SYNC_TWO_WAY)));
|
||||
|
||||
// add parent on client A
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
CT_ASSERT(!it->second->config.m_linkedItems.empty());
|
||||
CT_ASSERT(it->second->config.m_linkedItems[0].size() >= 2);
|
||||
TestingSyncSourcePtr source;
|
||||
|
@ -5252,8 +5229,7 @@ void SyncTests::doVarSizes(bool withMaxMsgSize,
|
|||
CT_ASSERT_NO_THROW(deleteAll());
|
||||
|
||||
// insert items, doubling their size, then restart with small size
|
||||
source_it it;
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
for (source_it it = sources.begin(); it != sources.end(); ++it) {
|
||||
int item = 1;
|
||||
restoreStorage(it->second->config, client);
|
||||
TestingSyncSourcePtr source;
|
||||
|
@ -6060,7 +6036,7 @@ static void UpdateLocal(const std::string &config, const std::string &source,
|
|||
// The local side also uses the Cmdline class because then we only
|
||||
// need to implement one way of updating items. But first we need to
|
||||
// get the actual data.
|
||||
std::auto_ptr<Cmdline> cmdline;
|
||||
std::unique_ptr<Cmdline> cmdline;
|
||||
|
||||
rm_r(actualLocalData);
|
||||
mkdir_p(actualLocalData);
|
||||
|
@ -6109,7 +6085,7 @@ void SyncTests::testUpload()
|
|||
std::string localSyncedTestdata = getPeerTestdata(config.m_sourceName, testname, "local-synced");
|
||||
CT_ASSERT_MESSAGE(localSyncedTestdata, !access(localSyncedTestdata.c_str(), R_OK));
|
||||
|
||||
std::auto_ptr<Cmdline> cmdline;
|
||||
std::unique_ptr<Cmdline> cmdline;
|
||||
|
||||
// Import locally into empty database.
|
||||
sources[0].second->deleteAll(sources[0].second->createSourceA);
|
||||
|
@ -6195,7 +6171,7 @@ void SyncTests::testDownload()
|
|||
std::string remoteSyncedTestdata = getPeerTestdata(config.m_sourceName, testname, "remote-synced");
|
||||
CT_ASSERT_MESSAGE(remoteSyncedTestdata, !access(remoteSyncedTestdata.c_str(), R_OK));
|
||||
|
||||
std::auto_ptr<Cmdline> cmdline;
|
||||
std::unique_ptr<Cmdline> cmdline;
|
||||
|
||||
// Wipe remote directly, then import.
|
||||
cmdline.reset(new TestCmdline("--daemon=no",
|
||||
|
@ -6301,7 +6277,7 @@ void SyncTests::doUpdateConflict(const std::string &testname, bool localWins)
|
|||
// Export from remote directly.
|
||||
std::string actualRemoteData = getCurrentTest() + ".remote.test.dat";
|
||||
simplifyFilename(actualRemoteData);
|
||||
std::auto_ptr<Cmdline> cmdline;
|
||||
std::unique_ptr<Cmdline> cmdline;
|
||||
rm_r(actualRemoteData);
|
||||
mkdir_p(actualRemoteData);
|
||||
cmdline.reset(new TestCmdline("--daemon=no",
|
||||
|
@ -8384,8 +8360,9 @@ void CheckSyncReport::check(const std::string &name, const SyncSourceReport &sou
|
|||
}
|
||||
}
|
||||
|
||||
/** @} */
|
||||
/** @endcond */
|
||||
SE_END_CXX
|
||||
|
||||
#endif // ENABLE_INTEGRATION_TESTS
|
||||
|
||||
SE_END_CXX
|
||||
/** @} */
|
||||
/** @endcond */
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
# Use this file with
|
||||
# gdb --batch --return-child-result -x gdb-dump-stack <some command>
|
||||
# to get full stack backtraces when the command or any of its
|
||||
# children fails.
|
||||
|
||||
# It is important that we keep processes running in parallel,
|
||||
# otherwise we risk deadlocks once multiple processes are involved.
|
||||
set non-stop on
|
||||
|
||||
# Keep track also of child processes.
|
||||
set detach-on-fork off
|
||||
set follow-fork-mode parent
|
||||
|
||||
python
|
||||
class Exited (gdb.Function):
|
||||
"""Return 1 if current threat has exited, else 0."""
|
||||
|
||||
def __init__ (self):
|
||||
super (Exited, self).__init__("exited")
|
||||
|
||||
def invoke (self):
|
||||
thread = gdb.selected_thread()
|
||||
if thread is None or thread.is_exited():
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
|
||||
class FindStopped (gdb.Function):
|
||||
"""Dump stack backtrace of all stopped threads and continue them."""
|
||||
|
||||
def __init__ (self):
|
||||
super (FindStopped, self).__init__("find_stopped")
|
||||
|
||||
def invoke (self):
|
||||
for inferior in gdb.inferiors():
|
||||
if inferior.is_valid():
|
||||
for thread in inferior.threads():
|
||||
if thread.is_valid() and thread.is_stopped():
|
||||
thread.switch()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
Exited()
|
||||
FindStopped()
|
||||
end
|
||||
|
||||
# Start the command. Returns once something needs our attention.
|
||||
run
|
||||
|
||||
# Continously deal with events that normally require user intervention:
|
||||
# - a process was stopped because of something (like a segfault)
|
||||
# - a process has quit
|
||||
while 1
|
||||
if $find_stopped()
|
||||
# The stopped thread is now selected, so we can dump some information about
|
||||
# it, then continue it.
|
||||
info inferiors
|
||||
bt
|
||||
continue
|
||||
else
|
||||
inferior 1
|
||||
if $exited()
|
||||
# No stopped thread, current thread has quit -> we are done.
|
||||
loop_break
|
||||
else
|
||||
# We need to do something, otherwise we would busy-loop
|
||||
# while all threads are running. Therefore we interrupt
|
||||
# and restart the main thread.
|
||||
#
|
||||
# In (unlikely?) case that some other thread stops by
|
||||
# itself while we do that, we continue all threads to
|
||||
# avoid potential deadlocks (main thread running again but
|
||||
# waiting for stopped thread that we don't know about).
|
||||
# The downside is that we don't print a stack backtrace
|
||||
# of such a thread.
|
||||
interrupt
|
||||
continue -a
|
||||
end
|
||||
end
|
|
@ -1374,7 +1374,9 @@ if options.sourcedir:
|
|||
if options.nosourcedircopy:
|
||||
if options.cppcheck:
|
||||
sync = CppcheckSource("syncevolution", options.sourcedir,
|
||||
"--enable=warning,performance,portability --inline-suppr")
|
||||
"--enable=warning,performance,portability --inline-suppr " +
|
||||
# bogus: cppcheck warning: uninitMemberVar - Member variable 'OperationWrapperSwitch::m_source' is not initialized in the constructor.
|
||||
"--suppress=uninitMemberVar:*/SyncSource.h")
|
||||
else:
|
||||
sync = NopSource("syncevolution", options.sourcedir)
|
||||
else:
|
||||
|
@ -1692,6 +1694,16 @@ test = SyncEvolutionTest("googlecalendar", compile,
|
|||
"Client::Source::google_caldav::LinkedItemsAllDayGoogle::testLinkedItemsInsertChildTwice,"
|
||||
"Client::Source::google_caldav::LinkedItemsAllDayGoogle::testLinkedItemsUpdateChild,"
|
||||
"Client::Source::google_caldav::LinkedItemsAllDayGoogle::testLinkedItemsUpdateChildNoIDs,"
|
||||
# A child without parent has its RECURRENCE-ID turned into UTC.
|
||||
# https://stackoverflow.com/questions/47811670/detached-recurrence-without-parent-event
|
||||
"Client::Source::google_caldav::LinkedItemsDefault::testLinkedItemsChild,"
|
||||
"Client::Source::google_caldav::LinkedItemsDefault::testLinkedItemsInsertChildTwice,"
|
||||
"Client::Source::google_caldav::LinkedItemsDefault::testLinkedItemsUpdateChild,"
|
||||
"Client::Source::google_caldav::LinkedItemsDefault::testLinkedItemsUpdateChildNoIDs,"
|
||||
"Client::Source::google_caldav::LinkedItemsWithVALARM::testLinkedItemsChild,"
|
||||
"Client::Source::google_caldav::LinkedItemsWithVALARM::testLinkedItemsInsertChildTwice,"
|
||||
"Client::Source::google_caldav::LinkedItemsWithVALARM::testLinkedItemsUpdateChild,"
|
||||
"Client::Source::google_caldav::LinkedItemsWithVALARM::testLinkedItemsUpdateChildNoIDs,"
|
||||
,
|
||||
testPrefix=options.testprefix)
|
||||
context.add(test)
|
||||
|
|
|
@ -2362,3 +2362,53 @@
|
|||
fun:g_get_charset
|
||||
fun:g_strerror
|
||||
}
|
||||
|
||||
# ==7252== 32 bytes in 1 blocks are definitely lost in loss record 3,745 of 7,871
|
||||
# ==7252== at 0x99ABCFC: g_closure_new_simple (gclosure.c:211)
|
||||
# ==7252== by 0x99AD31F: g_cclosure_new (gclosure.c:944)
|
||||
# ==7252== by 0x99C63F8: g_signal_connect_data (gsignal.c:2510)
|
||||
# ==7252== by 0x5C440D3: source_initable_init (e-source.c:2019)
|
||||
# ==7252== by 0x9664246: g_initable_new_valist (ginitable.c:248)
|
||||
# ==7252== by 0x96642F8: g_initable_new (ginitable.c:162)
|
||||
# ==7252== by 0x5C41B4B: e_source_new (e-source.c:2506)
|
||||
# ==7252== by 0x5C60187: source_registry_new_source (e-source-registry.c:706)
|
||||
# ==7252== by 0x5C6033E: source_registry_object_manager_thread (e-source-registry.c:1124)
|
||||
# ==7252== by 0x9C635F4: g_thread_proxy (gthread.c:784)
|
||||
# ==7252== by 0x8605518: start_thread (pthread_create.c:456)
|
||||
# ==7252== by 0xA89AA5E: clone (clone.S:97)
|
||||
# ==7252==
|
||||
{
|
||||
source_registry_new_source thread + closure
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:g_closure_new_simple
|
||||
fun:g_cclosure_new
|
||||
fun:g_signal_connect_data
|
||||
fun:source_initable_init
|
||||
fun:g_initable_new_valist
|
||||
fun:g_initable_new
|
||||
fun:e_source_new
|
||||
fun:source_registry_new_source
|
||||
fun:source_registry_object_manager_thread
|
||||
fun:g_thread_proxy
|
||||
}
|
||||
|
||||
# ==8315== Invalid write of size 4
|
||||
# ==8315== at 0x4009B42: check_match (dl-lookup.c:107)
|
||||
# ==8315== Address 0xffeffbe70 is on thread 1's stack
|
||||
# ==8315==
|
||||
{
|
||||
dl-lookup 4
|
||||
Memcheck:Addr4
|
||||
fun:check_match
|
||||
}
|
||||
|
||||
# ==8315== Invalid read of size 1
|
||||
# ==8315== at 0x4009B42: check_match (dl-lookup.c:107)
|
||||
# ==8315== Address 0xffeffbe70 is on thread 1's stack
|
||||
# ==8315==
|
||||
{
|
||||
dl-lookup 1
|
||||
Memcheck:Addr1
|
||||
fun:check_match
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ if COND_DBUS
|
|||
noinst_PROGRAMS += test/dbus-client-server
|
||||
test_dbus_client_server_SOURCES = test/dbus-client-server.cpp
|
||||
test_dbus_client_server_CPPFLAGS = -I$(gdbus_dir) -I$(top_srcdir)/src
|
||||
test_dbus_client_server_CXXFLAGS = $(CPPUNIT_CFLAGS) $(SYNCEVOLUTION_CXXFLAGS) $(BACKEND_CPPFLAGS) $(DBUS_CFLAGS) $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) $(PCRECPP_CFLAGS)
|
||||
test_dbus_client_server_CXXFLAGS = $(CPPUNIT_CFLAGS) $(SYNCEVOLUTION_CXXFLAGS) $(SYNCEVO_WFLAGS) $(BACKEND_CPPFLAGS) $(DBUS_CFLAGS) $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) $(PCRECPP_CFLAGS)
|
||||
test_dbus_client_server_LDFLAGS = $(CPPUNIT_LIBS)
|
||||
test_dbus_client_server_LDADD = $(gdbus_build_dir)/libgdbussyncevo.la src/syncevo/libsyncevolution.la $(DBUS_LIBS) $(GLIB_LIBS) $(GOBJECT_LIBS) $(PCRECPP_LIBS) $(EXTRACORELDADD)
|
||||
test_dbus_client_server_DEPENDENCIES = $(gdbus_build_dir)/libgdbussyncevo.la src/syncevo/libsyncevolution.la
|
||||
|
|
|
@ -255,7 +255,7 @@
|
|||
-PRODID:-//Ximian//NONSGML Evolution Calendar//EN
|
||||
-VERSION:2.0
|
||||
+BEGIN:VTIMEZONE
|
||||
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
|
||||
+TZID:Europe/Berlin
|
||||
+X-LIC-LOCATION:Europe/Berlin
|
||||
+BEGIN:DAYLIGHT
|
||||
+TZOFFSETFROM:+0100
|
||||
|
@ -277,8 +277,8 @@
|
|||
DTSTAMP:20080407T193125Z
|
||||
-DTSTART:20080406T090000Z
|
||||
-DTEND:20080406T093000Z
|
||||
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:20080406T110000
|
||||
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:20080406T113000
|
||||
+DTSTART;TZID=Europe/Berlin:20080406T110000
|
||||
+DTEND;TZID=Europe/Berlin:20080406T113000
|
||||
TRANSP:OPAQUE
|
||||
SEQUENCE:2
|
||||
SUMMARY:Recurring
|
||||
|
@ -287,7 +287,7 @@
|
|||
PRODID:-//Ximian//NONSGML Evolution Calendar//EN
|
||||
VERSION:2.0
|
||||
+BEGIN:VTIMEZONE
|
||||
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
|
||||
+TZID:Europe/Berlin
|
||||
+X-LIC-LOCATION:Europe/Berlin
|
||||
+BEGIN:DAYLIGHT
|
||||
+TZOFFSETFROM:+0100
|
||||
|
@ -309,8 +309,8 @@
|
|||
DTSTAMP:20080407T193125Z
|
||||
-DTSTART:20080413T090000Z
|
||||
-DTEND:20080413T093000Z
|
||||
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:20080413T110000
|
||||
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:20080413T113000
|
||||
+DTSTART;TZID=Europe/Berlin:20080413T110000
|
||||
+DTEND;TZID=Europe/Berlin:20080413T113000
|
||||
TRANSP:OPAQUE
|
||||
SEQUENCE:7
|
||||
SUMMARY:Recurring: Modified
|
||||
|
@ -318,7 +318,7 @@
|
|||
CREATED:20080407T193241Z
|
||||
LAST-MODIFIED:20080407T193647
|
||||
-RECURRENCE-ID:20080413T090000Z
|
||||
+RECURRENCE-ID;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:20080413T110000
|
||||
+RECURRENCE-ID;TZID=Europe/Berlin:20080413T110000
|
||||
DESCRIPTION:second instance modified
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
@ -435,43 +435,7 @@
|
|||
DESCRIPTION:second instance modified\, single detached recurrence
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
@@ -345,71 +520,36 @@
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//Ximian//NONSGML Evolution Calendar//EN
|
||||
VERSION:2.0
|
||||
+BEGIN:VTIMEZONE
|
||||
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
|
||||
+X-LIC-LOCATION:Europe/Berlin
|
||||
+BEGIN:DAYLIGHT
|
||||
+TZOFFSETFROM:+0100
|
||||
+TZOFFSETTO:+0200
|
||||
+TZNAME:CEST
|
||||
+DTSTART:19700329T020000
|
||||
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
|
||||
+END:DAYLIGHT
|
||||
+BEGIN:STANDARD
|
||||
+TZOFFSETFROM:+0200
|
||||
+TZOFFSETTO:+0100
|
||||
+TZNAME:CET
|
||||
+DTSTART:19701025T030000
|
||||
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
|
||||
+END:STANDARD
|
||||
+END:VTIMEZONE
|
||||
BEGIN:VEVENT
|
||||
UID:20080407T193125Z-19554-727-1-50-YY@gollum
|
||||
DTSTAMP:20080407T193125Z
|
||||
-DTSTART:20080413T090000Z
|
||||
-DTEND:20080413T093000Z
|
||||
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:20080413T110000
|
||||
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:20080413T113000
|
||||
TRANSP:OPAQUE
|
||||
SEQUENCE:7
|
||||
SUMMARY:Recurring 3: Modified
|
||||
CLASS:PUBLIC
|
||||
CREATED:20080407T193241Z
|
||||
LAST-MODIFIED:20080407T193647
|
||||
-RECURRENCE-ID:20080413T090000Z
|
||||
+RECURRENCE-ID;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:20080413T110000
|
||||
@@ -360,56 +535,3 @@
|
||||
DESCRIPTION:second instance modified
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
|
|
@ -14,3 +14,4 @@ The test data was adapted to cope with some bugs:
|
|||
finally the Google parser strips the trailing white space.
|
||||
|
||||
- Google swallows one space before the \n in custom-label5.
|
||||
- no PHOTO data because the server may re-encode the image
|
||||
|
|
|
@ -58,16 +58,6 @@ ADR;TYPE=WORK:;;work address;;;;
|
|||
ADR:;;custom address;;;;
|
||||
BDAY:19701230
|
||||
NOTE:A test contact.
|
||||
PHOTO;TYPE=png;ENCODING=b:iVBORw0KGgoAAAANSUhEUgAAACQAAAAXCAYAAABj7u2bAAAAB
|
||||
mJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1gEICjgdiWkBOQA
|
||||
AAB10RVh0Q29tbWVudABDcmVhdGVkIHdpdGggVGhlIEdJTVDvZCVuAAABaElEQVRIx+3Wu0tcU
|
||||
RAG8F98gRKTYGORRqwksJV/QOqFFIFgKgsRYbHV1larDQQCKQxpUscyhUmXJuCSNpYWPsAU6wP
|
||||
xHW6aWbgsu+ve3RUs7geHc+fON3O+M4c5HHLkyHG/eISkg5heIGmUr++hVWigyY6THlejbWSt0
|
||||
Bv8QBXX2MF7jKU4IyjjJ45xg31sYKZuw7Xv9Gh6vvXO9QbBtbGNJ8Ert+AlTURkFjQX9g5e4yk
|
||||
GUcBm+FaDexx2MUQOYhIL2Lpj09oV9CvsQgPuePj+hP037BL6M6yRSdDZHWVOcBHcEv7FvyN8x
|
||||
xqmeynovA1Baf4UVvANhyn/Uq8E/Q57ssNufhvx1QZrDHfS9p9i3sQsnscdNowXWEQlOBXMYyI
|
||||
4j3EavqFUzpOYl4OTqUJ9+NzmkbXyb6Ryfumm7Wso4it2cYXL6K6PeBmcV8E5iEvxPDjv8CyVa
|
||||
xQfsIfbqGIlf17k6Bb/Ae0cnahfg6KuAAAAAElFTkSuQmCC
|
||||
X-PHONETIC-FIRST-NAME:John
|
||||
X-PHONETIC-LAST-NAME:Doe
|
||||
END:VCARD
|
||||
END:VCARD
|
||||
|
|
|
@ -24,16 +24,6 @@ EMAIL;TYPE=HOME,PREF:john.doe@home.com
|
|||
EMAIL;TYPE=WORK:doe@work.com
|
||||
item2.EMAIL:john@custom.com
|
||||
NOTE:A test contact.
|
||||
PHOTO;ENCODING=b;TYPE=PNG:iVBORw0KGgoAAAANSUhEUgAAACQAAAAXCAYAAABj7u2bAAAAB
|
||||
mJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1gEICjgdiWkBO
|
||||
QAAAB10RVh0Q29tbWVudABDcmVhdGVkIHdpdGggVGhlIEdJTVDvZCVuAAABaElEQVRIx+3Wu
|
||||
0tcURAG8F98gRKTYGORRqwksJV/QOqFFIFgKgsRYbHV1larDQQCKQxpUscyhUmXJuCSNpYWP
|
||||
sAU6wPxHW6aWbgsu+ve3RUs7geHc+fON3O+M4c5HHLkyHG/eISkg5heIGmUr++hVWigyY6TH
|
||||
lejbWSt0Bv8QBXX2MF7jKU4IyjjJ45xg31sYKZuw7Xv9Gh6vvXO9QbBtbGNJ8Ert+AlTURkF
|
||||
jQX9g5e4ykGUcBm+FaDexx2MUQOYhIL2Lpj09oV9CvsQgPuePj+hP037BL6M6yRSdDZHWVOc
|
||||
BHcEv7FvyN8xxqmeynovA1Baf4UVvANhyn/Uq8E/Q57ssNufhvx1QZrDHfS9p9i3sQsnscdN
|
||||
owXWEQlOBXMYyI4j3EavqFUzpOYl4OTqUJ9+NzmkbXyb6Ryfumm7Wso4it2cYXL6K6PeBmcV
|
||||
8E5iEvxPDjv8CyVaxQfsIfbqGIlf17k6Bb/Ae0cnahfg6KuAAAAAElFTkSuQmCC
|
||||
item5.IMPP;X-SERVICE-TYPE=GoogleTalk:xmpp:google%20talk
|
||||
item6.IMPP;X-SERVICE-TYPE=AIM:aim:aim
|
||||
item7.IMPP;X-SERVICE-TYPE=Yahoo:ymsgr:yahoo
|
||||
|
|
|
@ -25,16 +25,6 @@ EMAIL;TYPE=WORK:doe@work.com
|
|||
item2.EMAIL:john@custom.com
|
||||
EMAIL:new local email
|
||||
NOTE:A test contact.
|
||||
PHOTO;ENCODING=b;TYPE=PNG:iVBORw0KGgoAAAANSUhEUgAAACQAAAAXCAYAAABj7u2bAAAAB
|
||||
mJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1gEICjgdiWkBO
|
||||
QAAAB10RVh0Q29tbWVudABDcmVhdGVkIHdpdGggVGhlIEdJTVDvZCVuAAABaElEQVRIx+3Wu
|
||||
0tcURAG8F98gRKTYGORRqwksJV/QOqFFIFgKgsRYbHV1larDQQCKQxpUscyhUmXJuCSNpYWP
|
||||
sAU6wPxHW6aWbgsu+ve3RUs7geHc+fON3O+M4c5HHLkyHG/eISkg5heIGmUr++hVWigyY6TH
|
||||
lejbWSt0Bv8QBXX2MF7jKU4IyjjJ45xg31sYKZuw7Xv9Gh6vvXO9QbBtbGNJ8Ert+AlTURkF
|
||||
jQX9g5e4ykGUcBm+FaDexx2MUQOYhIL2Lpj09oV9CvsQgPuePj+hP037BL6M6yRSdDZHWVOc
|
||||
BHcEv7FvyN8xxqmeynovA1Baf4UVvANhyn/Uq8E/Q57ssNufhvx1QZrDHfS9p9i3sQsnscdN
|
||||
owXWEQlOBXMYyI4j3EavqFUzpOYl4OTqUJ9+NzmkbXyb6Ryfumm7Wso4it2cYXL6K6PeBmcV
|
||||
8E5iEvxPDjv8CyVaxQfsIfbqGIlf17k6Bb/Ae0cnahfg6KuAAAAAElFTkSuQmCC
|
||||
item5.IMPP;X-SERVICE-TYPE=GoogleTalk:xmpp:google%20talk
|
||||
item6.IMPP;X-SERVICE-TYPE=AIM:aim:aim
|
||||
item7.IMPP;X-SERVICE-TYPE=Yahoo:ymsgr:yahoo
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
- no PHOTO data because the server may re-encode the image
|
|
@ -48,21 +48,6 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAA
|
||||
AAgAAAAAAAD//gAXQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q/9sAQwAFAwQEBAMFBAQEBQUFBgcM
|
||||
CAcHBwcPCwsJDBEPEhIRDxERExYcFxMUGhURERghGBodHR8fHxMXIiQiHiQcHh8e/9sAQwEF
|
||||
BQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e
|
||||
Hh4eHh4eHh4e/8AAEQgAFwAkAwEiAAIRAQMRAf/EABkAAQADAQEAAAAAAAAAAAAAAAAGBwgE
|
||||
Bf/EADIQAAECBQMCAwQLAAAAAAAAAAECBAADBQYRBxIhEzEUFSIIFjNBGCRHUVZ3lqXD0+P/
|
||||
xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMR
|
||||
AD8AuX6UehP45/aXv9MTPTLVKxNSvMPcqu+a+XdLxf1SfJ6fU37PioTnOxfbOMc/KIZ7U/2V
|
||||
fmTR/wCaKlu6+blu/Ui72zxWtUmmUOrTaWwkWDT09FPR4K587OVrUfVsIwElPPPAbAjxr2um
|
||||
hWXbDu5rmfeApLPZ4hx0lzNm9aUJ9KAVHKlJHAPf7ozPLqWt9y6Z0EPGmoLNjTq48a1iaybJ
|
||||
YV52yEtCms5KJmAT61JXtJyUdyQTEc1WlMql7N1/oZ6jagVZVFfUyZPpFy5lvWcxU7Z03BUk
|
||||
GZLWJqVhPYLkIIPBEBtSEUyNAsjI1q1m/VP+UICwL/sqlXp7v+aOHsnyGttq218MtKd8+Ru2
|
||||
JXuScoO45Awe2CIi96aKW1cVyubkYVy6rTqz0J8a5t2qqZl0UjAMwYKScfPAJ+cIQHHP0Dth
|
||||
VFaMWt0XwxetnM50Ks2rsxL6ZMnJlJmb5hBBBEiVxjA28dznqo+hdksbQuS3Hs6tVtNzdM1Z
|
||||
/VH5nO3Bl/CJmYHKDynjv3zCEB5rLQNo0bIbydWNWxKljbLQLoWkISOAkBKAABCEID//2Q==
|
||||
END:VCARD
|
||||
|
||||
BEGIN:VCARD
|
||||
|
@ -115,21 +100,6 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAA
|
||||
AAgAAAAAAAD//gAXQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q/9sAQwAFAwQEBAMFBAQEBQUFBgcM
|
||||
CAcHBwcPCwsJDBEPEhIRDxERExYcFxMUGhURERghGBodHR8fHxMXIiQiHiQcHh8e/9sAQwEF
|
||||
BQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e
|
||||
Hh4eHh4eHh4e/8AAEQgAFwAkAwEiAAIRAQMRAf/EABkAAQADAQEAAAAAAAAAAAAAAAAGBwgE
|
||||
Bf/EADIQAAECBQMCAwQLAAAAAAAAAAECBAADBQYRBxIhEzEUFSIIFjNBGCRHUVZ3lqXD0+P/
|
||||
xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMR
|
||||
AD8AuX6UehP45/aXv9MTPTLVKxNSvMPcqu+a+XdLxf1SfJ6fU37PioTnOxfbOMc/KIZ7U/2V
|
||||
fmTR/wCaKlu6+blu/Ui72zxWtUmmUOrTaWwkWDT09FPR4K587OVrUfVsIwElPPPAbAjxr2um
|
||||
hWXbDu5rmfeApLPZ4hx0lzNm9aUJ9KAVHKlJHAPf7ozPLqWt9y6Z0EPGmoLNjTq48a1iaybJ
|
||||
YV52yEtCms5KJmAT61JXtJyUdyQTEc1WlMql7N1/oZ6jagVZVFfUyZPpFy5lvWcxU7Z03BUk
|
||||
GZLWJqVhPYLkIIPBEBtSEUyNAsjI1q1m/VP+UICwL/sqlXp7v+aOHsnyGttq218MtKd8+Ru2
|
||||
JXuScoO45Awe2CIi96aKW1cVyubkYVy6rTqz0J8a5t2qqZl0UjAMwYKScfPAJ+cIQHHP0Dth
|
||||
VFaMWt0XwxetnM50Ks2rsxL6ZMnJlJmb5hBBBEiVxjA28dznqo+hdksbQuS3Hs6tVtNzdM1Z
|
||||
/VH5nO3Bl/CJmYHKDynjv3zCEB5rLQNo0bIbydWNWxKljbLQLoWkISOAkBKAABCEID//2Q==
|
||||
END:VCARD
|
||||
|
||||
BEGIN:VCARD
|
||||
|
@ -182,20 +152,5 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAA
|
||||
AAgAAAAAAAD//gAXQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q/9sAQwAFAwQEBAMFBAQEBQUFBgcM
|
||||
CAcHBwcPCwsJDBEPEhIRDxERExYcFxMUGhURERghGBodHR8fHxMXIiQiHiQcHh8e/9sAQwEF
|
||||
BQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e
|
||||
Hh4eHh4eHh4e/8AAEQgAFwAkAwEiAAIRAQMRAf/EABkAAQADAQEAAAAAAAAAAAAAAAAGBwgE
|
||||
Bf/EADIQAAECBQMCAwQLAAAAAAAAAAECBAADBQYRBxIhEzEUFSIIFjNBGCRHUVZ3lqXD0+P/
|
||||
xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMR
|
||||
AD8AuX6UehP45/aXv9MTPTLVKxNSvMPcqu+a+XdLxf1SfJ6fU37PioTnOxfbOMc/KIZ7U/2V
|
||||
fmTR/wCaKlu6+blu/Ui72zxWtUmmUOrTaWwkWDT09FPR4K587OVrUfVsIwElPPPAbAjxr2um
|
||||
hWXbDu5rmfeApLPZ4hx0lzNm9aUJ9KAVHKlJHAPf7ozPLqWt9y6Z0EPGmoLNjTq48a1iaybJ
|
||||
YV52yEtCms5KJmAT61JXtJyUdyQTEc1WlMql7N1/oZ6jagVZVFfUyZPpFy5lvWcxU7Z03BUk
|
||||
GZLWJqVhPYLkIIPBEBtSEUyNAsjI1q1m/VP+UICwL/sqlXp7v+aOHsnyGttq218MtKd8+Ru2
|
||||
JXuScoO45Awe2CIi96aKW1cVyubkYVy6rTqz0J8a5t2qqZl0UjAMwYKScfPAJ+cIQHHP0Dth
|
||||
VFaMWt0XwxetnM50Ks2rsxL6ZMnJlJmb5hBBBEiVxjA28dznqo+hdksbQuS3Hs6tVtNzdM1Z
|
||||
/VH5nO3Bl/CJmYHKDynjv3zCEB5rLQNo0bIbydWNWxKljbLQLoWkISOAkBKAABCEID//2Q==
|
||||
END:VCARD
|
||||
|
||||
|
|
|
@ -49,22 +49,6 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=B:/9j/4AAQSkZJRgABAQEASABIAAD/4QBgRXhpZgAASUkqAAgAAAACADEBAg
|
||||
AHAAAAJgAAAGmHBAABAAAALgAAAAAAAABHb29nbGUAAAMAAJAHAAQAAAAwMjIwAqAEAAEAAAAkA
|
||||
AAAA6AEAAEAAAAXAAAAAAAAAP/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8R
|
||||
ERMWHBcTFBoVEREYIRgaHR0fHx8TFyIkIh4kHB4fHv/bAEMBBQUFBwYHDggIDh4UERQeHh4eHh4
|
||||
eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHv/AABEIABcAJAMBIg
|
||||
ACEQEDEQH/xAAZAAEAAwEBAAAAAAAAAAAAAAAABgcIBAX/xAAyEAABAgUDAgMECwAAAAAAAAABA
|
||||
gQAAwUGEQcSIRMxFBUiCBYzQRgkR1FWd5alw9Pj/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQR
|
||||
AQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/ALl+lHoT+Of2l7/TEz0y1SsTUrzD3Krvmvl
|
||||
3S8X9Unyen1N+z4qE5zsX2zjHPyiGe1P9lX5k0f8Amipbuvm5bv1Iu9s8VrVJplDq02lsJFg09P
|
||||
RT0eCufOzla1H1bCMBJTzzwGwI8a9rpoVl2w7ua5n3gKSz2eIcdJczZvWlCfSgFRypSRwD3+6Mz
|
||||
y6lrfcumdBDxpqCzY06uPGtYmsmyWFedshLQprOSiZgE+tSV7SclHckExHNVpTKpezdf6Geo2oF
|
||||
WVRX1MmT6RcuZb1nMVO2dNwVJBmS1ialYT2C5CCDwRAbUhFMjQLIyNatZv1T/lCAsC/7KpV6e7/
|
||||
mjh7J8hrbattfDLSnfPkbtiV7knKDuOQMHtgiIvemiltXFcrm5GFcuq06s9CfGubdqqmZdFIwDM
|
||||
GCknHzwCfnCEBxz9A7YVRWjFrdF8MXrZzOdCrNq7MS+mTJyZSZm+YQQQRIlcYwNvHc56qPoXZLG
|
||||
0Lktx7OrVbTc3TNWf1R+ZztwZfwiZmByg8p4798whAeay0DaNGyG8nVjVsSpY2y0C6FpCEjgJAS
|
||||
gAAQhCA//9k=
|
||||
TEL;TYPE=HOME:new remote tel 1
|
||||
TEL;X-ABLabel=new-remote-tel-label:new remote tel 2
|
||||
EMAIL;X-ABLabel=new-remote-email-label:new remote email 1
|
||||
|
@ -137,21 +121,6 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAA
|
||||
AAgAAAAAAAD//gAXQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q/9sAQwAFAwQEBAMFBAQEBQUFBgcM
|
||||
CAcHBwcPCwsJDBEPEhIRDxERExYcFxMUGhURERghGBodHR8fHxMXIiQiHiQcHh8e/9sAQwEF
|
||||
BQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e
|
||||
Hh4eHh4eHh4e/8AAEQgAFwAkAwEiAAIRAQMRAf/EABkAAQADAQEAAAAAAAAAAAAAAAAGBwgE
|
||||
Bf/EADIQAAECBQMCAwQLAAAAAAAAAAECBAADBQYRBxIhEzEUFSIIFjNBGCRHUVZ3lqXD0+P/
|
||||
xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMR
|
||||
AD8AuX6UehP45/aXv9MTPTLVKxNSvMPcqu+a+XdLxf1SfJ6fU37PioTnOxfbOMc/KIZ7U/2V
|
||||
fmTR/wCaKlu6+blu/Ui72zxWtUmmUOrTaWwkWDT09FPR4K587OVrUfVsIwElPPPAbAjxr2um
|
||||
hWXbDu5rmfeApLPZ4hx0lzNm9aUJ9KAVHKlJHAPf7ozPLqWt9y6Z0EPGmoLNjTq48a1iaybJ
|
||||
YV52yEtCms5KJmAT61JXtJyUdyQTEc1WlMql7N1/oZ6jagVZVFfUyZPpFy5lvWcxU7Z03BUk
|
||||
GZLWJqVhPYLkIIPBEBtSEUyNAsjI1q1m/VP+UICwL/sqlXp7v+aOHsnyGttq218MtKd8+Ru2
|
||||
JXuScoO45Awe2CIi96aKW1cVyubkYVy6rTqz0J8a5t2qqZl0UjAMwYKScfPAJ+cIQHHP0Dth
|
||||
VFaMWt0XwxetnM50Ks2rsxL6ZMnJlJmb5hBBBEiVxjA28dznqo+hdksbQuS3Hs6tVtNzdM1Z
|
||||
/VH5nO3Bl/CJmYHKDynjv3zCEB5rLQNo0bIbydWNWxKljbLQLoWkISOAkBKAABCEID//2Q==
|
||||
TEL;TYPE=HOME:new remote tel 1
|
||||
TEL;X-ABLabel=new-remote-tel-label:new remote tel 2
|
||||
EMAIL;X-ABLabel=new-remote-email-label:new remote email 1
|
||||
|
@ -223,20 +192,5 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAA
|
||||
AAgAAAAAAAD//gAXQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q/9sAQwAFAwQEBAMFBAQEBQUFBgcM
|
||||
CAcHBwcPCwsJDBEPEhIRDxERExYcFxMUGhURERghGBodHR8fHxMXIiQiHiQcHh8e/9sAQwEF
|
||||
BQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e
|
||||
Hh4eHh4eHh4e/8AAEQgAFwAkAwEiAAIRAQMRAf/EABkAAQADAQEAAAAAAAAAAAAAAAAGBwgE
|
||||
Bf/EADIQAAECBQMCAwQLAAAAAAAAAAECBAADBQYRBxIhEzEUFSIIFjNBGCRHUVZ3lqXD0+P/
|
||||
xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMR
|
||||
AD8AuX6UehP45/aXv9MTPTLVKxNSvMPcqu+a+XdLxf1SfJ6fU37PioTnOxfbOMc/KIZ7U/2V
|
||||
fmTR/wCaKlu6+blu/Ui72zxWtUmmUOrTaWwkWDT09FPR4K587OVrUfVsIwElPPPAbAjxr2um
|
||||
hWXbDu5rmfeApLPZ4hx0lzNm9aUJ9KAVHKlJHAPf7ozPLqWt9y6Z0EPGmoLNjTq48a1iaybJ
|
||||
YV52yEtCms5KJmAT61JXtJyUdyQTEc1WlMql7N1/oZ6jagVZVFfUyZPpFy5lvWcxU7Z03BUk
|
||||
GZLWJqVhPYLkIIPBEBtSEUyNAsjI1q1m/VP+UICwL/sqlXp7v+aOHsnyGttq218MtKd8+Ru2
|
||||
JXuScoO45Awe2CIi96aKW1cVyubkYVy6rTqz0J8a5t2qqZl0UjAMwYKScfPAJ+cIQHHP0Dth
|
||||
VFaMWt0XwxetnM50Ks2rsxL6ZMnJlJmb5hBBBEiVxjA28dznqo+hdksbQuS3Hs6tVtNzdM1Z
|
||||
/VH5nO3Bl/CJmYHKDynjv3zCEB5rLQNo0bIbydWNWxKljbLQLoWkISOAkBKAABCEID//2Q==
|
||||
BDAY:2006-01-01
|
||||
END:VCARD
|
||||
|
|
|
@ -27,22 +27,6 @@ EMAIL;TYPE=HOME:john.doe@home.priv
|
|||
EMAIL:john.doe@other.world
|
||||
EMAIL:john.doe@yet.another.world
|
||||
NOTE:This is a test case which uses almost all Evolution fields.
|
||||
PHOTO;ENCODING=B:/9j/4AAQSkZJRgABAQEASABIAAD/4QBgRXhpZgAASUkqAAgAAAACADEBAg
|
||||
AHAAAAJgAAAGmHBAABAAAALgAAAAAAAABHb29nbGUAAAMAAJAHAAQAAAAwMjIwAqAEAAEAAAAkA
|
||||
AAAA6AEAAEAAAAXAAAAAAAAAP/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8R
|
||||
ERMWHBcTFBoVEREYIRgaHR0fHx8TFyIkIh4kHB4fHv/bAEMBBQUFBwYHDggIDh4UERQeHh4eHh4
|
||||
eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHv/AABEIABcAJAMBIg
|
||||
ACEQEDEQH/xAAZAAEAAwEBAAAAAAAAAAAAAAAABgcIBAX/xAAyEAABAgUDAgMECwAAAAAAAAABA
|
||||
gQAAwUGEQcSIRMxFBUiCBYzQRgkR1FWd5alw9Pj/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQR
|
||||
AQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/ALl+lHoT+Of2l7/TEz0y1SsTUrzD3Krvmvl
|
||||
3S8X9Unyen1N+z4qE5zsX2zjHPyiGe1P9lX5k0f8Amipbuvm5bv1Iu9s8VrVJplDq02lsJFg09P
|
||||
RT0eCufOzla1H1bCMBJTzzwGwI8a9rpoVl2w7ua5n3gKSz2eIcdJczZvWlCfSgFRypSRwD3+6Mz
|
||||
y6lrfcumdBDxpqCzY06uPGtYmsmyWFedshLQprOSiZgE+tSV7SclHckExHNVpTKpezdf6Geo2oF
|
||||
WVRX1MmT6RcuZb1nMVO2dNwVJBmS1ialYT2C5CCDwRAbUhFMjQLIyNatZv1T/lCAsC/7KpV6e7/
|
||||
mjh7J8hrbattfDLSnfPkbtiV7knKDuOQMHtgiIvemiltXFcrm5GFcuq06s9CfGubdqqmZdFIwDM
|
||||
GCknHzwCfnCEBxz9A7YVRWjFrdF8MXrZzOdCrNq7MS+mTJyZSZm+YQQQRIlcYwNvHc56qPoXZLG
|
||||
0Lktx7OrVbTc3TNWf1R+ZztwZfwiZmByg8p4798whAeay0DaNGyG8nVjVsSpY2y0C6FpCEjgJAS
|
||||
gAAQhCA//9k=
|
||||
item2.IMPP;X-SERVICE-TYPE=AIM:aim:AIM%20JOHN
|
||||
item3.IMPP;X-SERVICE-TYPE=Gadugadu:x-apple:GADUGADU%20DOE
|
||||
item4.IMPP;X-SERVICE-TYPE=Groupwise:x-apple:GROUPWISE%20DOE
|
||||
|
@ -140,22 +124,6 @@ EMAIL:john.doe@other.world
|
|||
EMAIL:john.doe@yet.another.world
|
||||
EMAIL:new local email
|
||||
NOTE:This is a test case which uses almost all Evolution fields.
|
||||
PHOTO;ENCODING=B:/9j/4AAQSkZJRgABAQEASABIAAD/4QBgRXhpZgAASUkqAAgAAAACADEBAg
|
||||
AHAAAAJgAAAGmHBAABAAAALgAAAAAAAABHb29nbGUAAAMAAJAHAAQAAAAwMjIwAqAEAAEAAAAkA
|
||||
AAAA6AEAAEAAAAXAAAAAAAAAP/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8R
|
||||
ERMWHBcTFBoVEREYIRgaHR0fHx8TFyIkIh4kHB4fHv/bAEMBBQUFBwYHDggIDh4UERQeHh4eHh4
|
||||
eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHv/AABEIABcAJAMBIg
|
||||
ACEQEDEQH/xAAZAAEAAwEBAAAAAAAAAAAAAAAABgcIBAX/xAAyEAABAgUDAgMECwAAAAAAAAABA
|
||||
gQAAwUGEQcSIRMxFBUiCBYzQRgkR1FWd5alw9Pj/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQR
|
||||
AQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/ALl+lHoT+Of2l7/TEz0y1SsTUrzD3Krvmvl
|
||||
3S8X9Unyen1N+z4qE5zsX2zjHPyiGe1P9lX5k0f8Amipbuvm5bv1Iu9s8VrVJplDq02lsJFg09P
|
||||
RT0eCufOzla1H1bCMBJTzzwGwI8a9rpoVl2w7ua5n3gKSz2eIcdJczZvWlCfSgFRypSRwD3+6Mz
|
||||
y6lrfcumdBDxpqCzY06uPGtYmsmyWFedshLQprOSiZgE+tSV7SclHckExHNVpTKpezdf6Geo2oF
|
||||
WVRX1MmT6RcuZb1nMVO2dNwVJBmS1ialYT2C5CCDwRAbUhFMjQLIyNatZv1T/lCAsC/7KpV6e7/
|
||||
mjh7J8hrbattfDLSnfPkbtiV7knKDuOQMHtgiIvemiltXFcrm5GFcuq06s9CfGubdqqmZdFIwDM
|
||||
GCknHzwCfnCEBxz9A7YVRWjFrdF8MXrZzOdCrNq7MS+mTJyZSZm+YQQQRIlcYwNvHc56qPoXZLG
|
||||
0Lktx7OrVbTc3TNWf1R+ZztwZfwiZmByg8p4798whAeay0DaNGyG8nVjVsSpY2y0C6FpCEjgJAS
|
||||
gAAQhCA//9k=
|
||||
item2.IMPP;X-SERVICE-TYPE=AIM:aim:AIM%20JOHN
|
||||
item3.IMPP;X-SERVICE-TYPE=Gadugadu:x-apple:GADUGADU%20DOE
|
||||
item4.IMPP;X-SERVICE-TYPE=Groupwise:x-apple:GROUPWISE%20DOE
|
||||
|
@ -252,22 +220,6 @@ EMAIL:john.doe@other.world
|
|||
EMAIL:john.doe@yet.another.world
|
||||
EMAIL:new local email
|
||||
NOTE:This is a test case which uses almost all Evolution fields.
|
||||
PHOTO;ENCODING=B:/9j/4AAQSkZJRgABAQEASABIAAD/4QBgRXhpZgAASUkqAAgAAAACADEBAg
|
||||
AHAAAAJgAAAGmHBAABAAAALgAAAAAAAABHb29nbGUAAAMAAJAHAAQAAAAwMjIwAqAEAAEAAAAkA
|
||||
AAAA6AEAAEAAAAXAAAAAAAAAP/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8R
|
||||
ERMWHBcTFBoVEREYIRgaHR0fHx8TFyIkIh4kHB4fHv/bAEMBBQUFBwYHDggIDh4UERQeHh4eHh4
|
||||
eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHv/AABEIABcAJAMBIg
|
||||
ACEQEDEQH/xAAZAAEAAwEBAAAAAAAAAAAAAAAABgcIBAX/xAAyEAABAgUDAgMECwAAAAAAAAABA
|
||||
gQAAwUGEQcSIRMxFBUiCBYzQRgkR1FWd5alw9Pj/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQR
|
||||
AQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/ALl+lHoT+Of2l7/TEz0y1SsTUrzD3Krvmvl
|
||||
3S8X9Unyen1N+z4qE5zsX2zjHPyiGe1P9lX5k0f8Amipbuvm5bv1Iu9s8VrVJplDq02lsJFg09P
|
||||
RT0eCufOzla1H1bCMBJTzzwGwI8a9rpoVl2w7ua5n3gKSz2eIcdJczZvWlCfSgFRypSRwD3+6Mz
|
||||
y6lrfcumdBDxpqCzY06uPGtYmsmyWFedshLQprOSiZgE+tSV7SclHckExHNVpTKpezdf6Geo2oF
|
||||
WVRX1MmT6RcuZb1nMVO2dNwVJBmS1ialYT2C5CCDwRAbUhFMjQLIyNatZv1T/lCAsC/7KpV6e7/
|
||||
mjh7J8hrbattfDLSnfPkbtiV7knKDuOQMHtgiIvemiltXFcrm5GFcuq06s9CfGubdqqmZdFIwDM
|
||||
GCknHzwCfnCEBxz9A7YVRWjFrdF8MXrZzOdCrNq7MS+mTJyZSZm+YQQQRIlcYwNvHc56qPoXZLG
|
||||
0Lktx7OrVbTc3TNWf1R+ZztwZfwiZmByg8p4798whAeay0DaNGyG8nVjVsSpY2y0C6FpCEjgJAS
|
||||
gAAQhCA//9k=
|
||||
item2.IMPP;X-SERVICE-TYPE=AIM:aim:AIM%20JOHN
|
||||
item3.IMPP;X-SERVICE-TYPE=Gadugadu:x-apple:GADUGADU%20DOE
|
||||
item4.IMPP;X-SERVICE-TYPE=Groupwise:x-apple:GROUPWISE%20DOE
|
||||
|
|
|
@ -2,4 +2,4 @@ Because the remote side wins and replaces values for common
|
|||
properties, the X-EVOLUTION-UI-SLOT gets lost when receiving a remote
|
||||
update or having the remote side win an update conflict.
|
||||
|
||||
local-synced takes that into account.
|
||||
local-synced takes that into account. - no PHOTO data because the server may re-encode the image
|
||||
|
|
|
@ -48,21 +48,6 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAA
|
||||
AAgAAAAAAAD//gAXQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q/9sAQwAFAwQEBAMFBAQEBQUFBgcM
|
||||
CAcHBwcPCwsJDBEPEhIRDxERExYcFxMUGhURERghGBodHR8fHxMXIiQiHiQcHh8e/9sAQwEF
|
||||
BQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e
|
||||
Hh4eHh4eHh4e/8AAEQgAFwAkAwEiAAIRAQMRAf/EABkAAQADAQEAAAAAAAAAAAAAAAAGBwgE
|
||||
Bf/EADIQAAECBQMCAwQLAAAAAAAAAAECBAADBQYRBxIhEzEUFSIIFjNBGCRHUVZ3lqXD0+P/
|
||||
xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMR
|
||||
AD8AuX6UehP45/aXv9MTPTLVKxNSvMPcqu+a+XdLxf1SfJ6fU37PioTnOxfbOMc/KIZ7U/2V
|
||||
fmTR/wCaKlu6+blu/Ui72zxWtUmmUOrTaWwkWDT09FPR4K587OVrUfVsIwElPPPAbAjxr2um
|
||||
hWXbDu5rmfeApLPZ4hx0lzNm9aUJ9KAVHKlJHAPf7ozPLqWt9y6Z0EPGmoLNjTq48a1iaybJ
|
||||
YV52yEtCms5KJmAT61JXtJyUdyQTEc1WlMql7N1/oZ6jagVZVFfUyZPpFy5lvWcxU7Z03BUk
|
||||
GZLWJqVhPYLkIIPBEBtSEUyNAsjI1q1m/VP+UICwL/sqlXp7v+aOHsnyGttq218MtKd8+Ru2
|
||||
JXuScoO45Awe2CIi96aKW1cVyubkYVy6rTqz0J8a5t2qqZl0UjAMwYKScfPAJ+cIQHHP0Dth
|
||||
VFaMWt0XwxetnM50Ks2rsxL6ZMnJlJmb5hBBBEiVxjA28dznqo+hdksbQuS3Hs6tVtNzdM1Z
|
||||
/VH5nO3Bl/CJmYHKDynjv3zCEB5rLQNo0bIbydWNWxKljbLQLoWkISOAkBKAABCEID//2Q==
|
||||
END:VCARD
|
||||
|
||||
BEGIN:VCARD
|
||||
|
@ -115,21 +100,6 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAA
|
||||
AAgAAAAAAAD//gAXQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q/9sAQwAFAwQEBAMFBAQEBQUFBgcM
|
||||
CAcHBwcPCwsJDBEPEhIRDxERExYcFxMUGhURERghGBodHR8fHxMXIiQiHiQcHh8e/9sAQwEF
|
||||
BQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e
|
||||
Hh4eHh4eHh4e/8AAEQgAFwAkAwEiAAIRAQMRAf/EABkAAQADAQEAAAAAAAAAAAAAAAAGBwgE
|
||||
Bf/EADIQAAECBQMCAwQLAAAAAAAAAAECBAADBQYRBxIhEzEUFSIIFjNBGCRHUVZ3lqXD0+P/
|
||||
xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMR
|
||||
AD8AuX6UehP45/aXv9MTPTLVKxNSvMPcqu+a+XdLxf1SfJ6fU37PioTnOxfbOMc/KIZ7U/2V
|
||||
fmTR/wCaKlu6+blu/Ui72zxWtUmmUOrTaWwkWDT09FPR4K587OVrUfVsIwElPPPAbAjxr2um
|
||||
hWXbDu5rmfeApLPZ4hx0lzNm9aUJ9KAVHKlJHAPf7ozPLqWt9y6Z0EPGmoLNjTq48a1iaybJ
|
||||
YV52yEtCms5KJmAT61JXtJyUdyQTEc1WlMql7N1/oZ6jagVZVFfUyZPpFy5lvWcxU7Z03BUk
|
||||
GZLWJqVhPYLkIIPBEBtSEUyNAsjI1q1m/VP+UICwL/sqlXp7v+aOHsnyGttq218MtKd8+Ru2
|
||||
JXuScoO45Awe2CIi96aKW1cVyubkYVy6rTqz0J8a5t2qqZl0UjAMwYKScfPAJ+cIQHHP0Dth
|
||||
VFaMWt0XwxetnM50Ks2rsxL6ZMnJlJmb5hBBBEiVxjA28dznqo+hdksbQuS3Hs6tVtNzdM1Z
|
||||
/VH5nO3Bl/CJmYHKDynjv3zCEB5rLQNo0bIbydWNWxKljbLQLoWkISOAkBKAABCEID//2Q==
|
||||
END:VCARD
|
||||
|
||||
BEGIN:VCARD
|
||||
|
@ -182,20 +152,5 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAA
|
||||
AAgAAAAAAAD//gAXQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q/9sAQwAFAwQEBAMFBAQEBQUFBgcM
|
||||
CAcHBwcPCwsJDBEPEhIRDxERExYcFxMUGhURERghGBodHR8fHxMXIiQiHiQcHh8e/9sAQwEF
|
||||
BQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e
|
||||
Hh4eHh4eHh4e/8AAEQgAFwAkAwEiAAIRAQMRAf/EABkAAQADAQEAAAAAAAAAAAAAAAAGBwgE
|
||||
Bf/EADIQAAECBQMCAwQLAAAAAAAAAAECBAADBQYRBxIhEzEUFSIIFjNBGCRHUVZ3lqXD0+P/
|
||||
xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMR
|
||||
AD8AuX6UehP45/aXv9MTPTLVKxNSvMPcqu+a+XdLxf1SfJ6fU37PioTnOxfbOMc/KIZ7U/2V
|
||||
fmTR/wCaKlu6+blu/Ui72zxWtUmmUOrTaWwkWDT09FPR4K587OVrUfVsIwElPPPAbAjxr2um
|
||||
hWXbDu5rmfeApLPZ4hx0lzNm9aUJ9KAVHKlJHAPf7ozPLqWt9y6Z0EPGmoLNjTq48a1iaybJ
|
||||
YV52yEtCms5KJmAT61JXtJyUdyQTEc1WlMql7N1/oZ6jagVZVFfUyZPpFy5lvWcxU7Z03BUk
|
||||
GZLWJqVhPYLkIIPBEBtSEUyNAsjI1q1m/VP+UICwL/sqlXp7v+aOHsnyGttq218MtKd8+Ru2
|
||||
JXuScoO45Awe2CIi96aKW1cVyubkYVy6rTqz0J8a5t2qqZl0UjAMwYKScfPAJ+cIQHHP0Dth
|
||||
VFaMWt0XwxetnM50Ks2rsxL6ZMnJlJmb5hBBBEiVxjA28dznqo+hdksbQuS3Hs6tVtNzdM1Z
|
||||
/VH5nO3Bl/CJmYHKDynjv3zCEB5rLQNo0bIbydWNWxKljbLQLoWkISOAkBKAABCEID//2Q==
|
||||
END:VCARD
|
||||
|
||||
|
|
|
@ -49,22 +49,6 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=B:/9j/4AAQSkZJRgABAQEASABIAAD/4QBgRXhpZgAASUkqAAgAAAACADEBAg
|
||||
AHAAAAJgAAAGmHBAABAAAALgAAAAAAAABHb29nbGUAAAMAAJAHAAQAAAAwMjIwAqAEAAEAAAAkA
|
||||
AAAA6AEAAEAAAAXAAAAAAAAAP/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8R
|
||||
ERMWHBcTFBoVEREYIRgaHR0fHx8TFyIkIh4kHB4fHv/bAEMBBQUFBwYHDggIDh4UERQeHh4eHh4
|
||||
eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHv/AABEIABcAJAMBIg
|
||||
ACEQEDEQH/xAAZAAEAAwEBAAAAAAAAAAAAAAAABgcIBAX/xAAyEAABAgUDAgMECwAAAAAAAAABA
|
||||
gQAAwUGEQcSIRMxFBUiCBYzQRgkR1FWd5alw9Pj/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQR
|
||||
AQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/ALl+lHoT+Of2l7/TEz0y1SsTUrzD3Krvmvl
|
||||
3S8X9Unyen1N+z4qE5zsX2zjHPyiGe1P9lX5k0f8Amipbuvm5bv1Iu9s8VrVJplDq02lsJFg09P
|
||||
RT0eCufOzla1H1bCMBJTzzwGwI8a9rpoVl2w7ua5n3gKSz2eIcdJczZvWlCfSgFRypSRwD3+6Mz
|
||||
y6lrfcumdBDxpqCzY06uPGtYmsmyWFedshLQprOSiZgE+tSV7SclHckExHNVpTKpezdf6Geo2oF
|
||||
WVRX1MmT6RcuZb1nMVO2dNwVJBmS1ialYT2C5CCDwRAbUhFMjQLIyNatZv1T/lCAsC/7KpV6e7/
|
||||
mjh7J8hrbattfDLSnfPkbtiV7knKDuOQMHtgiIvemiltXFcrm5GFcuq06s9CfGubdqqmZdFIwDM
|
||||
GCknHzwCfnCEBxz9A7YVRWjFrdF8MXrZzOdCrNq7MS+mTJyZSZm+YQQQRIlcYwNvHc56qPoXZLG
|
||||
0Lktx7OrVbTc3TNWf1R+ZztwZfwiZmByg8p4798whAeay0DaNGyG8nVjVsSpY2y0C6FpCEjgJAS
|
||||
gAAQhCA//9k=
|
||||
TEL;TYPE=HOME:new remote tel 1
|
||||
TEL;X-ABLabel=new-remote-tel-label:new remote tel 2
|
||||
EMAIL;X-ABLabel=new-remote-email-label:new remote email 1
|
||||
|
@ -137,22 +121,6 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=B:/9j/4AAQSkZJRgABAQEASABIAAD/4QBgRXhpZgAASUkqAAgAAAACADEBAg
|
||||
AHAAAAJgAAAGmHBAABAAAALgAAAAAAAABHb29nbGUAAAMAAJAHAAQAAAAwMjIwAqAEAAEAAAAkA
|
||||
AAAA6AEAAEAAAAXAAAAAAAAAP/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8R
|
||||
ERMWHBcTFBoVEREYIRgaHR0fHx8TFyIkIh4kHB4fHv/bAEMBBQUFBwYHDggIDh4UERQeHh4eHh4
|
||||
eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHv/AABEIABcAJAMBIg
|
||||
ACEQEDEQH/xAAZAAEAAwEBAAAAAAAAAAAAAAAABgcIBAX/xAAyEAABAgUDAgMECwAAAAAAAAABA
|
||||
gQAAwUGEQcSIRMxFBUiCBYzQRgkR1FWd5alw9Pj/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQR
|
||||
AQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/ALl+lHoT+Of2l7/TEz0y1SsTUrzD3Krvmvl
|
||||
3S8X9Unyen1N+z4qE5zsX2zjHPyiGe1P9lX5k0f8Amipbuvm5bv1Iu9s8VrVJplDq02lsJFg09P
|
||||
RT0eCufOzla1H1bCMBJTzzwGwI8a9rpoVl2w7ua5n3gKSz2eIcdJczZvWlCfSgFRypSRwD3+6Mz
|
||||
y6lrfcumdBDxpqCzY06uPGtYmsmyWFedshLQprOSiZgE+tSV7SclHckExHNVpTKpezdf6Geo2oF
|
||||
WVRX1MmT6RcuZb1nMVO2dNwVJBmS1ialYT2C5CCDwRAbUhFMjQLIyNatZv1T/lCAsC/7KpV6e7/
|
||||
mjh7J8hrbattfDLSnfPkbtiV7knKDuOQMHtgiIvemiltXFcrm5GFcuq06s9CfGubdqqmZdFIwDM
|
||||
GCknHzwCfnCEBxz9A7YVRWjFrdF8MXrZzOdCrNq7MS+mTJyZSZm+YQQQRIlcYwNvHc56qPoXZLG
|
||||
0Lktx7OrVbTc3TNWf1R+ZztwZfwiZmByg8p4798whAeay0DaNGyG8nVjVsSpY2y0C6FpCEjgJAS
|
||||
gAAQhCA//9k=
|
||||
TEL;TYPE=HOME:new remote tel 1
|
||||
TEL;X-ABLabel=new-remote-tel-label:new remote tel 2
|
||||
EMAIL;X-ABLabel=new-remote-email-label:new remote email 1
|
||||
|
@ -224,21 +192,6 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAA
|
||||
AAgAAAAAAAD//gAXQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q/9sAQwAFAwQEBAMFBAQEBQUFBgcM
|
||||
CAcHBwcPCwsJDBEPEhIRDxERExYcFxMUGhURERghGBodHR8fHxMXIiQiHiQcHh8e/9sAQwEF
|
||||
BQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e
|
||||
Hh4eHh4eHh4e/8AAEQgAFwAkAwEiAAIRAQMRAf/EABkAAQADAQEAAAAAAAAAAAAAAAAGBwgE
|
||||
Bf/EADIQAAECBQMCAwQLAAAAAAAAAAECBAADBQYRBxIhEzEUFSIIFjNBGCRHUVZ3lqXD0+P/
|
||||
xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMR
|
||||
AD8AuX6UehP45/aXv9MTPTLVKxNSvMPcqu+a+XdLxf1SfJ6fU37PioTnOxfbOMc/KIZ7U/2V
|
||||
fmTR/wCaKlu6+blu/Ui72zxWtUmmUOrTaWwkWDT09FPR4K587OVrUfVsIwElPPPAbAjxr2um
|
||||
hWXbDu5rmfeApLPZ4hx0lzNm9aUJ9KAVHKlJHAPf7ozPLqWt9y6Z0EPGmoLNjTq48a1iaybJ
|
||||
YV52yEtCms5KJmAT61JXtJyUdyQTEc1WlMql7N1/oZ6jagVZVFfUyZPpFy5lvWcxU7Z03BUk
|
||||
GZLWJqVhPYLkIIPBEBtSEUyNAsjI1q1m/VP+UICwL/sqlXp7v+aOHsnyGttq218MtKd8+Ru2
|
||||
JXuScoO45Awe2CIi96aKW1cVyubkYVy6rTqz0J8a5t2qqZl0UjAMwYKScfPAJ+cIQHHP0Dth
|
||||
VFaMWt0XwxetnM50Ks2rsxL6ZMnJlJmb5hBBBEiVxjA28dznqo+hdksbQuS3Hs6tVtNzdM1Z
|
||||
/VH5nO3Bl/CJmYHKDynjv3zCEB5rLQNo0bIbydWNWxKljbLQLoWkISOAkBKAABCEID//2Q==
|
||||
BDAY:2006-01-01
|
||||
END:VCARD
|
||||
|
||||
|
|
|
@ -27,22 +27,6 @@ EMAIL;TYPE=HOME:john.doe@home.priv
|
|||
EMAIL:john.doe@other.world
|
||||
EMAIL:john.doe@yet.another.world
|
||||
NOTE:This is a test case which uses almost all Evolution fields.
|
||||
PHOTO;ENCODING=B:/9j/4AAQSkZJRgABAQEASABIAAD/4QBgRXhpZgAASUkqAAgAAAACADEBAg
|
||||
AHAAAAJgAAAGmHBAABAAAALgAAAAAAAABHb29nbGUAAAMAAJAHAAQAAAAwMjIwAqAEAAEAAAAkA
|
||||
AAAA6AEAAEAAAAXAAAAAAAAAP/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8R
|
||||
ERMWHBcTFBoVEREYIRgaHR0fHx8TFyIkIh4kHB4fHv/bAEMBBQUFBwYHDggIDh4UERQeHh4eHh4
|
||||
eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHv/AABEIABcAJAMBIg
|
||||
ACEQEDEQH/xAAZAAEAAwEBAAAAAAAAAAAAAAAABgcIBAX/xAAyEAABAgUDAgMECwAAAAAAAAABA
|
||||
gQAAwUGEQcSIRMxFBUiCBYzQRgkR1FWd5alw9Pj/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQR
|
||||
AQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/ALl+lHoT+Of2l7/TEz0y1SsTUrzD3Krvmvl
|
||||
3S8X9Unyen1N+z4qE5zsX2zjHPyiGe1P9lX5k0f8Amipbuvm5bv1Iu9s8VrVJplDq02lsJFg09P
|
||||
RT0eCufOzla1H1bCMBJTzzwGwI8a9rpoVl2w7ua5n3gKSz2eIcdJczZvWlCfSgFRypSRwD3+6Mz
|
||||
y6lrfcumdBDxpqCzY06uPGtYmsmyWFedshLQprOSiZgE+tSV7SclHckExHNVpTKpezdf6Geo2oF
|
||||
WVRX1MmT6RcuZb1nMVO2dNwVJBmS1ialYT2C5CCDwRAbUhFMjQLIyNatZv1T/lCAsC/7KpV6e7/
|
||||
mjh7J8hrbattfDLSnfPkbtiV7knKDuOQMHtgiIvemiltXFcrm5GFcuq06s9CfGubdqqmZdFIwDM
|
||||
GCknHzwCfnCEBxz9A7YVRWjFrdF8MXrZzOdCrNq7MS+mTJyZSZm+YQQQRIlcYwNvHc56qPoXZLG
|
||||
0Lktx7OrVbTc3TNWf1R+ZztwZfwiZmByg8p4798whAeay0DaNGyG8nVjVsSpY2y0C6FpCEjgJAS
|
||||
gAAQhCA//9k=
|
||||
item2.IMPP;X-SERVICE-TYPE=AIM:aim:AIM%20JOHN
|
||||
item3.IMPP;X-SERVICE-TYPE=Gadugadu:x-apple:GADUGADU%20DOE
|
||||
item4.IMPP;X-SERVICE-TYPE=Groupwise:x-apple:GROUPWISE%20DOE
|
||||
|
@ -140,22 +124,6 @@ EMAIL:john.doe@other.world
|
|||
EMAIL:john.doe@yet.another.world
|
||||
EMAIL:new local email
|
||||
NOTE:This is a test case which uses almost all Evolution fields.
|
||||
PHOTO;ENCODING=B:/9j/4AAQSkZJRgABAQEASABIAAD/4QBgRXhpZgAASUkqAAgAAAACADEBAg
|
||||
AHAAAAJgAAAGmHBAABAAAALgAAAAAAAABHb29nbGUAAAMAAJAHAAQAAAAwMjIwAqAEAAEAAAAkA
|
||||
AAAA6AEAAEAAAAXAAAAAAAAAP/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8R
|
||||
ERMWHBcTFBoVEREYIRgaHR0fHx8TFyIkIh4kHB4fHv/bAEMBBQUFBwYHDggIDh4UERQeHh4eHh4
|
||||
eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHv/AABEIABcAJAMBIg
|
||||
ACEQEDEQH/xAAZAAEAAwEBAAAAAAAAAAAAAAAABgcIBAX/xAAyEAABAgUDAgMECwAAAAAAAAABA
|
||||
gQAAwUGEQcSIRMxFBUiCBYzQRgkR1FWd5alw9Pj/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQR
|
||||
AQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/ALl+lHoT+Of2l7/TEz0y1SsTUrzD3Krvmvl
|
||||
3S8X9Unyen1N+z4qE5zsX2zjHPyiGe1P9lX5k0f8Amipbuvm5bv1Iu9s8VrVJplDq02lsJFg09P
|
||||
RT0eCufOzla1H1bCMBJTzzwGwI8a9rpoVl2w7ua5n3gKSz2eIcdJczZvWlCfSgFRypSRwD3+6Mz
|
||||
y6lrfcumdBDxpqCzY06uPGtYmsmyWFedshLQprOSiZgE+tSV7SclHckExHNVpTKpezdf6Geo2oF
|
||||
WVRX1MmT6RcuZb1nMVO2dNwVJBmS1ialYT2C5CCDwRAbUhFMjQLIyNatZv1T/lCAsC/7KpV6e7/
|
||||
mjh7J8hrbattfDLSnfPkbtiV7knKDuOQMHtgiIvemiltXFcrm5GFcuq06s9CfGubdqqmZdFIwDM
|
||||
GCknHzwCfnCEBxz9A7YVRWjFrdF8MXrZzOdCrNq7MS+mTJyZSZm+YQQQRIlcYwNvHc56qPoXZLG
|
||||
0Lktx7OrVbTc3TNWf1R+ZztwZfwiZmByg8p4798whAeay0DaNGyG8nVjVsSpY2y0C6FpCEjgJAS
|
||||
gAAQhCA//9k=
|
||||
item2.IMPP;X-SERVICE-TYPE=AIM:aim:AIM%20JOHN
|
||||
item3.IMPP;X-SERVICE-TYPE=Gadugadu:x-apple:GADUGADU%20DOE
|
||||
item4.IMPP;X-SERVICE-TYPE=Groupwise:x-apple:GROUPWISE%20DOE
|
||||
|
@ -252,22 +220,6 @@ EMAIL:john.doe@other.world
|
|||
EMAIL:john.doe@yet.another.world
|
||||
EMAIL:new local email
|
||||
NOTE:This is a test case which uses almost all Evolution fields.
|
||||
PHOTO;ENCODING=B:/9j/4AAQSkZJRgABAQEASABIAAD/4QBgRXhpZgAASUkqAAgAAAACADEBAg
|
||||
AHAAAAJgAAAGmHBAABAAAALgAAAAAAAABHb29nbGUAAAMAAJAHAAQAAAAwMjIwAqAEAAEAAAAkA
|
||||
AAAA6AEAAEAAAAXAAAAAAAAAP/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8R
|
||||
ERMWHBcTFBoVEREYIRgaHR0fHx8TFyIkIh4kHB4fHv/bAEMBBQUFBwYHDggIDh4UERQeHh4eHh4
|
||||
eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHv/AABEIABcAJAMBIg
|
||||
ACEQEDEQH/xAAZAAEAAwEBAAAAAAAAAAAAAAAABgcIBAX/xAAyEAABAgUDAgMECwAAAAAAAAABA
|
||||
gQAAwUGEQcSIRMxFBUiCBYzQRgkR1FWd5alw9Pj/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQR
|
||||
AQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/ALl+lHoT+Of2l7/TEz0y1SsTUrzD3Krvmvl
|
||||
3S8X9Unyen1N+z4qE5zsX2zjHPyiGe1P9lX5k0f8Amipbuvm5bv1Iu9s8VrVJplDq02lsJFg09P
|
||||
RT0eCufOzla1H1bCMBJTzzwGwI8a9rpoVl2w7ua5n3gKSz2eIcdJczZvWlCfSgFRypSRwD3+6Mz
|
||||
y6lrfcumdBDxpqCzY06uPGtYmsmyWFedshLQprOSiZgE+tSV7SclHckExHNVpTKpezdf6Geo2oF
|
||||
WVRX1MmT6RcuZb1nMVO2dNwVJBmS1ialYT2C5CCDwRAbUhFMjQLIyNatZv1T/lCAsC/7KpV6e7/
|
||||
mjh7J8hrbattfDLSnfPkbtiV7knKDuOQMHtgiIvemiltXFcrm5GFcuq06s9CfGubdqqmZdFIwDM
|
||||
GCknHzwCfnCEBxz9A7YVRWjFrdF8MXrZzOdCrNq7MS+mTJyZSZm+YQQQRIlcYwNvHc56qPoXZLG
|
||||
0Lktx7OrVbTc3TNWf1R+ZztwZfwiZmByg8p4798whAeay0DaNGyG8nVjVsSpY2y0C6FpCEjgJAS
|
||||
gAAQhCA//9k=
|
||||
item2.IMPP;X-SERVICE-TYPE=AIM:aim:AIM%20JOHN
|
||||
item3.IMPP;X-SERVICE-TYPE=Gadugadu:x-apple:GADUGADU%20DOE
|
||||
item4.IMPP;X-SERVICE-TYPE=Groupwise:x-apple:GROUPWISE%20DOE
|
||||
|
|
|
@ -4,3 +4,4 @@ The test data was adapted to cope with some bugs/limitations:
|
|||
and get lost.
|
||||
- ORG department and unit get merged.
|
||||
|
||||
- no PHOTO data because the server may re-encode the image
|
||||
|
|
|
@ -54,19 +54,4 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAA
|
||||
AAgAAAAAAAD//gAXQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q/9sAQwAFAwQEBAMFBAQEBQUFBgcM
|
||||
CAcHBwcPCwsJDBEPEhIRDxERExYcFxMUGhURERghGBodHR8fHxMXIiQiHiQcHh8e/9sAQwEF
|
||||
BQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e
|
||||
Hh4eHh4eHh4e/8AAEQgAFwAkAwEiAAIRAQMRAf/EABkAAQADAQEAAAAAAAAAAAAAAAAGBwgE
|
||||
Bf/EADIQAAECBQMCAwQLAAAAAAAAAAECBAADBQYRBxIhEzEUFSIIFjNBGCRHUVZ3lqXD0+P/
|
||||
xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMR
|
||||
AD8AuX6UehP45/aXv9MTPTLVKxNSvMPcqu+a+XdLxf1SfJ6fU37PioTnOxfbOMc/KIZ7U/2V
|
||||
fmTR/wCaKlu6+blu/Ui72zxWtUmmUOrTaWwkWDT09FPR4K587OVrUfVsIwElPPPAbAjxr2um
|
||||
hWXbDu5rmfeApLPZ4hx0lzNm9aUJ9KAVHKlJHAPf7ozPLqWt9y6Z0EPGmoLNjTq48a1iaybJ
|
||||
YV52yEtCms5KJmAT61JXtJyUdyQTEc1WlMql7N1/oZ6jagVZVFfUyZPpFy5lvWcxU7Z03BUk
|
||||
GZLWJqVhPYLkIIPBEBtSEUyNAsjI1q1m/VP+UICwL/sqlXp7v+aOHsnyGttq218MtKd8+Ru2
|
||||
JXuScoO45Awe2CIi96aKW1cVyubkYVy6rTqz0J8a5t2qqZl0UjAMwYKScfPAJ+cIQHHP0Dth
|
||||
VFaMWt0XwxetnM50Ks2rsxL6ZMnJlJmb5hBBBEiVxjA28dznqo+hdksbQuS3Hs6tVtNzdM1Z
|
||||
/VH5nO3Bl/CJmYHKDynjv3zCEB5rLQNo0bIbydWNWxKljbLQLoWkISOAkBKAABCEID//2Q==
|
||||
END:VCARD
|
||||
|
|
|
@ -50,20 +50,4 @@ X-JABBER:JABBER DOE
|
|||
X-MSN:MSN DOE
|
||||
X-SKYPE:SKYPE DOE
|
||||
X-SIP:SIP DOE
|
||||
PHOTO;ENCODING=B:/9j/4AAQSkZJRgABAQEASABIAAD/4QBgRXhpZgAASUkqAAgAAAACADEBAg
|
||||
AHAAAAJgAAAGmHBAABAAAALgAAAAAAAABHb29nbGUAAAMAAJAHAAQAAAAwMjIwAqAEAAEAAAAkA
|
||||
AAAA6AEAAEAAAAXAAAAAAAAAP/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8R
|
||||
ERMWHBcTFBoVEREYIRgaHR0fHx8TFyIkIh4kHB4fHv/bAEMBBQUFBwYHDggIDh4UERQeHh4eHh4
|
||||
eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHv/AABEIABcAJAMBIg
|
||||
ACEQEDEQH/xAAZAAEAAwEBAAAAAAAAAAAAAAAABgcIBAX/xAAyEAABAgUDAgMECwAAAAAAAAABA
|
||||
gQAAwUGEQcSIRMxFBUiCBYzQRgkR1FWd5alw9Pj/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQR
|
||||
AQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/ALl+lHoT+Of2l7/TEz0y1SsTUrzD3Krvmvl
|
||||
3S8X9Unyen1N+z4qE5zsX2zjHPyiGe1P9lX5k0f8Amipbuvm5bv1Iu9s8VrVJplDq02lsJFg09P
|
||||
RT0eCufOzla1H1bCMBJTzzwGwI8a9rpoVl2w7ua5n3gKSz2eIcdJczZvWlCfSgFRypSRwD3+6Mz
|
||||
y6lrfcumdBDxpqCzY06uPGtYmsmyWFedshLQprOSiZgE+tSV7SclHckExHNVpTKpezdf6Geo2oF
|
||||
WVRX1MmT6RcuZb1nMVO2dNwVJBmS1ialYT2C5CCDwRAbUhFMjQLIyNatZv1T/lCAsC/7KpV6e7/
|
||||
mjh7J8hrbattfDLSnfPkbtiV7knKDuOQMHtgiIvemiltXFcrm5GFcuq06s9CfGubdqqmZdFIwDM
|
||||
GCknHzwCfnCEBxz9A7YVRWjFrdF8MXrZzOdCrNq7MS+mTJyZSZm+YQQQRIlcYwNvHc56qPoXZLG
|
||||
0Lktx7OrVbTc3TNWf1R+ZztwZfwiZmByg8p4798whAeay0DaNGyG8nVjVsSpY2y0C6FpCEjgJAS
|
||||
gAAQhCA//9k=
|
||||
END:VCARD
|
||||
|
|
|
@ -27,22 +27,6 @@ EMAIL;TYPE=HOME:john.doe@home.priv
|
|||
EMAIL:john.doe@other.world
|
||||
EMAIL:john.doe@yet.another.world
|
||||
NOTE:This is a test case which uses almost all Evolution fields.
|
||||
PHOTO;ENCODING=B:/9j/4AAQSkZJRgABAQEASABIAAD/4QBgRXhpZgAASUkqAAgAAAACADEBAg
|
||||
AHAAAAJgAAAGmHBAABAAAALgAAAAAAAABHb29nbGUAAAMAAJAHAAQAAAAwMjIwAqAEAAEAAAAkA
|
||||
AAAA6AEAAEAAAAXAAAAAAAAAP/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8R
|
||||
ERMWHBcTFBoVEREYIRgaHR0fHx8TFyIkIh4kHB4fHv/bAEMBBQUFBwYHDggIDh4UERQeHh4eHh4
|
||||
eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHv/AABEIABcAJAMBIg
|
||||
ACEQEDEQH/xAAZAAEAAwEBAAAAAAAAAAAAAAAABgcIBAX/xAAyEAABAgUDAgMECwAAAAAAAAABA
|
||||
gQAAwUGEQcSIRMxFBUiCBYzQRgkR1FWd5alw9Pj/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQR
|
||||
AQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/ALl+lHoT+Of2l7/TEz0y1SsTUrzD3Krvmvl
|
||||
3S8X9Unyen1N+z4qE5zsX2zjHPyiGe1P9lX5k0f8Amipbuvm5bv1Iu9s8VrVJplDq02lsJFg09P
|
||||
RT0eCufOzla1H1bCMBJTzzwGwI8a9rpoVl2w7ua5n3gKSz2eIcdJczZvWlCfSgFRypSRwD3+6Mz
|
||||
y6lrfcumdBDxpqCzY06uPGtYmsmyWFedshLQprOSiZgE+tSV7SclHckExHNVpTKpezdf6Geo2oF
|
||||
WVRX1MmT6RcuZb1nMVO2dNwVJBmS1ialYT2C5CCDwRAbUhFMjQLIyNatZv1T/lCAsC/7KpV6e7/
|
||||
mjh7J8hrbattfDLSnfPkbtiV7knKDuOQMHtgiIvemiltXFcrm5GFcuq06s9CfGubdqqmZdFIwDM
|
||||
GCknHzwCfnCEBxz9A7YVRWjFrdF8MXrZzOdCrNq7MS+mTJyZSZm+YQQQRIlcYwNvHc56qPoXZLG
|
||||
0Lktx7OrVbTc3TNWf1R+ZztwZfwiZmByg8p4798whAeay0DaNGyG8nVjVsSpY2y0C6FpCEjgJAS
|
||||
gAAQhCA//9k=
|
||||
item2.IMPP;X-SERVICE-TYPE=AIM:aim:AIM%20JOHN
|
||||
item3.IMPP;X-SERVICE-TYPE=Gadugadu:x-apple:GADUGADU%20DOE
|
||||
item4.IMPP;X-SERVICE-TYPE=Groupwise:x-apple:GROUPWISE%20DOE
|
||||
|
|
|
@ -74,10 +74,8 @@ PIDS+="$BACKGROUND_PID"
|
|||
|
||||
if [ "$DAEMON_LOG" ] && [ "$WAIT_FOR_DAEMON_OUTPUT" ]; then
|
||||
( set +x; echo >&2 "*** waiting for daemon to write '$WAIT_FOR_DAEMON_OUTPUT' into $DAEMON_LOG"
|
||||
while [ $daemonmatches -eq $(grep -e "$WAIT_FOR_DAEMON_OUTPUT" "$DAEMON_LOG" | wc -l) ]; do
|
||||
if ! kill -0 $BACKGROUND_PID 2>/dev/null; then
|
||||
break
|
||||
fi
|
||||
while kill -0 $BACKGROUND_PID 2>/dev/null &&
|
||||
[ $daemonmatches -eq $(grep -e "$WAIT_FOR_DAEMON_OUTPUT" "$DAEMON_LOG" | wc -l) ]; do
|
||||
sleep 1
|
||||
done
|
||||
)
|
||||
|
@ -85,7 +83,8 @@ fi
|
|||
|
||||
if [ "$WAIT_FOR_DBUS_DAEMON" ]; then
|
||||
( set +x; echo >&2 "*** waiting for daemon to connect to D-Bus as '$WAIT_FOR_DBUS_DAEMON'"
|
||||
while ! (dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep -q "$WAIT_FOR_DBUS_DAEMON"); do
|
||||
while kill -0 $BACKGROUND_PID 2>/dev/null &&
|
||||
! (dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep -q "$WAIT_FOR_DBUS_DAEMON"); do
|
||||
sleep 1
|
||||
done
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue