summaryrefslogtreecommitdiff
path: root/src/xcalconversions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xcalconversions.h')
-rw-r--r--src/xcalconversions.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/xcalconversions.h b/src/xcalconversions.h
index a0489a8..85d98ed 100644
--- a/src/xcalconversions.h
+++ b/src/xcalconversions.h
@@ -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 THISANDFUTURE = "THISANDFUTURE";
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";
@@ -419,16 +418,13 @@ Kolab::Attachment toAttachment(T aProp)
}
}
}
- 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 +563,6 @@ std::auto_ptr<I> fromDateTimeList(const std::vector<cDateTime> &dtlist)
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()) {
@@ -851,7 +846,7 @@ void setIncidenceProperties(I &inc, const T &prop)
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);
@@ -1495,11 +1490,6 @@ template < > struct IncidenceTrait <Kolab::Event>
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 +1938,7 @@ typename T::IncidencePtr deserializeIncidence(const std::string& s, bool isUrl)
}
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()) {