Monotone-Parent: a6b2e3c5d395d584befdfa5576912f12276f0677

Monotone-Revision: fa7f4f3829eb5576b8845dcb4c03e5327cc7e354

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-09-22T21:06:44
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2009-09-22 21:06:44 +00:00
parent 5104dcb4c6
commit 3ef9f1cef1
2 changed files with 44 additions and 5 deletions

View File

@ -2,19 +2,27 @@
* Updated the documentation for the Invisible -> Flagged
mail column change.
* SoObjects/Contacts/NGVCard+SOGo.m - better error-handling.
* SoObjects/Contacts/NGVCard+SOGo.m - better error-handling.
2009-09-22 Cyril Robert <crobert@inverse.ca>
* UI/Scheduler/UIxCalFolderActions.m (exportAction): Used bareFetchFields from
SOGoAppointmentFolder instead of fetchFields from SOGoGCSFolder.
* UI/Scheduler/UIxCalFolderActions.m (exportAction): Used
bareFetchFields from SOGoAppointmentFolder instead of fetchFields
from SOGoGCSFolder.
2009-09-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Tests/webdavlib.py (_WD_XMLTreeElement.__init__): added a new
optional parameter "attributes" that enables the setting of
element attributes during the rendering of the element.
* Tests/webdavlib.py (CalDAVCalendarQuery): new subclass of
WebDAVReport that handles "calendar-query" reports.
* UI/MailerUI/UIxMailListView.m (+initialize): new method
initialized the two new global NSArray: defaultColumnOrder
(hardcoded values), udColumnOrder (system default values).
(-columnsDisplayOrder): we now cache the resulting set of keys.
(-columnsDisplayOrder): we now cache the resulting set of keys.
We also test for the presence of invalid keys by comparing the
configured array with the hardcoded one above.
(-setCurrentColumn:, currentColumn): new accessors.

View File

@ -208,6 +208,33 @@ class CalDAVCalendarMultiget(WebDAVREPORT):
self.top_node.append(href_node)
href_node.append(_WD_XMLTreeTextNode(href))
class CalDAVCalendarQuery(WebDAVREPORT):
def __init__(self, url, properties, component = None, timerange = None):
WebDAVQuery.__init__(self, url)
multiget_tag = self.ns_mgr.register("calendar-query", "urn:ietf:params:xml:ns:caldav")
self.top_node = _WD_XMLTreeElement(multiget_tag)
props = _WD_XMLTreeElement("prop")
self.top_node.append(props)
for prop in properties:
prop_tag = self.render_tag(prop)
props.append(_WD_XMLTreeElement(prop_tag))
if component is not None:
filter_tag = self.ns_mgr.register("filter",
"urn:ietf:params:xml:ns:caldav")
compfilter_tag = self.ns_mgr.register("comp-filter",
"urn:ietf:params:xml:ns:caldav")
filter_node = _WD_XMLTreeElement(filter_tag)
cal_filter_node = _WD_XMLTreeElement(compfilter_tag,
{ "name": "VCALENDAR" })
comp_node = _WD_XMLTreeElement(compfilter_tag,
{ "name": component })
## TODO
# if timerange is not None:
cal_filter_node.append(comp_node)
filter_node.append(cal_filter_node)
self.top_node.append(filter_node)
class WebDAVSyncQuery(WebDAVREPORT):
def __init__(self, url, token, properties):
WebDAVQuery.__init__(self, url)
@ -261,9 +288,10 @@ class _WD_XMLNS_MGR:
return newTag
class _WD_XMLTreeElement:
def __init__(self, tag):
def __init__(self, tag, attributes = {}):
self.tag = tag
self.children = []
self.attributes = attributes
def append(self, child):
self.children.append(child)
@ -274,6 +302,9 @@ class _WD_XMLTreeElement:
if ns_text is not None:
text = text + ns_text
for k in self.attributes:
text = text + " %s=\"%s\"" % (k, self.attributes[k])
if len(self.children) > 0:
text = text + ">"
for child in self.children: