Projects
Kolab:3.4:Updates
libkolabxml
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 18
View file
libkolabxml.spec
Changed
@@ -1,9 +1,9 @@ %{?!mono_arches: %global mono_arches %{ix86} x86_64 sparc sparcv9 ia64 %{arm} alpha s390x ppc ppc64} %ifarch %{mono_arches} -%global with_csharp 1 +# No linux system is actually using the csharp bindings +%global with_csharp 0 %endif - %global with_java 1 %global with_php 1 %global with_python 1 @@ -43,23 +43,20 @@ %endif %endif - %if 0%{?suse_version} -Name: libkolabxml0 +Name: libkolabxml1 %else Name: libkolabxml %endif -Version: 0.8.4 -Release: 1%{?dist} +Version: 1.0 +Release: 0.1.dev20130521.9d6e25%{?dist} Summary: Kolab XML format collection parser library Group: System Environment/Libraries License: LGPLv3+ URL: http://www.kolab.org -Source0: http://mirror.kolabsys.com/pub/releases/libkolabxml-%{version}.tar.gz - -Patch1: boost-version.patch +Source0: http://git.kolab.org/libkolabxml/snapshot/libkolabxml-%{version}.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -111,15 +108,15 @@ with bindings for Python, PHP and other languages. The language bindings are available through sub-packages. +%if 0%{?suse_version} +%package -n libkolabxml-devel +%else %package devel +%endif Summary: Kolab XML library development headers Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} -%if 0%{?rhel} < 6 && 0%{?fedora} < 15 -Requires: boost141-devel -%else Requires: boost-devel -%endif Requires: cmake >= 2.6 Requires: e2fsprogs-devel Requires: gcc-c++ @@ -137,13 +134,21 @@ Requires: qt-devel >= 3 Requires: swig Requires: uuid-devel +%if 0%{?suse_version} +Requires: libxerces-c-devel +%else Requires: xerces-c-devel +%endif Requires: xsd # Only valid in kolabsys.com Koji #Requires: xsd-utils +%if 0%{?suse_version} +%description -n libkolabxml-devel +%else %description devel +%endif Development headers for the Kolab XML libraries. %if 0%{?with_csharp} > 0 @@ -203,8 +208,6 @@ %prep %setup -q -n libkolabxml-%{version} -%patch1 -p1 - %build rm -rf build mkdir -p build @@ -307,7 +310,11 @@ %doc DEVELOPMENT NEWS README %{_libdir}/*.so.* +%if 0%{?suse_version} +%files -n libkolabxml-devel +%else %files devel +%endif %defattr(-,root,root,-) %{_includedir}/kolabxml %{_libdir}/*.so @@ -349,6 +356,10 @@ %endif %changelog +* Sun May 19 2013 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 1.0-0.1 +- Snapshot as required by the latest versions of roundcubemail-plugins-kolab + and iRony + * Thu Apr 11 2013 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.8.4-1 - New upstream release
View file
libossp-uuid-include.patch
Added
@@ -0,0 +1,12 @@ +diff -ur libkolabxml-0.8.4.orig/src/utils.cpp libkolabxml-0.8.4/src/utils.cpp +--- libkolabxml-0.8.4.orig/src/utils.cpp 2013-04-11 10:35:34.000000000 +0100 ++++ libkolabxml-0.8.4/src/utils.cpp 2013-06-17 11:46:07.517005708 +0100 +@@ -26,7 +26,7 @@ + #include <boost/uuid/uuid_io.hpp> + #include <boost/uuid/uuid_generators.hpp> + #else +-#include <uuid.h> ++#include <ossp/uuid.h> + #endif + + #include <boost/lexical_cast.hpp>
View file
debian-Debian_6.0.control
Changed
@@ -5,21 +5,22 @@ Uploaders: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>, Paul Klos <kolab@klos2day.nl> Build-Depends: cmake, debhelper, - libxerces-c-dev, - xsdcxx, libboost-dev, libboost-system-dev, libboost-thread-dev, - libossp-uuid-dev, - swig (>= 2.0), libcurl4-gnutls-dev, + libossp-uuid-dev, + libxerces-c-dev, + php5-cli, php5-dev, python-dev, + swig (>= 2.0), + xsdcxx X-Python-Version: >= 2.6 Standards-Version: 3.9.3 Homepage: http://git.kolab.org/libkolabxml -Package: libkolabxml0 +Package: libkolabxml1 Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} @@ -32,7 +33,7 @@ Package: php-kolabformat Architecture: any -Depends: libkolabxml0 (= ${binary:Version}), +Depends: libkolabxml1 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}, ${php:Depends}, @@ -46,7 +47,7 @@ Package: python-kolabformat Architecture: any Section: python -Depends: libkolabxml0 (= ${binary:Version}), +Depends: libkolabxml1 (= ${binary:Version}), python, ${misc:Depends}, ${shlibs:Depends} @@ -59,7 +60,7 @@ Package: libkolabxml-dev Section: libdevel Architecture: any -Depends: libkolabxml0 (= ${binary:Version}), +Depends: libkolabxml1 (= ${binary:Version}), ${misc:Depends} Description: Development files for libkolabxml Libkolabxml is the reference implementation of the Kolab XML format.
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +libkolabxml (1.0~dev20130521-1) unstable; urgency=low + + * Check in version 1.0~dev20130521 for Kolab 3.1 + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Sun, 08 Sep 2013 19:25:44 +0200 + libkolabxml (0.8.4-1) unstable; urgency=low * Remove empty line
View file
debian.control
Changed
@@ -5,21 +5,22 @@ Uploaders: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>, Paul Klos <kolab@klos2day.nl> Build-Depends: cmake, debhelper, - libxerces-c-dev, - xsdcxx, libboost-dev, libboost-system-dev, libboost-thread-dev, - libossp-uuid-dev, - swig (>= 2.0), libcurl4-gnutls-dev, + libossp-uuid-dev, + libxerces-c-dev, + php5-cli, php5-dev, python-dev, + swig (>= 2.0), + xsdcxx X-Python-Version: >= 2.7 Standards-Version: 3.9.3 Homepage: http://git.kolab.org/libkolabxml -Package: libkolabxml0 +Package: libkolabxml1 Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} @@ -32,7 +33,7 @@ Package: php-kolabformat Architecture: any -Depends: libkolabxml0 (= ${binary:Version}), +Depends: libkolabxml1 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}, ${php:Depends}, @@ -46,7 +47,7 @@ Package: python-kolabformat Architecture: any Section: python -Depends: libkolabxml0 (= ${binary:Version}), +Depends: libkolabxml1 (= ${binary:Version}), python, ${misc:Depends}, ${shlibs:Depends} @@ -59,7 +60,7 @@ Package: libkolabxml-dev Section: libdevel Architecture: any -Depends: libkolabxml0 (= ${binary:Version}), +Depends: libkolabxml1 (= ${binary:Version}), ${misc:Depends} Description: Development files for libkolabxml Libkolabxml is the reference implementation of the Kolab XML format.
View file
debian.series
Added
@@ -0,0 +1,2 @@ +boost-version.patch -p1 +libossp-uuid-include.patch -p1
View file
debian.tar.gz/libkolabxml0.install
Deleted
@@ -1,1 +0,0 @@ -usr/lib/libkolabxml.so.0*
View file
debian.tar.gz/libkolabxml0.lintian-overrides
Deleted
@@ -1,10 +0,0 @@ -# Using shlibs for now -libkolabxml0 binary: no-symbols-control-file -# hardening-check --verbose libkolabxml.so.0 reports -# Fortify Source functions: no, only unprotected functions found! -# unprotected: memmove -# unprotected: memcpy -# unprotected: fread -# None of these functions occur in the source code, -# so overriding this warning -libkolabxml0 binary: hardening-no-fortify-functions
View file
debian.tar.gz/libkolabxml1.install
Added
@@ -0,0 +1,1 @@ +usr/lib/libkolabxml.so.1*
View file
debian.tar.gz/libkolabxml1.lintian-overrides
Added
@@ -0,0 +1,10 @@ +# Using shlibs for now +libkolabxml1 binary: no-symbols-control-file +# hardening-check --verbose libkolabxml.so.1 reports +# Fortify Source functions: no, only unprotected functions found! +# unprotected: memmove +# unprotected: memcpy +# unprotected: fread +# None of these functions occur in the source code, +# so overriding this warning +libkolabxml1 binary: hardening-no-fortify-functions
View file
debian.tar.gz/patches
Deleted
-(directory)
View file
debian.tar.gz/patches/boost-version.patch
Deleted
@@ -1,12 +0,0 @@ -diff -ur libkolabxml-0.8.4.orig/cmake/modules/FindLibkolabxmlDependencies.cmake libkolabxml-0.8.4/cmake/modules/FindLibkolabxmlDependencies.cmake ---- libkolabxml-0.8.4.orig/cmake/modules/FindLibkolabxmlDependencies.cmake 2013-04-11 10:35:34.000000000 +0100 -+++ libkolabxml-0.8.4/cmake/modules/FindLibkolabxmlDependencies.cmake 2013-06-17 12:31:13.915485864 +0100 -@@ -4,7 +4,7 @@ - find_package(PkgConfig) - include(FindPackageHandleStandardArgs) - --if (${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.42) -+if (${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.43) - find_library(UUID NAMES ossp-uuid) - find_package_handle_standard_args(UUID DEFAULT_MSG - UUID)
View file
debian.tar.gz/patches/correct-php-search.patch
Deleted
@@ -1,27 +0,0 @@ -Description: Correct PHP5 search - The php5 executable is not required to determine - the version. Include dirs and version can be - constructed using php-config. -Author: Paul Klos <kolab@klos2day.nl> -Last-Update: 2013-04-13 -Bug: https://issues.kolab.org/show_bug.cgi?id=1753 - ---- a/src/php/CMakeLists.txt -+++ b/src/php/CMakeLists.txt -@@ -22,7 +22,6 @@ - - # Try to find PHP5 - find_path(PHP_INCLUDE_DIR NAMES main/php.h PATH_SUFFIXES php php5) --find_program(PHP_EXECUTABLE NAMES php) - - # Libkolabxml needs PHP >= 5.3 - set(PHP_MIN_VERSION 50300) -@@ -41,7 +40,7 @@ - endif() - endif() - --if(PHP_INCLUDE_DIR AND PHP_EXECUTABLE) -+if(PHP_INCLUDE_DIR AND PHP_CONFIG_EXECUTABLE) - file(READ ${PHP_INCLUDE_DIR}/main/php_version.h PHP_VERSION_CONTENT) - string(REGEX MATCH "#define PHP_VERSION_ID[ ]*[0-9]*\n" _PHP_VERSION_ID_MATCH ${PHP_VERSION_CONTENT}) - if(_PHP_VERSION_ID_MATCH)
View file
debian.tar.gz/patches/libossp-uuid-include.patch
Deleted
@@ -1,12 +0,0 @@ -diff -ur libkolabxml-0.8.4.orig/src/utils.cpp libkolabxml-0.8.4/src/utils.cpp ---- libkolabxml-0.8.4.orig/src/utils.cpp 2013-04-11 10:35:34.000000000 +0100 -+++ libkolabxml-0.8.4/src/utils.cpp 2013-06-17 11:46:07.517005708 +0100 -@@ -26,7 +26,7 @@ - #include <boost/uuid/uuid_io.hpp> - #include <boost/uuid/uuid_generators.hpp> - #else --#include <uuid.h> -+#include <ossp/uuid.h> - #endif - - #include <boost/lexical_cast.hpp>
View file
debian.tar.gz/patches/series
Deleted
@@ -1,4 +0,0 @@ -correct-php-search.patch -xcardconversions-spelling-error.patch -libossp-uuid-include.patch -boost-version.patch
View file
debian.tar.gz/patches/xcardconversions-spelling-error.patch
Deleted
@@ -1,16 +0,0 @@ -Description: Correct spelling error -Author: Paul Klos <kolab@klos2day.nl> -Last-Update: 2013-04-13 -Bug: https://issues.kolab.org/show_bug.cgi?id=1751 - ---- a/src/xcardconversions.h -+++ b/src/xcardconversions.h -@@ -199,7 +199,7 @@ - ERROR("failed to convert: "+std::string(c.what())); - return cDateTime(); - } catch (...) { -- ERROR("failed to convert: unkown exception"); -+ ERROR("failed to convert: unknown exception"); - return cDateTime(); - } - return cDateTime(year, month, day, hour, minute, second, isUtc);
View file
debian.tar.gz/source
Deleted
-(directory)
View file
debian.tar.gz/source/format
Deleted
@@ -1,1 +0,0 @@ -3.0 (quilt)
View file
libkolabxml-0.8.4.tar.gz/CMakeLists.txt -> libkolabxml-1.0.tar.gz/CMakeLists.txt
Changed
@@ -40,12 +40,12 @@ # 0.1.1 (patch release for 0.1.0) # 0.2 (0.2 development version) -set (Libkolabxml_VERSION_MAJOR 0) -set (Libkolabxml_VERSION_MINOR 8) +set (Libkolabxml_VERSION_MAJOR 1) +set (Libkolabxml_VERSION_MINOR 0) # Enable the full x.y.z version only for release versions -set (Libkolabxml_VERSION_PATCH 4) -set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}.${Libkolabxml_VERSION_PATCH}" ) -# set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}" ) +#set (Libkolabxml_VERSION_PATCH 1) +#set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}.${Libkolabxml_VERSION_PATCH}" ) +set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}" ) set (Libkolabxml_VERSION_STRING ${CMAKE_PROJECT_NAME}-${Libkolabxml_VERSION}) set (KOLAB_FORMAT_VERSION "3.0dev1")
View file
libkolabxml-0.8.4.tar.gz/README -> libkolabxml-1.0.tar.gz/README
Changed
@@ -3,6 +3,14 @@ Libkolabxml is the reference implementation of the Kolab XML Format as defined in http://wiki.kolab.org/User:Mollekopf/Drafts/KEP:17. It provides serialization/deserialization from/to in-memory representations for all Kolab Objects, including input validation. += Bindings = + +Based on SWIG (www.swig.org) various language-bindings are provided. + += Usage = + +For more information about the usage please see src/kolabformat.h + = Building = Build with:
View file
libkolabxml-0.8.4.tar.gz/README-Mac.txt -> libkolabxml-1.0.tar.gz/README-Mac.txt
Changed
@@ -1,6 +1,6 @@ # The following commands are used to bild libkolabxml on Mac OS X (Lion) # with most of the required libraries installed via macports: -# > sudo port install cmake boost xercesc3 +# > sudo port install cmake boost xercesc3 swig swig-php # # The cxx/xsd library has to be downlaoded from http://www.codesynthesis.com/products/xsd/download.xhtml # and manually copied into /usr/bin and /usr/include/xsd/
View file
libkolabxml-0.8.4.tar.gz/schemas/ical/kolabformat-xcal.xsd -> libkolabxml-1.0.tar.gz/schemas/ical/kolabformat-xcal.xsd
Changed
@@ -111,6 +111,7 @@ <xs:element name="status" type="StatusPropType" minOccurs="0"/> <xs:element name="location" type="LocationPropType" minOccurs="0"/> <xs:element name="organizer" type="OrganizerPropType" minOccurs="0"/> + <xs:element name="url" type="UrlPropType" minOccurs="0"/> <xs:element name="attendee" type="AttendeePropType" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="attach" type="AttachPropType" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="x-custom" type="CustomType" minOccurs="0" maxOccurs="unbounded"/> @@ -152,6 +153,7 @@ <xs:element name="percent-complete" type="PercentCompletePropType" minOccurs="0"/> <xs:element name="location" type="LocationPropType" minOccurs="0"/> <xs:element name="organizer" type="OrganizerPropType" minOccurs="0"/> + <xs:element name="url" type="UrlPropType" minOccurs="0"/> <xs:element name="attendee" type="AttendeePropType" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="attach" type="AttachPropType" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="x-custom" type="CustomType" minOccurs="0" maxOccurs="unbounded"/>
View file
libkolabxml-0.8.4.tar.gz/schemas/xCard.xsd -> libkolabxml-1.0.tar.gz/schemas/xCard.xsd
Changed
@@ -64,7 +64,7 @@ <!-- We mix types from different properties here for simplicity --> <xs:simpleType name="TypeValueType"> <xs:restriction base="xs:token"> - <!--Address--> + <!--Address/Email--> <xs:enumeration value="work"/> <xs:enumeration value="home"/> <!--Telephone-->
View file
libkolabxml-0.8.4.tar.gz/src/DEVELOPMENT -> libkolabxml-1.0.tar.gz/src/DEVELOPMENT
Changed
@@ -86,6 +86,10 @@ For further performance improvements read this: http://xerces.apache.org/xerces2-j/faq-performance.html +== Thread safety == + +Thread safety is achieved through thread-local storage, which was tested to work under C++ and Python. + == Error Handling == All exceptions which could be thrown are caught within the serializing functions. There shouldn't be any uncaught exceptions because the bindings code doesn't handle that. @@ -93,8 +97,6 @@ Writing doesn't provide any validation (as it is hardly useful for the reason that it's anyways not possible to correct the mistake). For debugging purposes the document can be parsed again after writing. Validity is only ensured by typesafety, but range errors are easily possible. - - === The XSD based development checklist === -Don't forget to add an element for each attribute in the style off: <xs:element name="pref" type="xcard:prefParamType" substitutionGroup="xcard:baseParameter"/> Otherwise you won't get the serialization/deserialization code (or respectively just wrong code), which still compiles though and looks correct from the outside.
View file
libkolabxml-0.8.4.tar.gz/src/containers/incidence_p.h -> libkolabxml-1.0.tar.gz/src/containers/incidence_p.h
Changed
@@ -58,6 +58,7 @@ std::vector<CustomProperty> customProperties; std::vector<Alarm> alarms; + std::string url; }; }
View file
libkolabxml-0.8.4.tar.gz/src/containers/kolabcontact.cpp -> libkolabxml-1.0.tar.gz/src/containers/kolabcontact.cpp
Changed
@@ -150,7 +150,7 @@ int telephonesPreferredIndex; std::vector<std::string> imAddresses; int imAddressPreferredIndex; - std::vector<std::string> emailAddresses; + std::vector<Email> emailAddresses; int emailAddressPreferredIndex; std::vector<Geo> gpsPos; std::vector<Key> keys; @@ -416,13 +416,13 @@ return d->imAddressPreferredIndex; } -void Contact::setEmailAddresses(const std::vector< std::string >& email, int preferredIndex) +void Contact::setEmailAddresses(const std::vector< Email >& email, int preferredIndex) { d->emailAddresses = email; d->emailAddressPreferredIndex = preferredIndex; } -std::vector< std::string > Contact::emailAddresses() const +std::vector< Email > Contact::emailAddresses() const { return d->emailAddresses; }
View file
libkolabxml-0.8.4.tar.gz/src/containers/kolabcontact.h -> libkolabxml-1.0.tar.gz/src/containers/kolabcontact.h
Changed
@@ -196,6 +196,25 @@ int mType; }; +struct Email { + enum Type { + NoType = 0, + Work = 0x01, + Home = 0x02 + }; + Email(): mType(NoType){}; + Email(const std::string &a, int t = NoType): mAddress(a), mType(t) {}; + bool operator==(const Email &other) const { return mAddress == other.mAddress && + mType == other.mType; }; + void setTypes(int t) { mType = t; }; + int types() const { return mType; }; + void setAddress(const std::string &n) { mAddress = n; }; + std::string address() const { return mAddress; }; +private: + std::string mAddress; + int mType; +}; + struct Crypto { enum CryptoTypes { PGPinline = 0x01, @@ -386,8 +405,8 @@ std::vector<std::string> imAddresses() const; int imAddressPreferredIndex() const; - void setEmailAddresses(const std::vector<std::string> &, int preferredIndex = -1); - std::vector<std::string> emailAddresses() const; + void setEmailAddresses(const std::vector<Email> &, int preferredIndex = -1); + std::vector<Email> emailAddresses() const; int emailAddressPreferredIndex() const; void setGPSpos(const std::vector<Geo> &);
View file
libkolabxml-0.8.4.tar.gz/src/containers/kolabevent.cpp -> libkolabxml-1.0.tar.gz/src/containers/kolabevent.cpp
Changed
@@ -290,6 +290,16 @@ return d->attachments; } +void Event::setUrl(const std::string &url) +{ + d->url = url; +} + +std::string Event::url() const +{ + return d->url; +} + void Event::setCustomProperties(const std::vector< CustomProperty > &prop) { d->customProperties = prop;
View file
libkolabxml-0.8.4.tar.gz/src/containers/kolabevent.h -> libkolabxml-1.0.tar.gz/src/containers/kolabevent.h
Changed
@@ -103,6 +103,9 @@ void setAttachments(const std::vector<Attachment> &); std::vector<Attachment> attachments() const; + void setUrl(const std::string &); + std::string url() const; + void setCustomProperties(const std::vector<CustomProperty> &); std::vector<CustomProperty> customProperties() const;
View file
libkolabxml-0.8.4.tar.gz/src/containers/kolabtodo.cpp -> libkolabxml-1.0.tar.gz/src/containers/kolabtodo.cpp
Changed
@@ -305,6 +305,16 @@ return d->attachments; } +void Todo::setUrl(const std::string &url) +{ + d->url = url; +} + +std::string Todo::url() const +{ + return d->url; +} + void Todo::setCustomProperties(const std::vector< CustomProperty > &prop) { d->customProperties = prop;
View file
libkolabxml-0.8.4.tar.gz/src/containers/kolabtodo.h -> libkolabxml-1.0.tar.gz/src/containers/kolabtodo.h
Changed
@@ -105,6 +105,9 @@ void setAttachments(const std::vector<Attachment> &); std::vector<Attachment> attachments() const; + void setUrl(const std::string &); + std::string url() const; + void setCustomProperties(const std::vector<CustomProperty> &); std::vector<CustomProperty> customProperties() const;
View file
libkolabxml-0.8.4.tar.gz/src/csharp/CMakeLists.txt -> libkolabxml-1.0.tar.gz/src/csharp/CMakeLists.txt
Changed
@@ -30,6 +30,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/DistList.cs ${CMAKE_CURRENT_BINARY_DIR}/Duration.cs ${CMAKE_CURRENT_BINARY_DIR}/ErrorSeverity.cs + ${CMAKE_CURRENT_BINARY_DIR}/Email.cs ${CMAKE_CURRENT_BINARY_DIR}/Event.cs ${CMAKE_CURRENT_BINARY_DIR}/File.cs ${CMAKE_CURRENT_BINARY_DIR}/Geo.cs @@ -59,6 +60,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/vectorcs.cs ${CMAKE_CURRENT_BINARY_DIR}/vectordatetime.cs ${CMAKE_CURRENT_BINARY_DIR}/vectordaypos.cs + ${CMAKE_CURRENT_BINARY_DIR}/vectoremail.cs ${CMAKE_CURRENT_BINARY_DIR}/vectorevent.cs ${CMAKE_CURRENT_BINARY_DIR}/vectorgeo.cs ${CMAKE_CURRENT_BINARY_DIR}/vectori.cs
View file
libkolabxml-0.8.4.tar.gz/src/kolabformat.h -> libkolabxml-1.0.tar.gz/src/kolabformat.h
Changed
@@ -30,6 +30,29 @@ #include "kolabfile.h" #include "global_definitions.h" +/** + * Kolab Format v3 Implementation + * + * Note that this code is threadsafe, as it uses thread-local storage. + * + * Example: + * + * Kolab::Event event; + * event.setStart(Kolab::cDateTime("Europe/Zurich",2011,10,10,12,1,1)); + * event.setEnd(Kolab::cDateTime("Europe/Zurich",2012,5,5,3,4,4)); + * event.setLastModified(Kolab::cDateTime(2011,10,11,12,1,2,true)); + * event.setCreated(Kolab::cDateTime(2011,10,11,12,1,3,true)); + * std::string serialization = Kolab::writeEvent(ev, "Product ID"); + * std::string serializedUID = Kolab::getSerializedUID(); //returns the UID of the just serialized event + * if (Kolab::error() != Kolab::NoError) { + * std::cout << "Error on write " << Kolab::errorMessage(); + * } + * Kolab::Event e = Kolab::readEvent(serialization, false); + * if (Kolab::error() != Kolab::NoError) { + * std::cout << "Error on read " << Kolab::errorMessage(); + * } + * + */ namespace Kolab { /** @@ -56,11 +79,13 @@ * Updated during deserialization of object. */ std::string productId(); + /** * Returns KolabFormat version of the last deserialized object. * Updated during deserialization of object. */ std::string xKolabVersion(); + /** * Returns xCal version of the last deserialized xCal object. * Updated during deserialization of object.
View file
libkolabxml-0.8.4.tar.gz/src/kolabformat.i -> libkolabxml-1.0.tar.gz/src/kolabformat.i
Changed
@@ -20,6 +20,10 @@ %include "std_string.i" %include "std_vector.i" +/* Avoid warnings about not generated operators */ +%ignore *::operator=; +%ignore *::operator==; + namespace std { %template(vectori) vector<int>; %template(vectors) vector<string>; @@ -35,12 +39,11 @@ %template(vectorevent) vector<Kolab::Event>; %template(vectorrelated) vector<Kolab::Related>; %template(vectortelephone) vector<Kolab::Telephone>; + %template(vectoremail) vector<Kolab::Email>; %template(vectordatetime) vector<Kolab::cDateTime>; %template(vectorurl) vector<Kolab::Url>; %template(vectorkey) vector<Kolab::Key>; %template(vectorcategorycolor) vector<Kolab::CategoryColor>; -/* %template(vectorevent) vector<Kolab::Event>;*/ -/* %template(vectorevent2) vector< vector<Kolab::Event> >;*/ }; %rename(readKolabFile) Kolab::readFile;
View file
libkolabxml-0.8.4.tar.gz/src/php/CMakeLists.txt -> libkolabxml-1.0.tar.gz/src/php/CMakeLists.txt
Changed
@@ -19,6 +19,7 @@ if (APPLE) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flat_namespace -undefined suppress" ) endif() +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable -Wno-unused-label -Wno-maybe-uninitialized -Wno-unused-function" ) # Try to find PHP5 find_path(PHP_INCLUDE_DIR NAMES main/php.h PATH_SUFFIXES php php5)
View file
libkolabxml-0.8.4.tar.gz/src/php/test.php -> libkolabxml-1.0.tar.gz/src/php/test.php
Changed
@@ -1,14 +1,23 @@ <?php -//run using "php -d enable_dl=On -d extension=./kolabformat.so test.php" +//run using "php -d enable_dl=On -d extension=./kolabformat.so test.php [--verbose]" include("kolabformat.php"); +/////// Basic unit test facilities + +$errors = 0; +$verbose = preg_match('/\s(--verbose|-v)\b/', join(' ', $_SERVER['argv'])); + function assertequal($got, $expect, $name) { + global $verbose, $errors; + if ($got == $expect) { - print "OK - $name\n"; + if ($verbose) + print "OK - $name\n"; return true; } else { + $errors++; print "FAIL - $name\n"; print "-- Expected " . var_export($expect, true) . ", got " . var_export($got, true) . " --\n"; return false; @@ -18,6 +27,9 @@ function assertcontains($haystack, $needle, $name) { // remove whitespace $haystack = preg_replace('/\n\s*/ims', '', $haystack); + // The following two statements are only required with older libcurl versions which erroneusly encode - and . + $haystack = preg_replace('/%2D/', '-', $haystack); + $haystack = preg_replace('/%2E/', '.', $haystack); $needle = preg_replace('/\n\s*/ims', '', $needle); return assertequal(substr(strstr($haystack, $needle), 0, strlen($needle)), $needle, $name); @@ -31,6 +43,7 @@ return assertequal($arg, false, $name); } +// utility to quickly convert PHP arrays into a vector function array2vector($arr) { $vec = new vectors; foreach ((array)$arr as $val) @@ -81,7 +94,7 @@ assertcontains($xml, '<trigger><date-time>2012-07-30T20:30:00Z</date-time>', "Alarm::setStart()"); assertcontains($xml, '<trigger><parameters><related><text>START</text>', "Alarm relative to Start"); assertcontains($xml, '<valarm><properties><action><text>EMAIL</text>', "Email alarm"); -assertcontains($xml, '<attendee><cal-address>mailto:%3Calarms%40kolab%2Eorg%3E</cal-address>', "Email alarm attendee"); +assertcontains($xml, '<attendee><cal-address>mailto:%3Calarms%40kolab.org%3E</cal-address>', "Email alarm attendee"); $e1 = kolabformat::readEvent($xml, false); assertequal($xml, kolabformat::writeEvent($e1), "kolabformat::readEvent() => kolabformat::writeEvent()"); @@ -188,7 +201,7 @@ $xml = kolabformat::writeDistlist($dl); #print $xml; assertcontains($xml, '<fn><text>DalistÄÖŸ</text></fn>', "kolabformat::writeDistlist(): FN (UTF-8)"); -assertcontains($xml, '<uri>mailto:Member%2DA%3Ca%40localhost%3E</uri>', "kolabformat::writeDistlist(): mailto uri"); +assertcontains($xml, '<uri>mailto:Member-A%3Ca%40localhost%3E</uri>', "kolabformat::writeDistlist(): mailto uri"); assertcontains($xml, '<member><uri>urn:uuid:x-member-b-fff</uri>', "kolabformat::writeDistlist(): member urn::uuid"); @@ -217,7 +230,6 @@ asserttrue($c2->uid() != $c3->uid(), "Generate different UIDs for configuration objects"); -?> - - +// terminate with error status +exit($errors);
View file
libkolabxml-0.8.4.tar.gz/src/python/CMakeLists.txt -> libkolabxml-1.0.tar.gz/src/python/CMakeLists.txt
Changed
@@ -24,6 +24,8 @@ SET_SOURCE_FILES_PROPERTIES(${KOLAB_SWIG_PYTHON_SOURCE_FILE} PROPERTIES GENERATED 1) +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized" ) + #${PYTHON_INCLUDE_PATH} is for backwards compatibility (el6) include_directories(${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_PATH})
View file
libkolabxml-0.8.4.tar.gz/src/xcalconversions.h -> libkolabxml-1.0.tar.gz/src/xcalconversions.h
Changed
@@ -144,9 +144,6 @@ return s.text(); } - - - std::string fromDayPos(const Kolab::DayPos &d) { std::string s; @@ -1006,6 +1003,10 @@ inc.setOrganizer(toContactReference(*prop.organizer())); } + if (prop.url()) { + inc.setUrl((*prop.url()).uri()); + } + } @@ -1283,6 +1284,10 @@ if (inc.organizer().isValid()) { prop.organizer(fromContactReference<typename properties::organizer_type>(inc.organizer())); } + + if (!inc.url().empty()) { + prop.url(typename properties::url_type(inc.url())); + } } //=== Alarms ===
View file
libkolabxml-0.8.4.tar.gz/src/xcardconversions.h -> libkolabxml-1.0.tar.gz/src/xcardconversions.h
Changed
@@ -199,7 +199,7 @@ ERROR("failed to convert: "+std::string(c.what())); return cDateTime(); } catch (...) { - ERROR("failed to convert: unkown exception"); + ERROR("failed to convert: unknown exception"); return cDateTime(); } return cDateTime(year, month, day, hour, minute, second, isUtc); @@ -669,7 +669,33 @@ } if (!contact.emailAddresses().empty()) { - vcard.email(fromList<vcard::email_type>(contact.emailAddresses(), contact.emailAddressPreferredIndex())); + vcard::email_sequence seq; + int index = 0; + const std::vector<Email> &l = contact.emailAddresses(); + BOOST_FOREACH(const Kolab::Email &e, l) { + vcard::email_type email(e.address()); + vcard_4_0::typeParamType emailTypeParam; + if (e.types() & Kolab::Email::Home) { + emailTypeParam.text().push_back(TypeValueType::home); + } + if (e.types() & Kolab::Email::Work) { + emailTypeParam.text().push_back(TypeValueType::work); + } + vcard::tel_type::parameters_type params; + if (!emailTypeParam.text().empty()) { + params.baseParameter().push_back(emailTypeParam); + } + if(contact.emailAddressPreferredIndex() == index) { + params.baseParameter().push_back(vcard_4_0::prefParamType(vcard_4_0::prefParamType::integer_default_value())); + } + index++; + + if (!params.baseParameter().empty()) { + email.parameters(params); + } + seq.push_back(email); + } + vcard.email(seq); } if (!contact.gpsPos().empty()) { @@ -748,8 +774,6 @@ } } vcard.member(members); - } else { - WARNING("empty distlist"); } } @@ -1005,18 +1029,31 @@ if (!vcard.email().empty()) { int preferredIndex = -1; - std::vector<std::string> list; + std::vector<Kolab::Email> list; int i = 0; BOOST_FOREACH(const vcard_4_0::TextPropertyType &s, vcard.email()) { + Kolab::Email email; if (s.parameters()) { BOOST_FOREACH(const vcard_4_0::ArrayOfParameters::baseParameter_type ¶m, (*s.parameters()).baseParameter()) { if (dynamic_cast<const vcard_4_0::prefParamType*> (¶m)) { preferredIndex = i; - } + } else if (const vcard_4_0::typeParamType *rel = dynamic_cast<const vcard_4_0::typeParamType*> (¶m)) { + int types = 0; + BOOST_FOREACH(const std::string &s, rel->text()) { + if (s == TypeValueType(TypeValueType::work)) { + types |= Kolab::Email::Work; + } + if (s == TypeValueType(TypeValueType::home)) { + types |= Kolab::Email::Home; + } + } + email.setTypes(types); + } } } i++; - list.push_back(s.text()); + email.setAddress(s.text()); + list.push_back(email); } contact->setEmailAddresses(list, preferredIndex);
View file
libkolabxml-0.8.4.tar.gz/tests/CMakeLists.txt -> libkolabxml-1.0.tar.gz/tests/CMakeLists.txt
Changed
@@ -9,6 +9,10 @@ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-undefined" ) endif() +if(PHP_BINDINGS) + add_test(phptest php -d enable_dl=On -d include_path='.:/usr/share/pear:${CMAKE_BINARY_DIR}/src/php' -d extension=${CMAKE_BINARY_DIR}/src/php/kolabformat.so ${CMAKE_SOURCE_DIR}/src/php/test.php --verbose) +endif() + if (QT4_FOUND) message("Buildings tests") QT4_AUTOMOC(bindingstest.cpp)
View file
libkolabxml-0.8.4.tar.gz/tests/bindingstest.cpp -> libkolabxml-1.0.tar.gz/tests/bindingstest.cpp
Changed
@@ -187,6 +187,7 @@ ev.setStatus(Kolab::StatusConfirmed); ev.setLocation("location"); ev.setOrganizer(Kolab::ContactReference("mail", "name", "uid")); + ev.setUrl("http://example.com"); Kolab::Attendee attendee(Kolab::ContactReference("mail", "name", "uid")); attendee.setPartStat(Kolab::PartDelegated); @@ -298,6 +299,7 @@ QCOMPARE(ev.status(), re.status()); QCOMPARE(ev.location(), re.location()); QCOMPARE(ev.organizer(), re.organizer()); + QCOMPARE(ev.url(), re.url()); QCOMPARE(ev.attendees(), re.attendees()); QCOMPARE(ev.attachments(), re.attachments()); QCOMPARE(ev.customProperties(), re.customProperties()); @@ -564,7 +566,11 @@ c.setGender(Kolab::Contact::Male); c.setLanguages(stringlist); c.setIMaddresses(stringlist,1); - c.setEmailAddresses(stringlist,1); + std::vector <Kolab::Email> emails; + emails.push_back(Kolab::Email("email1@example.org", Kolab::Email::NoType)); + emails.push_back(Kolab::Email("email2@example.org", Kolab::Email::Work)); + emails.push_back(Kolab::Email("email3@example.org", Kolab::Email::Work|Kolab::Email::Home)); + c.setEmailAddresses(emails,0); c.setTitles(stringlist); std::vector<Kolab::Affiliation> list; @@ -670,6 +676,7 @@ QCOMPARE(e.imAddressPreferredIndex(), c.imAddressPreferredIndex()); QCOMPARE(e.emailAddresses(), c.emailAddresses()); QCOMPARE(e.emailAddressPreferredIndex(), c.emailAddressPreferredIndex()); + QCOMPARE(e.emailAddressPreferredIndex(), 0); QCOMPARE(e.gpsPos(), c.gpsPos()); QCOMPARE(e.keys(), c.keys()); QCOMPARE(e.crypto(), c.crypto());
View file
libkolabxml-0.8.4.tar.gz/tests/conversiontest.cpp -> libkolabxml-1.0.tar.gz/tests/conversiontest.cpp
Changed
@@ -7,6 +7,7 @@ #include "serializers.h" #include <boost/thread.hpp> +#include <curl/curlver.h> Q_DECLARE_METATYPE(Kolab::Duration); Q_DECLARE_METATYPE(Kolab::DayPos); @@ -175,9 +176,16 @@ QTest::addColumn<QString>("email"); QTest::addColumn<QString>("name"); QTest::addColumn<QString>("resultEncoded"); - QTest::newRow("1") << "email_1@email.com" << "John Doe" << "mailto:John%20Doe%3Cemail_1%40email.com%3E"; - QTest::newRow("Reserved characters") << "!*'();:@&=+$,/?#[]@email.com" << "John Doe" << "mailto:John%20Doe%3C%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%23%5B%5D%40email.com%3E"; - QTest::newRow("Unreserved characters") << "Aa0-_.~@email.com" << "John Doe" << "mailto:John%20Doe%3CAa0-_.~%40email.com%3E"; + //Older versions used to encode "." and "_". Not sure which version is actually required though (fixed in 7.27.0 but broken in 7.19.7, we're testing for 7.27.0) + if (LIBCURL_VERSION_NUM >= 0x071b00) { + QTest::newRow("1") << "email_1@email.com" << "John Doe" << "mailto:John%20Doe%3Cemail_1%40email.com%3E"; + QTest::newRow("Reserved characters") << "!*'();:@&=+$,/?#[]@email.com" << "John Doe" << "mailto:John%20Doe%3C%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%23%5B%5D%40email.com%3E"; + QTest::newRow("Unreserved characters") << "Aa0-_.~@email.com" << "John Doe" << "mailto:John%20Doe%3CAa0-_.~%40email.com%3E"; + } else { + QTest::newRow("1") << "email_1@email.com" << "John Doe" << "mailto:John%20Doe%3Cemail%5F1%40email%2Ecom%3E"; + QTest::newRow("Reserved characters") << "!*'();:@&=+$,/?#[]@email.com" << "John Doe" << "mailto:John%20Doe%3C%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%23%5B%5D%40email%2Ecom%3E"; + QTest::newRow("Unreserved characters") << "Aa0-_.~@email.com" << "John Doe" << "mailto:John%20Doe%3CAa0%2D%5F%2E%7E%40email%2Ecom%3E"; + } Kolab::Utils::clearErrors(); }
View file
libkolabxml-0.8.4.tar.gz/tests/serializers.h -> libkolabxml-1.0.tar.gz/tests/serializers.h
Changed
@@ -21,7 +21,7 @@ char *toString(const std::vector<Kolab::cDateTime> &v) { QByteArray ba = "vector<Kolab::cDateTime>("; - for (int i = 0; i < v.size(); i++) { + for (std::size_t i = 0; i < v.size(); i++) { ba += QByteArray(toString(v.at(i)))+ "\n"; } ba += ")"; @@ -43,7 +43,7 @@ char *toString(const std::vector<Kolab::Attendee> &v) { QByteArray ba = "vector<Kolab::Attendee>("; - for (int i = 0; i < v.size(); i++) { + for (std::size_t i = 0; i < v.size(); i++) { ba += QByteArray(toString(v.at(i)))+ ", "; } ba += ")"; @@ -63,7 +63,7 @@ char *toString(const std::vector<std::string> &v) { QByteArray ba = "vector<std::string>("; - for (int i = 0; i < v.size(); i++) { + for (std::size_t i = 0; i < v.size(); i++) { ba += QByteArray(toString(v.at(i)))+ ", "; } ba += ")"; @@ -74,7 +74,7 @@ char *toString(const std::vector<int> &v) { QByteArray ba = "vector<int>("; - for (int i = 0; i < v.size(); i++) { + for (std::size_t i = 0; i < v.size(); i++) { ba += QString::number(v.at(i)).toAscii()+ ", "; } ba += ")"; @@ -114,7 +114,7 @@ char *toString(const std::vector<Kolab::Attachment> &v) { QByteArray ba = "vector<Kolab::Attachment>("; - for (int i = 0; i < v.size(); i++) { + for (std::size_t i = 0; i < v.size(); i++) { ba += QByteArray(toString(v.at(i)))+ "\n"; } ba += ")"; @@ -136,7 +136,7 @@ char *toString(const std::vector<Kolab::ContactReference> &v) { QByteArray ba = "vector<Kolab::ContactReference>("; - for (int i = 0; i < v.size(); i++) { + for (std::size_t i = 0; i < v.size(); i++) { ba += QByteArray(toString(v.at(i)))+ "\n"; } ba += ")"; @@ -158,7 +158,7 @@ char *toString(const std::vector<Kolab::Alarm> &v) { QByteArray ba = "vector<Kolab::Alarm>("; - for (int i = 0; i < v.size(); i++) { + for (std::size_t i = 0; i < v.size(); i++) { ba += QByteArray(toString(v.at(i)))+ "\n"; } ba += ")"; @@ -181,7 +181,7 @@ char *toString(const std::vector<Kolab::Related> &v) { QByteArray ba = "vector<Kolab::Related>("; - for (int i = 0; i < v.size(); i++) { + for (std::size_t i = 0; i < v.size(); i++) { ba += QByteArray(toString(v.at(i)))+ "\n"; } ba += ")"; @@ -203,7 +203,7 @@ char *toString(const std::vector<Kolab::Affiliation> &v) { QByteArray ba = "vector<Kolab::Affiliation>("; - for (int i = 0; i < v.size(); i++) { + for (std::size_t i = 0; i < v.size(); i++) { ba += QByteArray(toString(v.at(i)))+ "\n"; } ba += ")";
View file
libkolabxml.dsc
Changed
@@ -1,18 +1,30 @@ Format: 1.0 Source: libkolabxml -Binary: libkolabxml0, php-kolabformat, python-kolabformat, libkolabxml-dev +Binary: libkolabxml1, php-kolabformat, python-kolabformat, libkolabxml-dev Architecture: any -Version: 0.8.4-1 +Version: 1.0~dev20130521-1 Maintainer: Debian Kolab Maintainers <pkg-kolab-devel@lists.alioth.debian.org> Uploaders: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>, Paul Klos <kolab@klos2day.nl> Homepage: http://git.kolab.org/libkolabxml Standards-Version: 3.9.3 -Build-Depends: cmake, debhelper, libxerces-c-dev, xsdcxx, libossp-uuid-dev, libboost-dev, libboost-system-dev, libboost-thread-dev, swig (>= 2.0), libcurl4-gnutls-dev, php5-dev, python-dev +Build-Depends: cmake, + debhelper, + libboost-dev, + libboost-system-dev, + libboost-thread-dev, + libcurl4-gnutls-dev, + libossp-uuid-dev, + libxerces-c-dev, + php5-cli, + php5-dev, + python-dev, + swig (>= 2.0), + xsdcxx Package-List: libkolabxml-dev deb libdevel optional - libkolabxml0 deb libs optional + libkolabxml1 deb libs optional php-kolabformat deb libs optional python-kolabformat deb python optional Files: - 00000000000000000000000000000000 0 libkolabxml-0.8.4.tar.gz - 00000000000000000000000000000000 0 libkolabxml-0.8.4.debian.tar.gz + 00000000000000000000000000000000 0 libkolabxml-1.0.tar.gz + 00000000000000000000000000000000 0 debian.tar.gz
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.