summaryrefslogtreecommitdiffstats
path: root/libkcal/incidence.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-27 23:01:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-27 23:01:53 +0000
commitcfa6b4114cea52b167caaaeb417f98f83edd690f (patch)
tree5fb46adfe9f1caf37e2716e79b148176b09574ab /libkcal/incidence.h
parenta3e46fcf743ccdac7c2461658898ca254bf64dd6 (diff)
downloadtdepim-cfa6b4114cea52b167caaaeb417f98f83edd690f.tar.gz
tdepim-cfa6b4114cea52b167caaaeb417f98f83edd690f.zip
Initial (i.e. read only) support for RECURRENCE-ID modified incidence series.
Write support requires further debugging and/or compliance checks with respect to Zimbra; there is no obvious reason why it should not be working but Zimbra fails with 409 when saving. User interface support is mostly complete, with event links being tracked across deletes. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1168937 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkcal/incidence.h')
-rw-r--r--libkcal/incidence.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/libkcal/incidence.h b/libkcal/incidence.h
index 268b2ced..477b758c 100644
--- a/libkcal/incidence.h
+++ b/libkcal/incidence.h
@@ -36,6 +36,10 @@
namespace KCal {
+class Calendar;
+
+typedef QStringList IncidenceList;
+typedef QStringList::iterator IncidenceListIterator;
/**
This class provides the base class common to all calendar components.
@@ -249,6 +253,21 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
bool recursAt( const TQDateTime &qdt ) const;
/**
+ Returns true if the date specified is one on which the incidence will
+ recur.
+ This function takes RECURRENCE-ID parameters into account
+ @param cal the calendar owning the incidence
+ */
+ virtual bool recursOn( const TQDate &qd, Calendar *cal ) const;
+ /**
+ Returns true if the date/time specified is one on which the incidence will
+ recur.
+ This function takes RECURRENCE-ID parameters into account
+ @param cal the calendar owning the incidence
+ */
+ bool recursAt( const TQDateTime &qdt, Calendar *cal ) const;
+
+ /**
Calculates the start date/time for all recurrences that happen at some time
on the given date (might start before that date, but end on or after the
given date).
@@ -378,6 +397,58 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
*/
int priority() const;
+ /**
+ Returns true if the incidence has recurrenceID, otherwise return false.
+ @see setHasRecurrenceID(), setRecurrenceID(TQDateTime)
+ @since 3.5.12
+ */
+ bool hasRecurrenceID() const;
+
+ /**
+ Sets if the incidence has recurrenceID.
+ @param hasRecurrenceID true if incidence has recurrenceID, otherwise false
+ @see hasRecurrenceID(), recurrenceID()
+ @since 3.5.12
+ */
+ void setHasRecurrenceID( bool hasRecurrenceID );
+
+ /**
+ Set the incidences recurrenceID.
+ @param recurrenceID is the incidence recurrenceID to set
+ @see recurrenceID().
+ @since 3.5.12
+ */
+ void setRecurrenceID( const TQDateTime &recurrenceID );
+
+ /**
+ Returns the incidence recurrenceID.
+ @return incidences recurrenceID value
+ @see setRecurrenceID().
+ @since 3.5.12
+ */
+ TQDateTime recurrenceID() const;
+
+ /**
+ Attach a child incidence to a parent incidence.
+ @param childIncidence is the child incidence to add
+ @since 3.5.12
+ */
+ void addChildIncidence( TQString childIncidence );
+
+ /**
+ Detach a child incidence from its parent incidence.
+ @param childIncidence is the child incidence to remove
+ @since 3.5.12
+ */
+ void deleteChildIncidence( TQString childIncidence );
+
+ /**
+ Returns an EventList of all child incidences.
+ @return EventList of all child incidences.
+ @since 3.5.12
+ */
+ IncidenceList childIncidences() const;
+
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// %%%%% Alarm-related methods
@@ -477,6 +548,11 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
// Scheduling ID - used only to identify between scheduling mails
TQString mSchedulingID;
+ TQDateTime mRecurrenceID; // recurrenceID
+ bool mHasRecurrenceID; // if incidence has recurrenceID
+
+ IncidenceList mChildRecurrenceEvents;
+
class Private;
Private *d;
};