From cc29364f06178f8f6b457384f2ec37a042bd9d43 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 1 Sep 2010 00:37:02 +0000 Subject: * Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch * Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed * Added journal read support to the CalDAV resource * Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kresources/caldav/writer.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'kresources/caldav/writer.h') diff --git a/kresources/caldav/writer.h b/kresources/caldav/writer.h index 3b8f82a81..437eeed0e 100644 --- a/kresources/caldav/writer.h +++ b/kresources/caldav/writer.h @@ -81,6 +81,15 @@ public: mTasksAdded = s; } + /** + * Sets the information about added journals writer should send to server. + * @param s icalendar-formatted string consists of all added journals plus necessary calendar info. + * May be an empty string, which means there are no added journals to send. + */ + void setAddedJournalsObjects(const TQString& s) { + mJournalsAdded = 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. @@ -90,6 +99,15 @@ public: mTasksChanged = s; } + /** + * Sets the information about changed journals writer should send to server. + * @param s icalendar-formatted string consists of all changed journals plus necessary calendar info. + * May be an empty string, which means there are no changed journals to send. + */ + void setChangedJournalsObjects(const TQString& s) { + mJournalsChanged = 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. @@ -99,6 +117,15 @@ public: mTasksDeleted = s; } + /** + * Sets the information about deleted journals writer should send to server. + * @param s icalendar-formatted string consists of all deleted journals plus necessary calendar info. + * May be an empty string, which means there are no deleted journals to send. + */ + void setDeletedJournalsObjects(const TQString& s) { + mJournalsDeleted = s; + } + /** * Clear all the information previously set. */ @@ -109,15 +136,20 @@ public: setAddedTasksObjects(""); setChangedTasksObjects(""); setDeletedTasksObjects(""); + setAddedJournalsObjects(""); + setChangedJournalsObjects(""); + setDeletedJournalsObjects(""); } protected: virtual int runJob(runtime_info* caldavRuntime); virtual int runTasksJob(runtime_info* caldavRuntime); + virtual int runJournalsJob(runtime_info* caldavRuntime); virtual void cleanJob(); virtual void cleanTasksJob(); + virtual void cleanJournalsJob(); /// Just a wrapper above libcaldav event writing functions. template @@ -139,6 +171,16 @@ protected: return r; } + /// Just a wrapper above libcaldav journal writing functions. + template + int pushJournalsObjects(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(journalsUrl().ascii()).c_str(), RT); +// } + return r; + } + private: TQString mAdded; @@ -148,6 +190,10 @@ private: TQString mTasksAdded; TQString mTasksChanged; TQString mTasksDeleted; + + TQString mJournalsAdded; + TQString mJournalsChanged; + TQString mJournalsDeleted; }; } // namespace KCal -- cgit v1.2.1