Skip to content

Commit

Permalink
Added CalendarTimezoneId
Browse files Browse the repository at this point in the history
Signed-off-by: Arnau Mora Gras <[email protected]>
  • Loading branch information
ArnyminerZ committed Sep 24, 2024
1 parent c1bc143 commit 909aeb8
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/kotlin/at/bitfire/dav4jvm/PropertyRegistry.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import at.bitfire.dav4jvm.property.carddav.AddressbookHomeSet
import at.bitfire.dav4jvm.property.carddav.SupportedAddressData
import at.bitfire.dav4jvm.property.push.*
import at.bitfire.dav4jvm.property.webdav.*
import org.xmlpull.v1.XmlPullParser
import org.xmlpull.v1.XmlPullParserException
import java.util.logging.Level
import java.util.logging.Logger
import org.xmlpull.v1.XmlPullParser
import org.xmlpull.v1.XmlPullParserException

object PropertyRegistry {

Expand All @@ -43,6 +43,7 @@ object PropertyRegistry {
CalendarProxyReadFor.Factory,
CalendarProxyWriteFor.Factory,
CalendarTimezone.Factory,
CalendarTimezoneId.Factory,
CalendarUserAddressSet.Factory,
CreationDate.Factory,
CurrentUserPrincipal.Factory,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

package at.bitfire.dav4jvm.property.caldav

import at.bitfire.dav4jvm.Property
import at.bitfire.dav4jvm.PropertyFactory
import at.bitfire.dav4jvm.XmlReader
import org.xmlpull.v1.XmlPullParser

class CalendarTimezoneId(
val identifier: String?
): Property {

companion object {
@JvmField
val NAME = Property.Name(NS_CALDAV, "calendar-timezone-id")
}


object Factory: PropertyFactory {

override fun getName() = NAME

override fun create(parser: XmlPullParser) =
// <!ELEMENT calendar-timezone-id (#PCDATA)>
CalendarTimezoneId(XmlReader(parser).readText())

}
}

0 comments on commit 909aeb8

Please sign in to comment.