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/job.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/job.h')
-rw-r--r-- | kresources/caldav/job.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/kresources/caldav/job.h b/kresources/caldav/job.h index bad00c98d..928e38143 100644 --- a/kresources/caldav/job.h +++ b/kresources/caldav/job.h @@ -61,6 +61,13 @@ public: } /** + * Sets a new Journals URL to load. + */ + virtual void setJournalsUrl(const TQString& s) { + mJournalsUrl = s; + } + + /** * Sets the parent qobject. */ virtual void setParent(TQObject *s) { @@ -89,6 +96,13 @@ public: } /** + * @return Journals URL to load. + */ + virtual TQString journalsUrl() const { + return mJournalsUrl; + } + + /** * @return parent object */ virtual TQObject *parent() { @@ -117,6 +131,13 @@ public: } /** + * @return true if journals downloading process failed. + */ + virtual bool journalsError() const { + return mJournalsError; + } + + /** * @return an event error string. */ virtual TQString errorString() const { @@ -131,6 +152,13 @@ public: } /** + * @return a journal error string. + */ + virtual TQString journalsErrorString() const { + return mJournalsErrorString; + } + + /** * @return an event error number. */ virtual long errorNumber() const { @@ -144,6 +172,13 @@ public: return mTasksErrorNumber; } + /** + * @return a journal error number. + */ + virtual long journalsErrorNumber() const { + return mJournalsErrorNumber; + } + protected: virtual void run(); @@ -167,6 +202,15 @@ protected: virtual int runTasksJob(runtime_info* caldavRuntime) = 0; /** + * Main run method for journal jobs. Jobs should not override run() method. + * Instead of this they should override this one. + * @param caldavRuntime specific libcaldav runtime information. This pointer should not be saved for the usage + * outside of runJob. + * @return libcaldav response code (see CALDAV_RESPONSE) + */ + virtual int runJournalsJob(runtime_info* caldavRuntime) = 0; + + /** * Some cleaning. Jobs may (and usually should) override this method. */ virtual void cleanJob() { @@ -176,6 +220,9 @@ protected: mTasksError = false; mTasksErrorString = ""; mTasksErrorNumber = 0; + mJournalsError = false; + mJournalsErrorString = ""; + mJournalsErrorNumber = 0; } /** @@ -189,6 +236,11 @@ protected: void setTasksErrorString(const TQString& str, const long number); /** + * Sets a journal error string to @p err. Also sets an error flag. + */ + void setJournalsErrorString(const TQString& str, const long number); + + /** * Process an event error. * Subclasses can overwrite this method, if some special error message handling * should be done. Call setErrorString() to set the error after processing is done. @@ -204,16 +256,28 @@ protected: */ virtual void processTasksError(const caldav_error* err); + /** + * Process a journal error. + * Subclasses can overwrite this method, if some special error message handling + * should be done. Call setErrorString() to set the error after processing is done. + * @param err error structure. + */ + virtual void processJournalsError(const caldav_error* err); + private: TQString mUrl; TQString mTasksUrl; + TQString mJournalsUrl; bool mError; bool mTasksError; + bool mJournalsError; TQString mErrorString; TQString mTasksErrorString; + TQString mJournalsErrorString; long mErrorNumber; long mTasksErrorNumber; + long mJournalsErrorNumber; TQObject *mParent; int mType; |