Hello community, here is the log from the commit of package libkolabxml for openSUSE:Factory checked in at 2014-09-02 08:22:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libkolabxml (Old) and /work/SRC/openSUSE:Factory/.libkolabxml.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libkolabxml" Changes: -------- --- /work/SRC/openSUSE:Factory/libkolabxml/libkolabxml.changes 2014-08-11 10:07:00.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libkolabxml.new/libkolabxml.changes 2014-09-02 08:22:09.000000000 +0200 @@ -1,0 +2,9 @@ +Tue Aug 26 11:17:36 UTC 2014 - aj@ajaissle.de + +- New upstream release 1.0.2 + +- Dropped the following patches, as they're now included upstream: + - libkolabxml-1.0.1_xsd_type.patch + - libkolabxml-1.0.1_csharp_bindings.patch + +------------------------------------------------------------------- Old: ---- libkolabxml-1.0.1.tar.gz libkolabxml-1.0.1_csharp_bindings.patch libkolabxml-1.0.1_xsd_type.patch New: ---- libkolabxml-1.0.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libkolabxml.spec ++++++ --- /var/tmp/diff_new_pack.e562mQ/_old 2014-09-02 08:22:10.000000000 +0200 +++ /var/tmp/diff_new_pack.e562mQ/_new 2014-09-02 08:22:10.000000000 +0200 @@ -23,7 +23,7 @@ %bcond_without mono Name: libkolabxml -Version: 1.0.1 +Version: 1.0.2 Release: 0 %define soname 1 Summary: Kolab XML Format Schema Definitions Library @@ -33,12 +33,9 @@ Source: http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz # PATCH-FIX-SLE libkolabxml-0.8.3_fix_uuid_includes_SLE.patch -- Fix uuid.h path on SLE 11 Patch0: libkolabxml-0.8.3_fix_uuid_includes_SLE.patch -# PATCH-FIX-UPSTREAM libkolabxml-1.0.1_csharp_bindings.patch -- Fix csharp bindings -Patch1: libkolabxml-1.0.1_csharp_bindings.patch # PATCH-FIX-SLE libkolabxml-1.0.1_no-maybe-uninitialized.patch -- Fix php and python bindings on SLE 11 Patch2: libkolabxml-1.0.1_no-maybe-uninitialized.patch -# PATCH-FIX-UPSTREAM -- Fix compatibility with xsd 4.0.0 -Patch3: libkolabxml-1.0.1_xsd_type.patch + BuildRequires: boost-devel BuildRequires: cmake >= 2.6 BuildRequires: gcc-c++ @@ -49,7 +46,7 @@ %if 0%{?sles_version} == 11 BuildRequires: uuid-devel = 1.6.2 %endif -BuildRequires: libXerces-c-devel +BuildRequires: libxerces-c-devel %if %{with mono} BuildRequires: mono-devel %endif @@ -192,8 +189,6 @@ %patch0 -p0 %patch2 -p1 %endif -%patch1 -p1 -%patch3 -p1 %build export CXXFLAGS="%{optflags}" ++++++ libkolabxml-1.0.1.tar.gz -> libkolabxml-1.0.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/CMakeLists.txt new/libkolabxml-1.0.2/CMakeLists.txt --- old/libkolabxml-1.0.1/CMakeLists.txt 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/CMakeLists.txt 2014-08-26 12:53:07.000000000 +0200 @@ -43,7 +43,7 @@ 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 1) +set (Libkolabxml_VERSION_PATCH 2) set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}.${Libkolabxml_VERSION_PATCH}" ) #set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}" ) @@ -75,7 +75,7 @@ #C++ is required from here on enable_language(CXX) -set(LIB_INSTALL_DIR lib CACHE STRING "The directories where to install libraries to") +set(LIB_INSTALL_DIR lib${LIB_SUFFIX} CACHE STRING "The directories where to install libraries to") set(INCLUDE_INSTALL_DIR include CACHE STRING "The directory where to install headers to") set(INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_DIR}/kolabxml) set(CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/Libkolabxml ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/schemas/ical/kolabformat-xcal.xsd new/libkolabxml-1.0.2/schemas/ical/kolabformat-xcal.xsd --- old/libkolabxml-1.0.1/schemas/ical/kolabformat-xcal.xsd 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/schemas/ical/kolabformat-xcal.xsd 2014-08-26 12:53:07.000000000 +0200 @@ -41,7 +41,7 @@ <xs:complexContent mixed="false"> <xs:extension base="BasePropertyType"> <xs:sequence> - <xs:element name="text" type="xs:string" default="3.0dev1"/> + <xs:element name="text" type="xs:string" default="3.0"/> </xs:sequence> </xs:extension> </xs:complexContent> @@ -107,6 +107,7 @@ <xs:element name="recurrence-id" type="RecurrenceIdPropType" minOccurs="0"/> <xs:element name="summary" type="SummaryPropType" minOccurs="0"/> <xs:element name="description" type="DescriptionPropType" minOccurs="0"/> + <xs:element name="comment" type="CommentPropType" minOccurs="0"/> <xs:element name="priority" type="PriorityPropType" minOccurs="0"/> <xs:element name="status" type="StatusPropType" minOccurs="0"/> <xs:element name="location" type="LocationPropType" minOccurs="0"/> @@ -148,6 +149,7 @@ <xs:element name="recurrence-id" type="RecurrenceIdPropType" minOccurs="0"/> <xs:element name="summary" type="SummaryPropType" minOccurs="0"/> <xs:element name="description" type="DescriptionPropType" minOccurs="0"/> + <xs:element name="comment" type="CommentPropType" minOccurs="0"/> <xs:element name="priority" type="PriorityPropType" minOccurs="0"/> <xs:element name="status" type="StatusPropType" minOccurs="0"/> <xs:element name="percent-complete" type="PercentCompletePropType" minOccurs="0"/> @@ -185,6 +187,7 @@ <xs:element name="dtstart" type="DtstartPropType" minOccurs="0"/> <xs:element name="summary" type="SummaryPropType" minOccurs="0"/> <xs:element name="description" type="DescriptionPropType" minOccurs="0"/> + <xs:element name="comment" type="CommentPropType" minOccurs="0"/> <xs:element name="status" type="StatusPropType" minOccurs="0"/> <xs:element name="contact" type="ContactPropType" minOccurs="0"/> <xs:element name="attendee" type="AttendeePropType" minOccurs="0" maxOccurs="unbounded"/> @@ -247,4 +250,4 @@ -</xs:schema> \ No newline at end of file +</xs:schema> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/schemas/kolabformat-xcard.xsd new/libkolabxml-1.0.2/schemas/kolabformat-xcard.xsd --- old/libkolabxml-1.0.1/schemas/kolabformat-xcard.xsd 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/schemas/kolabformat-xcard.xsd 2014-08-26 12:53:07.000000000 +0200 @@ -10,7 +10,7 @@ <xs:complexContent mixed="false"> <xs:extension base="BasePropertyType"> <xs:sequence> - <xs:element name="text" type="xs:string" default="3.0dev1"/> + <xs:element name="text" type="xs:string" default="3.0"/> </xs:sequence> </xs:extension> </xs:complexContent> @@ -123,4 +123,4 @@ <xs:element name="vcards" type="VcardsType"/> -</xs:schema> \ No newline at end of file +</xs:schema> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/schemas/kolabformat.xsd new/libkolabxml-1.0.2/schemas/kolabformat.xsd --- old/libkolabxml-1.0.1/schemas/kolabformat.xsd 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/schemas/kolabformat.xsd 2014-08-26 12:53:07.000000000 +0200 @@ -7,7 +7,7 @@ <xs:complexType name="KolabBase"> - <xs:attribute name="version" type="xs:string" fixed="3.0dev1" /> + <xs:attribute name="version" type="xs:string" fixed="3.0" /> </xs:complexType> @@ -164,4 +164,4 @@ <xs:element name="configuration" type="Configuration"/> -</xs:schema> \ No newline at end of file +</xs:schema> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/containers/incidence_p.h new/libkolabxml-1.0.2/src/containers/incidence_p.h --- old/libkolabxml-1.0.1/src/containers/incidence_p.h 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/containers/incidence_p.h 2014-08-26 12:53:07.000000000 +0200 @@ -44,6 +44,7 @@ bool thisAndFuture; std::string summary; std::string description; + std::string comment; std::string location; int priority; Status status; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/containers/kolabcontainers.cpp new/libkolabxml-1.0.2/src/containers/kolabcontainers.cpp --- old/libkolabxml-1.0.1/src/containers/kolabcontainers.cpp 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/containers/kolabcontainers.cpp 2014-08-26 12:53:07.000000000 +0200 @@ -536,11 +536,13 @@ std::string data; std::string mimetype; std::string label; + bool isValid; }; Attachment::Attachment() : d(new Attachment::Private) { + d->isValid = false; } Attachment::Attachment(const Kolab::Attachment &other) @@ -568,6 +570,7 @@ void Attachment::setUri(const std::string &uri, const std::string& mimetype) { + d->isValid = true; d->uri = uri; d->mimetype = mimetype; } @@ -594,6 +597,7 @@ void Attachment::setData(const std::string &data, const std::string& mimetype) { + d->isValid = true; d->data = data; d->mimetype = mimetype; } @@ -605,7 +609,7 @@ bool Attachment::isValid() const { - return !d->mimetype.empty(); //TODO use isValid variable + return d->isValid; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/containers/kolabcontainers.h new/libkolabxml-1.0.2/src/containers/kolabcontainers.h --- old/libkolabxml-1.0.1/src/containers/kolabcontainers.h 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/containers/kolabcontainers.h 2014-08-26 12:53:07.000000000 +0200 @@ -336,7 +336,9 @@ PartAccepted, PartDeclined, PartTentative, - PartDelegated + PartDelegated, + PartInProcess, + PartCompleted }; enum Role { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/containers/kolabevent.cpp new/libkolabxml-1.0.2/src/containers/kolabevent.cpp --- old/libkolabxml-1.0.1/src/containers/kolabevent.cpp 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/containers/kolabevent.cpp 2014-08-26 12:53:07.000000000 +0200 @@ -180,6 +180,16 @@ return d->description; } +void Event::setComment(const std::string &comment) +{ + d->comment = comment; +} + +std::string Event::comment() const +{ + return d->comment; +} + void Event::setPriority(int priority) { d->priority = priority; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/containers/kolabevent.h new/libkolabxml-1.0.2/src/containers/kolabevent.h --- old/libkolabxml-1.0.1/src/containers/kolabevent.h 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/containers/kolabevent.h 2014-08-26 12:53:07.000000000 +0200 @@ -85,6 +85,9 @@ void setDescription(const std::string &); std::string description() const; + void setComment(const std::string &); + std::string comment() const; + void setPriority(int); int priority() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/containers/kolabjournal.cpp new/libkolabxml-1.0.2/src/containers/kolabjournal.cpp --- old/libkolabxml-1.0.1/src/containers/kolabjournal.cpp 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/containers/kolabjournal.cpp 2014-08-26 12:53:07.000000000 +0200 @@ -146,6 +146,15 @@ return d->description; } +void Journal::setComment(const std::string &comment) +{ + d->comment = comment; +} + +std::string Journal::comment() const +{ + return d->comment; +} void Journal::setStatus(Status status) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/containers/kolabjournal.h new/libkolabxml-1.0.2/src/containers/kolabjournal.h --- old/libkolabxml-1.0.1/src/containers/kolabjournal.h 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/containers/kolabjournal.h 2014-08-26 12:53:07.000000000 +0200 @@ -61,6 +61,9 @@ void setDescription(const std::string &); std::string description() const; + void setComment(const std::string &); + std::string comment() const; + void setStatus(Status); Status status() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/containers/kolabtodo.cpp new/libkolabxml-1.0.2/src/containers/kolabtodo.cpp --- old/libkolabxml-1.0.1/src/containers/kolabtodo.cpp 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/containers/kolabtodo.cpp 2014-08-26 12:53:07.000000000 +0200 @@ -195,6 +195,16 @@ return d->description; } +void Todo::setComment(const std::string &comment) +{ + d->comment = comment; +} + +std::string Todo::comment() const +{ + return d->comment; +} + void Todo::setPriority(int priority) { d->priority = priority; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/containers/kolabtodo.h new/libkolabxml-1.0.2/src/containers/kolabtodo.h --- old/libkolabxml-1.0.1/src/containers/kolabtodo.h 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/containers/kolabtodo.h 2014-08-26 12:53:07.000000000 +0200 @@ -84,6 +84,9 @@ void setDescription(const std::string &); std::string description() const; + void setComment(const std::string &); + std::string comment() const; + void setPriority(int); int priority() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/csharp/CMakeLists.txt new/libkolabxml-1.0.2/src/csharp/CMakeLists.txt --- old/libkolabxml-1.0.1/src/csharp/CMakeLists.txt 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/csharp/CMakeLists.txt 2014-08-26 12:53:07.000000000 +0200 @@ -44,7 +44,11 @@ ${CMAKE_CURRENT_BINARY_DIR}/Related.cs ${CMAKE_CURRENT_BINARY_DIR}/Relative.cs ${CMAKE_CURRENT_BINARY_DIR}/Role.cs + ${CMAKE_CURRENT_BINARY_DIR}/Snippet.cs + ${CMAKE_CURRENT_BINARY_DIR}/SnippetsCollection.cs ${CMAKE_CURRENT_BINARY_DIR}/Status.cs + ${CMAKE_CURRENT_BINARY_DIR}/Snippet.cs + ${CMAKE_CURRENT_BINARY_DIR}/SnippetsCollection.cs ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_Kolab__Freebusy.cs ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_std__vectorT_Kolab__Todo_t.cs ${CMAKE_CURRENT_BINARY_DIR}/Telephone.cs @@ -67,6 +71,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/vectorkey.cs ${CMAKE_CURRENT_BINARY_DIR}/vectorrelated.cs ${CMAKE_CURRENT_BINARY_DIR}/vectors.cs + ${CMAKE_CURRENT_BINARY_DIR}/vectorsnippet.cs ${CMAKE_CURRENT_BINARY_DIR}/vectortelephone.cs ${CMAKE_CURRENT_BINARY_DIR}/vectorurl.cs ${CMAKE_CURRENT_BINARY_DIR}/Weekday.cs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/java/CMakeLists.txt new/libkolabxml-1.0.2/src/java/CMakeLists.txt --- old/libkolabxml-1.0.1/src/java/CMakeLists.txt 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/java/CMakeLists.txt 2014-08-26 12:53:07.000000000 +0200 @@ -37,6 +37,8 @@ ${CMAKE_CURRENT_BINARY_DIR}/Relative.java ${CMAKE_CURRENT_BINARY_DIR}/Role.java ${CMAKE_CURRENT_BINARY_DIR}/Status.java + ${CMAKE_CURRENT_BINARY_DIR}/Snippet.java + ${CMAKE_CURRENT_BINARY_DIR}/SnippetsCollection.java ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_Kolab__Freebusy.java ${CMAKE_CURRENT_BINARY_DIR}/Telephone.java ${CMAKE_CURRENT_BINARY_DIR}/Todo.java @@ -56,6 +58,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/vectorkey.java ${CMAKE_CURRENT_BINARY_DIR}/vectorrelated.java ${CMAKE_CURRENT_BINARY_DIR}/vectors.java + ${CMAKE_CURRENT_BINARY_DIR}/vectorsnippet.java ${CMAKE_CURRENT_BINARY_DIR}/vectortelephone.java ${CMAKE_CURRENT_BINARY_DIR}/vectorurl.java ${CMAKE_CURRENT_BINARY_DIR}/Weekday.java diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/kolabformat.cpp new/libkolabxml-1.0.2/src/kolabformat.cpp --- old/libkolabxml-1.0.1/src/kolabformat.cpp 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/kolabformat.cpp 2014-08-26 12:53:07.000000000 +0200 @@ -49,7 +49,7 @@ std::string xCalVersion() { - return XCAL::global_xCalVersion; + return Utils::xCalVersion(); } std::string xKolabVersion() @@ -79,6 +79,7 @@ if (!ptr.get()) { return Kolab::Event(); } + validate(*ptr); return *ptr; } @@ -86,7 +87,13 @@ { Utils::clearErrors(); validate(event); - return XCAL::serializeIncidence< XCAL::IncidenceTrait<Kolab::Event> >(event, productId); + const std::string result = XCAL::serializeIncidence< XCAL::IncidenceTrait<Kolab::Event> >(event, productId); + //Validate + XCAL::deserializeIncidence< XCAL::IncidenceTrait<Kolab::Event> >(result, false); + if (errorOccurred()) { + LOG("Error occurred while writing.") + } + return result; } Kolab::Todo readTodo(const std::string& s, bool isUrl) @@ -96,6 +103,7 @@ if (!ptr.get()) { return Kolab::Todo(); } + validate(*ptr); return *ptr; } @@ -103,7 +111,13 @@ { Utils::clearErrors(); validate(event); - return XCAL::serializeIncidence< XCAL::IncidenceTrait<Kolab::Todo> >(event, productId); + const std::string result = XCAL::serializeIncidence< XCAL::IncidenceTrait<Kolab::Todo> >(event, productId); + //Validate + XCAL::deserializeIncidence< XCAL::IncidenceTrait<Kolab::Todo> >(result, false); + if (errorOccurred()) { + LOG("Error occurred while writing.") + } + return result; } Journal readJournal(const std::string& s, bool isUrl) @@ -113,6 +127,7 @@ if (!ptr.get()) { return Kolab::Journal(); } + validate(*ptr); return *ptr; } @@ -120,7 +135,13 @@ { Utils::clearErrors(); validate(j); - return XCAL::serializeIncidence<XCAL::IncidenceTrait<Kolab::Journal> >(j, productId); + const std::string result = XCAL::serializeIncidence< XCAL::IncidenceTrait<Kolab::Journal> >(j, productId); + //Validate + XCAL::deserializeIncidence< XCAL::IncidenceTrait<Kolab::Journal> >(result, false); + if (errorOccurred()) { + LOG("Error occurred while writing.") + } + return result; } Kolab::Freebusy readFreebusy(const std::string& s, bool isUrl) @@ -130,6 +151,7 @@ if (!ptr.get()) { return Kolab::Freebusy(); } + validate(*ptr); return *ptr; } @@ -137,7 +159,12 @@ { Utils::clearErrors(); validate(f); - return XCAL::serializeFreebusy<XCAL::IncidenceTrait<Kolab::Freebusy> >(f, productId); + const std::string result = XCAL::serializeFreebusy<XCAL::IncidenceTrait<Kolab::Freebusy> >(f, productId); + XCAL::deserializeIncidence<XCAL::IncidenceTrait<Kolab::Freebusy> >(result, false); + if (errorOccurred()) { + LOG("Error occurred while writing.") + } + return result; } Kolab::Contact readContact(const std::string& s, bool isUrl) @@ -147,6 +174,7 @@ if (!ptr.get()) { return Kolab::Contact(); } + validate(*ptr); return *ptr; } @@ -154,7 +182,13 @@ { Utils::clearErrors(); validate(contact); - return XCARD::serializeCard(contact, productId); + const std::string result = XCARD::serializeCard(contact, productId); + //Validate + XCARD::deserializeCard<Kolab::Contact>(result, false); + if (errorOccurred()) { + LOG("Error occurred while writing.") + } + return result; } DistList readDistlist(const std::string& s, bool isUrl) @@ -164,6 +198,7 @@ if (!ptr.get()) { return Kolab::DistList(); } + validate(*ptr); return *ptr; } @@ -171,7 +206,13 @@ { Utils::clearErrors(); validate(list); - return XCARD::serializeCard(list, productId); + const std::string result = XCARD::serializeCard(list, productId); + //Validate + XCARD::deserializeCard<Kolab::DistList>(result, false); + if (errorOccurred()) { + LOG("Error occurred while writing.") + } + return result; } Note readNote(const std::string& s, bool isUrl) @@ -181,6 +222,7 @@ if (!ptr.get()) { return Kolab::Note(); } + validate(*ptr); return *ptr; } @@ -188,7 +230,13 @@ { Utils::clearErrors(); validate(note); - return Kolab::KolabObjects::serializeObject<Kolab::Note>(note, productId); + const std::string result = Kolab::KolabObjects::serializeObject<Kolab::Note>(note, productId); + //Validate + Kolab::KolabObjects::deserializeObject<Kolab::Note>(result, false); + if (errorOccurred()) { + LOG("Error occurred while writing.") + } + return result; } File readFile(const std::string& s, bool isUrl) @@ -198,6 +246,7 @@ if (!ptr.get()) { return Kolab::File(); } + validate(*ptr); return *ptr; } @@ -205,7 +254,13 @@ { Utils::clearErrors(); validate(file); - return Kolab::KolabObjects::serializeObject<Kolab::File>(file, productId); + const std::string result = Kolab::KolabObjects::serializeObject<Kolab::File>(file, productId); + //Validate + Kolab::KolabObjects::deserializeObject<Kolab::File>(result, false); + if (errorOccurred()) { + LOG("Error occurred while writing.") + } + return result; } Configuration readConfiguration(const std::string& s, bool isUrl) @@ -215,6 +270,7 @@ if (!ptr.get()) { return Kolab::Configuration(); } + validate(*ptr); return *ptr; } @@ -222,7 +278,13 @@ { Utils::clearErrors(); validate(config); - return Kolab::KolabObjects::serializeObject< Kolab::Configuration >(config, productId); + const std::string result = Kolab::KolabObjects::serializeObject<Kolab::Configuration>(config, productId); + //Validate + Kolab::KolabObjects::deserializeObject<Kolab::Configuration>(result, false); + if (errorOccurred()) { + LOG("Error occurred while writing.") + } + return result; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/kolabformat.i new/libkolabxml-1.0.2/src/kolabformat.i --- old/libkolabxml-1.0.1/src/kolabformat.i 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/kolabformat.i 2014-08-26 12:53:07.000000000 +0200 @@ -44,6 +44,7 @@ %template(vectorurl) vector<Kolab::Url>; %template(vectorkey) vector<Kolab::Key>; %template(vectorcategorycolor) vector<Kolab::CategoryColor>; + %template(vectorsnippet) vector<Kolab::Snippet>; }; %rename(readKolabFile) Kolab::readFile; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/objectvalidation.cpp new/libkolabxml-1.0.2/src/objectvalidation.cpp --- old/libkolabxml-1.0.1/src/objectvalidation.cpp 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/objectvalidation.cpp 2014-08-26 12:53:07.000000000 +0200 @@ -51,7 +51,7 @@ return false; } if (tzSet.find(tz) == tzSet.end()) { - Utils::logMessage("not a valid olson timezone.", "", 0, Error); + Utils::logMessage("Not a valid olson timezone: " + tz, "", 0, Error); return false; } } @@ -91,8 +91,8 @@ ASSERTEXISTING(event.start()); ASSERTVALID(event.start()); ASSERTVALID(event.end()); - if (event.end().isValid()) { - ASSERTEQUAL(event.start().timezone(), event.end().timezone()); + if (event.start().isValid() && event.end().isValid()) { + ASSERTEQUAL(event.start().isDateOnly(), event.end().isDateOnly()); } } @@ -101,7 +101,7 @@ ASSERTVALID(todo.start()); ASSERTVALID(todo.due()); if (todo.start().isValid() && todo.due().isValid()) { - ASSERTEQUAL(todo.start().timezone(), todo.due().timezone()); + ASSERTEQUAL(todo.start().isDateOnly(), todo.due().isDateOnly()); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/shared_conversions.h new/libkolabxml-1.0.2/src/shared_conversions.h --- old/libkolabxml-1.0.1/src/shared_conversions.h 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/shared_conversions.h 2014-08-26 12:53:07.000000000 +0200 @@ -29,7 +29,11 @@ typedef boost::shared_ptr<cDateTime> cDateTimePtr; typedef ::xsd::cxx::tree::type type; +#if (XSD_INT_VERSION >= 4000000L) +typedef ::xsd::cxx::tree::simple_type< char, type > simple_type; +#else typedef ::xsd::cxx::tree::simple_type< type > simple_type; +#endif typedef ::xsd::cxx::tree::date< char, simple_type > date; typedef ::xsd::cxx::tree::date_time< char, simple_type > date_time; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/utils.cpp new/libkolabxml-1.0.2/src/utils.cpp --- old/libkolabxml-1.0.1/src/utils.cpp 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/utils.cpp 2014-08-26 12:53:07.000000000 +0200 @@ -47,6 +47,7 @@ std::string createdUID; std::string productId; std::string xKolabVersion; + std::string xCalVersion; ErrorSeverity errorBit; std::string errorMessage; @@ -80,6 +81,16 @@ return ThreadLocal::inst().xKolabVersion; } +void setXCalVersion(const std::string &s) +{ + ThreadLocal::inst().xCalVersion = s; +} + +std::string xCalVersion() +{ + return ThreadLocal::inst().xCalVersion; +} + void setProductId(const std::string &s) { ThreadLocal::inst().productId = s; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/utils.h new/libkolabxml-1.0.2/src/utils.h --- old/libkolabxml-1.0.1/src/utils.h 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/utils.h 2014-08-26 12:53:07.000000000 +0200 @@ -33,10 +33,10 @@ void logMessage(const std::string &,const std::string &, int, ErrorSeverity s); -#define LOG(message) logMessage(message,__FILE__, __LINE__, NoError); -#define WARNING(message) logMessage(message,__FILE__, __LINE__, Warning); -#define ERROR(message) logMessage(message,__FILE__, __LINE__, Error); -#define CRITICAL(message) logMessage(message,__FILE__, __LINE__, Critical); +#define LOG(message) Utils::logMessage(message,__FILE__, __LINE__, NoError); +#define WARNING(message) Utils::logMessage(message,__FILE__, __LINE__, Warning); +#define ERROR(message) Utils::logMessage(message,__FILE__, __LINE__, Error); +#define CRITICAL(message) Utils::logMessage(message,__FILE__, __LINE__, Critical); void logMessage(const std::string &, ErrorSeverity s = Warning); @@ -72,6 +72,12 @@ std::string kolabVersion(); /** + * The xCal Version of the last deserialized object + */ +void setXCalVersion(const std::string &); +std::string xCalVersion(); + +/** * A timestamp which overrides the one normally used. */ void setOverrideTimestamp(const cDateTime &); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/src/xcalconversions.h new/libkolabxml-1.0.2/src/xcalconversions.h --- old/libkolabxml-1.0.1/src/xcalconversions.h 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/src/xcalconversions.h 2014-08-26 12:53:07.000000000 +0200 @@ -47,8 +47,6 @@ namespace Kolab { namespace XCAL { -std::string global_xCalVersion; - const char* const XCAL_VERSION = "2.0"; const char* const XCAL_NAMESPACE = "urn:ietf:params:xml:ns:icalendar-2.0"; @@ -59,7 +57,8 @@ const char* const BASE64 = "BASE64"; const char* const NEEDSACTION = "NEEDS-ACTION"; -const char* const COMPLETED = "OPAQUE"; +const char* const COMPLETED = "COMPLETED"; +const char* const COMPLETED_COMPAT = "OPAQUE"; const char* const INPROCESS = "IN-PROCESS"; const char* const CANCELLED = "CANCELLED"; const char* const TENTATIVE = "TENTATIVE"; @@ -76,6 +75,8 @@ const char* const PARTDELEGATED = "DELEGATED"; const char* const PARTNEEDSACTION = "NEEDS-ACTION"; const char* const PARTTENTATIVE = "TENTATIVE"; +const char* const PARTINPROCESS = "IN-PROCESS"; +const char* const PARTCOMPLETED = "COMPLETED"; const char* const CHAIR = "CHAIR"; const char* const NONPARTICIPANT = "NON-PARTICIPANT"; @@ -419,16 +420,13 @@ } } } - if (mimetype.empty()) { - ERROR("no mimetype"); - } if (aProp.uri()) { a.setUri(*aProp.uri(), mimetype); } else if (aProp.binary()) { a.setData(base64_decode(*aProp.binary()), mimetype); } else { - ERROR("not uri and no data available"); + ERROR("no uri and no data available"); } return a; } @@ -567,7 +565,6 @@ ptr->date_time().push_back(Shared::fromDateTime(dt)); } //TODO handle utc - //TODO check for equality of timezones? } if (!dtlist.empty() && !dtlist.at(0).timezone().empty()) { @@ -605,6 +602,10 @@ return PARTNEEDSACTION; case PartTentative: return PARTTENTATIVE; + case PartInProcess: + return PARTINPROCESS; + case PartCompleted: + return PARTCOMPLETED; } ERROR("PartStat not handled: " + status); return std::string(); @@ -622,6 +623,10 @@ return PartNeedsAction; } else if (status == PARTTENTATIVE) { return PartTentative; + } else if (status == PARTINPROCESS) { + return PartInProcess; + } else if (status == PARTCOMPLETED) { + return PartCompleted; } ERROR("PartStat not handled: " + status); return PartNeedsAction; @@ -847,11 +852,15 @@ inc.setDescription(toString(*prop.description())); } + if (prop.comment()) { + inc.setComment(toString(*prop.comment())); + } + if (prop.status()) { const std::string &status = toString(*prop.status()); if (status == NEEDSACTION) { inc.setStatus(StatusNeedsAction); - } else if (status == COMPLETED) { + } else if (status == COMPLETED || status == COMPLETED_COMPAT) { inc.setStatus(StatusCompleted); } else if (status == INPROCESS) { inc.setStatus(StatusInProcess); @@ -1123,6 +1132,10 @@ prop.description(typename properties::description_type(inc.description())); } + if (!inc.comment().empty()) { + prop.comment(typename properties::comment_type(inc.comment())); + } + if (inc.status() != StatusUndefined) { switch (inc.status()) { case StatusNeedsAction: @@ -1495,11 +1508,6 @@ if (prop.dtend()) { event.setEnd(*toDate(*prop.dtend())); - if (event.end().isUTC() != event.end().isUTC() && - event.end().timezone() != event.end().timezone() && - event.end().isDateOnly() != event.end().isDateOnly()) { - ERROR("dtEnd has wrong timespec"); - } } else if (prop.duration()) { event.setDuration(toDuration((*prop.duration()).duration())); } @@ -1948,7 +1956,7 @@ } setProductId( vcalendar.properties().prodid().text() ); - global_xCalVersion = vcalendar.properties().version().text(); + setXCalVersion(vcalendar.properties().version().text()); setKolabVersion( vcalendar.properties().x_kolab_version().text() ); if (incidences.empty()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/tests/bindingstest.cpp new/libkolabxml-1.0.2/tests/bindingstest.cpp --- old/libkolabxml-1.0.1/tests/bindingstest.cpp 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/tests/bindingstest.cpp 2014-08-26 12:53:07.000000000 +0200 @@ -212,6 +212,7 @@ ev.setRecurrenceID(Kolab::cDateTime("Europe/Zurich", 2006,1,6,12,0,0), true); ev.setSummary("summary"); ev.setDescription("description"); + ev.setComment("comment"); ev.setPriority(3); ev.setStatus(Kolab::StatusConfirmed); ev.setLocation("location"); @@ -324,6 +325,7 @@ QCOMPARE(ev.thisAndFuture(), re.thisAndFuture()); QCOMPARE(ev.summary(), re.summary()); QCOMPARE(ev.description(), re.description()); + QCOMPARE(ev.comment(), re.comment()); QCOMPARE(ev.priority(), re.priority()); QCOMPARE(ev.status(), re.status()); QCOMPARE(ev.location(), re.location()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.1/tests/validationtest.cpp new/libkolabxml-1.0.2/tests/validationtest.cpp --- old/libkolabxml-1.0.1/tests/validationtest.cpp 2013-10-30 17:48:07.000000000 +0100 +++ new/libkolabxml-1.0.2/tests/validationtest.cpp 2014-08-26 12:53:07.000000000 +0200 @@ -76,13 +76,13 @@ event.setStart(cDateTime("Europe/Zurich",2013,1,1,1,1,1)); event.setEnd(cDateTime("Europe/London",2013,1,1,1,1,1)); writeEvent(event); - QCOMPARE(Kolab::error(), Kolab::Error); + QCOMPARE(Kolab::error(), Kolab::NoError); Todo todo; todo.setStart(cDateTime("Europe/Zurich",2013,1,1,1,1,1)); todo.setDue(cDateTime("Europe/London",2013,1,1,1,1,1)); writeTodo(todo); - QCOMPARE(Kolab::error(), Kolab::Error); + QCOMPARE(Kolab::error(), Kolab::NoError); } void ValidationTest::testUTCwithTimezone() -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org