Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CalendarTimezoneId #57

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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())

}
}