summaryrefslogtreecommitdiffstats
path: root/kresources/caldav/writer.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-28 01:04:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-28 01:04:18 +0000
commit75502cb30b6b56c4ab65ef7f3e315c3298408937 (patch)
treeac69c6b9094c7c03bde546308c4f43459c34ee21 /kresources/caldav/writer.h
parentcfa6b4114cea52b167caaaeb417f98f83edd690f (diff)
downloadtdepim-75502cb30b6b56c4ab65ef7f3e315c3298408937.tar.gz
tdepim-75502cb30b6b56c4ab65ef7f3e315c3298408937.zip
Added tasks support to CalDAV resource
This nearly completes Zimbra integration git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1168963 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/caldav/writer.h')
-rw-r--r--kresources/caldav/writer.h64
1 files changed, 54 insertions, 10 deletions
diff --git a/kresources/caldav/writer.h b/kresources/caldav/writer.h
index 2d1d2d7bb..e9bfcd3b5 100644
--- a/kresources/caldav/writer.h
+++ b/kresources/caldav/writer.h
@@ -46,39 +46,69 @@ public:
}
/**
- * Sets the information about added incidences writer should send to server.
- * @param s icalendar-formatted string consists of all added incidences plus necessary calendar info.
- * May be an empty string, which means there is no added incidences to send.
+ * Sets the information about added events writer should send to server.
+ * @param s icalendar-formatted string consists of all added events plus necessary calendar info.
+ * May be an empty string, which means there are no added events to send.
*/
void setAddedObjects(const TQString& s) {
mAdded = s;
}
/**
- * Sets the information about changed incidences writer should send to server.
- * @param s icalendar-formatted string consists of all changed incidences plus necessary calendar info.
- * May be an empty string, which means there is no changed incidences to send.
+ * Sets the information about changed events writer should send to server.
+ * @param s icalendar-formatted string consists of all changed events plus necessary calendar info.
+ * May be an empty string, which means there are no changed events to send.
*/
void setChangedObjects(const TQString& s) {
mChanged = s;
}
/**
- * Sets the information about deleted incidences writer should send to server.
- * @param s icalendar-formatted string consists of all deleted incidences plus necessary calendar info.
- * May be an empty string, which means there is no deleted incidences to send.
+ * Sets the information about deleted events writer should send to server.
+ * @param s icalendar-formatted string consists of all deleted events plus necessary calendar info.
+ * May be an empty string, which means there are no deleted events to send.
*/
void setDeletedObjects(const TQString& s) {
mDeleted = s;
}
/**
+ * Sets the information about added tasks writer should send to server.
+ * @param s icalendar-formatted string consists of all added tasks plus necessary calendar info.
+ * May be an empty string, which means there are no added tasks to send.
+ */
+ void setAddedTasksObjects(const TQString& s) {
+ mTasksAdded = s;
+ }
+
+ /**
+ * Sets the information about changed tasks writer should send to server.
+ * @param s icalendar-formatted string consists of all changed tasks plus necessary calendar info.
+ * May be an empty string, which means there are no changed tasks to send.
+ */
+ void setChangedTasksObjects(const TQString& s) {
+ mTasksChanged = s;
+ }
+
+ /**
+ * Sets the information about deleted tasks writer should send to server.
+ * @param s icalendar-formatted string consists of all deleted tasks plus necessary calendar info.
+ * May be an empty string, which means there are no deleted tasks to send.
+ */
+ void setDeletedTasksObjects(const TQString& s) {
+ mTasksDeleted = s;
+ }
+
+ /**
* Clear all the information previously set.
*/
void clearObjects() {
setAddedObjects("");
setChangedObjects("");
setDeletedObjects("");
+ setAddedTasksObjects("");
+ setChangedTasksObjects("");
+ setDeletedTasksObjects("");
}
protected:
@@ -87,7 +117,7 @@ protected:
virtual void cleanJob();
- /// Just a wrapper above libcaldav functions.
+ /// Just a wrapper above libcaldav event writing functions.
template<typename Operation>
int pushObjects(const TQString& data, Operation op, int okCode, runtime_info* RT) {
int r = okCode;
@@ -97,11 +127,25 @@ protected:
return r;
}
+ /// Just a wrapper above libcaldav task writing functions.
+ template<typename Operation>
+ int pushTasksObjects(const TQString& data, Operation op, int okCode, runtime_info* RT) {
+ int r = okCode;
+ if (!data.isNull() && !data.isEmpty()) {
+ r = op(std::string(data.ascii()).c_str(), std::string(tasksUrl().ascii()).c_str(), RT);
+ }
+ return r;
+ }
+
private:
TQString mAdded;
TQString mChanged;
TQString mDeleted;
+
+ TQString mTasksAdded;
+ TQString mTasksChanged;
+ TQString mTasksDeleted;
};
} // namespace KCal