Commit be6472a1 authored by Ricki Hirner's avatar Ricki Hirner

Add source property (for calendar subscriptions)

parent 72ccc75e
Pipeline #11601085 passed with stage
in 1 minute and 36 seconds
......@@ -26,6 +26,7 @@ class ResourceType: Property {
@JvmField val PRINCIPAL = Property.Name(XmlUtils.NS_WEBDAV, "principal") // WebDAV ACL
@JvmField val ADDRESSBOOK = Property.Name(XmlUtils.NS_CARDDAV, "addressbook") // CardDAV
@JvmField val CALENDAR = Property.Name(XmlUtils.NS_CALDAV, "calendar") // CalDAV
@JvmField val WEBCAL = Property.Name(XmlUtils.NS_CALENDARSERVER, "subscribed")
}
val types = mutableSetOf<Property.Name>()
......@@ -53,6 +54,7 @@ class ResourceType: Property {
PRINCIPAL -> typeName = PRINCIPAL
ADDRESSBOOK -> typeName = ADDRESSBOOK
CALENDAR -> typeName = CALENDAR
WEBCAL -> typeName = WEBCAL
}
type.types.add(typeName)
}
......
/*
* Copyright © Ricki Hirner (bitfire web engineering).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*/
package at.bitfire.dav4android.property
import at.bitfire.dav4android.Property
import at.bitfire.dav4android.XmlUtils
import org.xmlpull.v1.XmlPullParser
class Source: HrefListProperty() {
companion object {
@JvmField
val NAME = Property.Name(XmlUtils.NS_CALENDARSERVER, "source")
}
class Factory(): HrefListProperty.Factory() {
override fun getName() = NAME
override fun create(parser: XmlPullParser) =
create(parser, Source())
}
}
\ No newline at end of file
......@@ -18,5 +18,6 @@ at.bitfire.dav4android.property.GetETag$Factory
at.bitfire.dav4android.property.GetLastModified$Factory
at.bitfire.dav4android.property.GroupMembership$Factory
at.bitfire.dav4android.property.ResourceType$Factory
at.bitfire.dav4android.property.Source$Factory
at.bitfire.dav4android.property.SupportedAddressData$Factory
at.bitfire.dav4android.property.SupportedCalendarComponentSet$Factory
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment