diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-01 00:37:02 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-01 00:37:02 +0000 |
commit | cc29364f06178f8f6b457384f2ec37a042bd9d43 (patch) | |
tree | 7c77a3184c698bbf9d98cef09fb1ba8124daceba /kresources/caldav/writer.h | |
parent | 4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff) | |
download | tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip |
* 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
Diffstat (limited to 'kresources/caldav/writer.h')
-rw-r--r-- | kresources/caldav/writer.h | 46 |
1 files changed, 46 insertions, 0 deletions
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 @@ -82,6 +82,15 @@ public: } /** + * 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. * May be an empty string, which means there are no changed tasks to send. @@ -91,6 +100,15 @@ public: } /** + * 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. * May be an empty string, which means there are no deleted tasks to send. @@ -100,6 +118,15 @@ public: } /** + * 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. */ void clearObjects() { @@ -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<typename Operation> @@ -139,6 +171,16 @@ protected: return r; } + /// Just a wrapper above libcaldav journal writing functions. + template<typename Operation> + 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 |