summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-02-20 02:13:34 -0500
committerThomas Bruederli <bruederli@kolabsys.com>2014-02-20 02:13:34 -0500
commit312d3875fc04848e6086b61cc4165829c20a5c24 (patch)
tree06a64d5f42bb890ded68cf34928782515bd360e6 /pykolab
parent439cea0c64e461546b57e572476fc1b20ac53d54 (diff)
downloadpykolab-312d3875fc04848e6086b61cc4165829c20a5c24.tar.gz
Copy sequence property from/to ical
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/xml/event.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/pykolab/xml/event.py b/pykolab/xml/event.py
index 508dabb..482b1bc 100644
--- a/pykolab/xml/event.py
+++ b/pykolab/xml/event.py
@@ -434,6 +434,9 @@ class Event(object):
if status in self.status_map.values():
return [k for k, v in self.status_map.iteritems() if v == status][0]
+ def get_ical_sequence(self):
+ return str(self.event.sequence()) if self.event.sequence() else None
+
def get_lastmodified(self):
try:
_datetime = self.event.lastModified()
@@ -524,6 +527,9 @@ class Event(object):
self.set_uid(uuid.uuid4())
return self.get_uid()
+ def get_sequence(self):
+ return self.event.sequence()
+
def set_attendee_participant_status(self, attendee, status):
"""
Set the participant status of an attendee to status.
@@ -646,6 +652,8 @@ class Event(object):
self.set_ical_summary(value)
elif attr == "priority":
self.set_ical_priority(value)
+ elif attr == "sequence":
+ self.set_ical_sequence(value)
elif attr == "attendee":
self.set_ical_attendee(value)
elif attr == "organizer":
@@ -720,6 +728,9 @@ class Event(object):
def set_ical_priority(self, priority):
self.set_priority(priority)
+ def set_ical_sequence(self, sequence):
+ self.set_sequence(sequence)
+
def set_ical_status(self, status):
if status in self.status_map.keys():
self.event.setStatus(self.status_map[status])
@@ -786,6 +797,9 @@ class Event(object):
def set_priority(self, priority):
self.event.setPriority(priority)
+ def set_sequence(self, sequence):
+ self.event.setSequence(int(sequence))
+
def set_recurrence(self, recurrence):
self.event.setRecurrenceRule(recurrence)