[CalendarServer-changes] [2924] CalendarServer/trunk/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Tue Sep 2 11:14:36 PDT 2008
Revision: 2924
http://trac.macosforge.org/projects/calendarserver/changeset/2924
Author: sagen at apple.com
Date: 2008-09-02 11:14:35 -0700 (Tue, 02 Sep 2008)
Log Message:
-----------
Adding a new DAV property, xmpp-server, on calendar home so iCal doesn't have to try to infer it from xmpp-uri
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/customxml.py
CalendarServer/trunk/twistedcaldav/notify.py
CalendarServer/trunk/twistedcaldav/static.py
Modified: CalendarServer/trunk/twistedcaldav/customxml.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/customxml.py 2008-09-02 17:49:58 UTC (rev 2923)
+++ CalendarServer/trunk/twistedcaldav/customxml.py 2008-09-02 18:14:35 UTC (rev 2924)
@@ -262,6 +262,15 @@
name = "xmpp-heartbeat-uri"
protected = True
+class PubSubXMPPServerProperty (davxml.WebDAVTextElement):
+ """
+ A calendarhomefile property to indicate the pubsub XMPP hostname to
+ contact for notifications.
+ """
+ namespace = calendarserver_namespace
+ name = "xmpp-server"
+ protected = True
+
class IScheduleInbox (davxml.WebDAVEmptyElement):
"""
Denotes the resourcetype of a iSchedule Inbox.
Modified: CalendarServer/trunk/twistedcaldav/notify.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/notify.py 2008-09-02 17:49:58 UTC (rev 2923)
+++ CalendarServer/trunk/twistedcaldav/notify.py 2008-09-02 18:14:35 UTC (rev 2924)
@@ -884,6 +884,7 @@
results['service'] = settings['ServiceAddress']
results['host'] = config.ServerHostName
results['port'] = config.SSLPort or config.HTTPPort
+ results['xmpp-server'] = settings['Host']
return results
Modified: CalendarServer/trunk/twistedcaldav/static.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/static.py 2008-09-02 17:49:58 UTC (rev 2923)
+++ CalendarServer/trunk/twistedcaldav/static.py 2008-09-02 18:14:35 UTC (rev 2924)
@@ -602,6 +602,7 @@
liveProperties = CalDAVFile.liveProperties + (
(customxml.calendarserver_namespace, "xmpp-uri"),
(customxml.calendarserver_namespace, "xmpp-heartbeat-uri"),
+ (customxml.calendarserver_namespace, "xmpp-server"),
)
def __init__(self, path, parent, record):
@@ -675,6 +676,14 @@
else:
return succeed(customxml.PubSubHeartbeatURIProperty())
+ elif qname == (customxml.calendarserver_namespace, "xmpp-server"):
+ pubSubConfiguration = getPubSubConfiguration(config)
+ if pubSubConfiguration['enabled']:
+ return succeed(customxml.PubSubXMPPServerProperty(
+ pubSubConfiguration['xmpp-server']))
+ else:
+ return succeed(customxml.PubSubXMPPServerProperty())
+
return super(CalendarHomeFile, self).readProperty(property, request)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080902/e81e5f0f/attachment.html
More information about the calendarserver-changes
mailing list