summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2013-04-10 09:50:21 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2013-04-10 09:50:21 (GMT)
commit41189cfb47c7e8866b4cb1c83c79f298c47c2b85 (patch)
tree0eeb831c8223d55a6cc27caa9d4769fdcb04df74 /src
parentba0ab5d3be8c13fb8ddd42c1a399edebbe7acc9c (diff)
downloadlibkolabxml-41189cfb47c7e8866b4cb1c83c79f298c47c2b85.tar.gz
url property for todos and events.
Diffstat (limited to 'src')
-rw-r--r--src/containers/incidence_p.h1
-rw-r--r--src/containers/kolabevent.cpp10
-rw-r--r--src/containers/kolabevent.h3
-rw-r--r--src/containers/kolabtodo.cpp10
-rw-r--r--src/containers/kolabtodo.h3
-rw-r--r--src/xcalconversions.h8
6 files changed, 35 insertions, 0 deletions
diff --git a/src/containers/incidence_p.h b/src/containers/incidence_p.h
index 8602feb..854f849 100644
--- a/src/containers/incidence_p.h
+++ b/src/containers/incidence_p.h
@@ -58,6 +58,7 @@ namespace Kolab {
std::vector<CustomProperty> customProperties;
std::vector<Alarm> alarms;
+ std::string url;
};
}
diff --git a/src/containers/kolabevent.cpp b/src/containers/kolabevent.cpp
index 0fd4d2b..a1a97c5 100644
--- a/src/containers/kolabevent.cpp
+++ b/src/containers/kolabevent.cpp
@@ -290,6 +290,16 @@ std::vector< Attachment > Event::attachments() const
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;
diff --git a/src/containers/kolabevent.h b/src/containers/kolabevent.h
index 8973d1a..a1df32e 100644
--- a/src/containers/kolabevent.h
+++ b/src/containers/kolabevent.h
@@ -103,6 +103,9 @@ public:
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;
diff --git a/src/containers/kolabtodo.cpp b/src/containers/kolabtodo.cpp
index 2286d25..c80f2fe 100644
--- a/src/containers/kolabtodo.cpp
+++ b/src/containers/kolabtodo.cpp
@@ -305,6 +305,16 @@ std::vector< Attachment > Todo::attachments() const
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;
diff --git a/src/containers/kolabtodo.h b/src/containers/kolabtodo.h
index 1ab8024..bad8cbf 100644
--- a/src/containers/kolabtodo.h
+++ b/src/containers/kolabtodo.h
@@ -105,6 +105,9 @@ public:
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;
diff --git a/src/xcalconversions.h b/src/xcalconversions.h
index d11536c..82c7699 100644
--- a/src/xcalconversions.h
+++ b/src/xcalconversions.h
@@ -1006,6 +1006,10 @@ void setTodoEventProperties(I &inc, const T &prop)
inc.setOrganizer(toContactReference(*prop.organizer()));
}
+ if (prop.url()) {
+ inc.setUrl((*prop.url()).uri());
+ }
+
}
@@ -1283,6 +1287,10 @@ void getTodoEventProperties(T &prop, const I &inc)
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 ===