diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-26 13:17:50 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-26 13:17:50 -0600 |
commit | b363d2579af0a11b77e698aed2e1021c2233b644 (patch) | |
tree | f4a47b87354b7a6a3b266c8121bd8ddaeb7accaa /tderesources/carddav/reader.h | |
parent | 61bddfe3a7226b18c68a76124b727c736f431688 (diff) | |
download | tdepim-b363d2579af0a11b77e698aed2e1021c2233b644.tar.gz tdepim-b363d2579af0a11b77e698aed2e1021c2233b644.zip |
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'tderesources/carddav/reader.h')
-rw-r--r-- | tderesources/carddav/reader.h | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/tderesources/carddav/reader.h b/tderesources/carddav/reader.h new file mode 100644 index 000000000..181d4eb6a --- /dev/null +++ b/tderesources/carddav/reader.h @@ -0,0 +1,91 @@ +/*========================================================================= +| KABCDAV +|-------------------------------------------------------------------------- +| (c) 2010 Timothy Pearson +| +| This project is released under the GNU General Public License. +| Please see the file COPYING for more details. +|-------------------------------------------------------------------------- +| Remote address book loading class. + ========================================================================*/ + +/*========================================================================= +| INCLUDES + ========================================================================*/ + +#ifndef KABCDAV_LOADER_H +#define KABCDAV_LOADER_H + +#include "job.h" + +#include <tqstring.h> +#include <tqdatetime.h> + +namespace KABC { + +/*========================================================================= +| CLASS + ========================================================================*/ + +/** + * Calendar Reader. + */ +class CardDavReader : public CardDavJob { + +public: + + /** + * @param url URL to load. + */ + CardDavReader(const TQString& url = TQString()) : + CardDavJob(url) + , mGetAll(true) + { + } + + /** + * Sets a time range. Only event between @p start and @p end will be loaded. + * This method call disables the effect of setGetAll() call. + * setGetAll() call disables the effect of this method. + */ + void setRange(const TQDateTime& start, const TQDateTime& end) { + mGetAll = false; + mTimeStart = start; + mTimeEnd = end; + } + + /** + * Sets the flag to load all events from the remote calendar. + * This method call disables the effect of setRange() call. + * setGetAll() call disables the effect of this method. + */ + void setGetAll() { + mGetAll = true; + } + + /** + * @return downloaded calendar data in iCal format. + */ + TQString data() const { + return mData; + } + +protected: + + virtual int runJob(runtime_info* caldavRuntime); + + virtual void cleanJob(); + +private: + + TQString mData; + bool mGetAll; + TQDateTime mTimeStart; + TQDateTime mTimeEnd; + +}; + +} // namespace KABC + +#endif // KABCDAV_LOADER_H + |