Loading build.gradle.kts +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ group="com.gitlab.bitfireAT" version="2.1.3" plugins { kotlin("jvm") version "1.5.30" kotlin("jvm") version "1.5.31" `maven-publish` id("org.jetbrains.dokka") version "1.5.0" Loading src/main/kotlin/at/bitfire/dav4jvm/DavAddressBook.kt +2 −2 Original line number Diff line number Diff line Loading @@ -85,9 +85,9 @@ class DavAddressBook @JvmOverloads constructor( * * @param urls list of vCard URLs to be requested * @param contentType MIME type of requested format; may be "text/vcard" for vCard or * "application/vcard+json" for jCard * "application/vcard+json" for jCard. *null*: don't request specific representation type * @param version vCard version subtype of the requested format. Should only be specified together with a [contentType] of "text/vcard". * Currently only useful value: "4.0" for vCard 4. * Currently only useful value: "4.0" for vCard 4. *null*: don't request specific version * @param callback called for every WebDAV response XML element in the result * * @return list of properties which have been received in the Multi-Status response, but Loading src/main/kotlin/at/bitfire/dav4jvm/DavCalendar.kt +12 −4 Original line number Diff line number Diff line Loading @@ -123,6 +123,9 @@ class DavCalendar @JvmOverloads constructor( * to the callback, whether they are successful (2xx) or not. * * @param urls list of iCalendar URLs to be requested * @param contentType MIME type of requested format; may be "text/calendar" for iCalendar or * "application/calendar+json" for jCard. *null*: don't request specific representation type * @param version Version subtype of the requested format, like "2.0" for iCalendar 2. *null*: don't request specific version * @param callback called for every WebDAV response XML element in the result * * @return list of properties which have been received in the Multi-Status response, but Loading @@ -132,7 +135,7 @@ class DavCalendar @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error */ fun multiget(urls: List<HttpUrl>, callback: DavResponseCallback): List<Property> { fun multiget(urls: List<HttpUrl>, contentType: String? = null, version: String? = null, callback: DavResponseCallback): List<Property> { /* <!ELEMENT calendar-multiget ((DAV:allprop | DAV:propname | DAV:prop)?, DAV:href+)> Loading @@ -148,7 +151,12 @@ class DavCalendar @JvmOverloads constructor( insertTag(GetContentType.NAME) // to determine the character set insertTag(GetETag.NAME) insertTag(ScheduleTag.NAME) insertTag(CalendarData.NAME) insertTag(CalendarData.NAME) { if (contentType != null) attribute(null, CalendarData.CONTENT_TYPE, contentType) if (version != null) attribute(null, CalendarData.VERSION, version) } } for (url in urls) insertTag(HREF) { Loading src/main/kotlin/at/bitfire/dav4jvm/PropertyRegistry.kt +33 −32 Original line number Diff line number Diff line Loading @@ -22,38 +22,39 @@ object PropertyRegistry { private fun registerDefaultFactories() { register(listOf( AddMember.Factory(), AddressbookDescription.Factory(), AddressbookHomeSet.Factory(), AddressData.Factory(), CalendarColor.Factory(), CalendarData.Factory(), CalendarDescription.Factory(), CalendarHomeSet.Factory(), CalendarProxyReadFor.Factory(), CalendarProxyWriteFor.Factory(), CalendarTimezone.Factory(), CalendarUserAddressSet.Factory(), CreationDate.Factory(), CurrentUserPrincipal.Factory(), CurrentUserPrivilegeSet.Factory(), DisplayName.Factory(), GetContentLength.Factory(), GetContentType.Factory(), GetCTag.Factory(), GetETag.Factory(), GetLastModified.Factory(), GroupMembership.Factory(), Owner.Factory(), QuotaAvailableBytes.Factory(), QuotaUsedBytes.Factory(), ResourceType.Factory(), ScheduleTag.Factory(), Source.Factory(), SupportedAddressData.Factory(), SupportedCalendarComponentSet.Factory(), SupportedReportSet.Factory(), SyncToken.Factory() AddMember.Factory, AddressbookDescription.Factory, AddressbookHomeSet.Factory, AddressData.Factory, CalendarColor.Factory, CalendarData.Factory, CalendarDescription.Factory, CalendarHomeSet.Factory, CalendarProxyReadFor.Factory, CalendarProxyWriteFor.Factory, CalendarTimezone.Factory, CalendarUserAddressSet.Factory, CreationDate.Factory, CurrentUserPrincipal.Factory, CurrentUserPrivilegeSet.Factory, DisplayName.Factory, GetContentLength.Factory, GetContentType.Factory, GetCTag.Factory, GetETag.Factory, GetLastModified.Factory, GroupMembership.Factory, Owner.Factory, QuotaAvailableBytes.Factory, QuotaUsedBytes.Factory, ResourceType.Factory, ScheduleTag.Factory, Source.Factory, SupportedAddressData.Factory, SupportedCalendarComponentSet.Factory, SupportedCalendarData.Factory, SupportedReportSet.Factory, SyncToken.Factory )) } Loading src/main/kotlin/at/bitfire/dav4jvm/property/AddMember.kt +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ data class AddMember( val NAME = Property.Name(XmlUtils.NS_WEBDAV, "add-member") } class Factory: PropertyFactory { object Factory: PropertyFactory { override fun getName() = NAME override fun create(parser: XmlPullParser) = Loading Loading
build.gradle.kts +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ group="com.gitlab.bitfireAT" version="2.1.3" plugins { kotlin("jvm") version "1.5.30" kotlin("jvm") version "1.5.31" `maven-publish` id("org.jetbrains.dokka") version "1.5.0" Loading
src/main/kotlin/at/bitfire/dav4jvm/DavAddressBook.kt +2 −2 Original line number Diff line number Diff line Loading @@ -85,9 +85,9 @@ class DavAddressBook @JvmOverloads constructor( * * @param urls list of vCard URLs to be requested * @param contentType MIME type of requested format; may be "text/vcard" for vCard or * "application/vcard+json" for jCard * "application/vcard+json" for jCard. *null*: don't request specific representation type * @param version vCard version subtype of the requested format. Should only be specified together with a [contentType] of "text/vcard". * Currently only useful value: "4.0" for vCard 4. * Currently only useful value: "4.0" for vCard 4. *null*: don't request specific version * @param callback called for every WebDAV response XML element in the result * * @return list of properties which have been received in the Multi-Status response, but Loading
src/main/kotlin/at/bitfire/dav4jvm/DavCalendar.kt +12 −4 Original line number Diff line number Diff line Loading @@ -123,6 +123,9 @@ class DavCalendar @JvmOverloads constructor( * to the callback, whether they are successful (2xx) or not. * * @param urls list of iCalendar URLs to be requested * @param contentType MIME type of requested format; may be "text/calendar" for iCalendar or * "application/calendar+json" for jCard. *null*: don't request specific representation type * @param version Version subtype of the requested format, like "2.0" for iCalendar 2. *null*: don't request specific version * @param callback called for every WebDAV response XML element in the result * * @return list of properties which have been received in the Multi-Status response, but Loading @@ -132,7 +135,7 @@ class DavCalendar @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error */ fun multiget(urls: List<HttpUrl>, callback: DavResponseCallback): List<Property> { fun multiget(urls: List<HttpUrl>, contentType: String? = null, version: String? = null, callback: DavResponseCallback): List<Property> { /* <!ELEMENT calendar-multiget ((DAV:allprop | DAV:propname | DAV:prop)?, DAV:href+)> Loading @@ -148,7 +151,12 @@ class DavCalendar @JvmOverloads constructor( insertTag(GetContentType.NAME) // to determine the character set insertTag(GetETag.NAME) insertTag(ScheduleTag.NAME) insertTag(CalendarData.NAME) insertTag(CalendarData.NAME) { if (contentType != null) attribute(null, CalendarData.CONTENT_TYPE, contentType) if (version != null) attribute(null, CalendarData.VERSION, version) } } for (url in urls) insertTag(HREF) { Loading
src/main/kotlin/at/bitfire/dav4jvm/PropertyRegistry.kt +33 −32 Original line number Diff line number Diff line Loading @@ -22,38 +22,39 @@ object PropertyRegistry { private fun registerDefaultFactories() { register(listOf( AddMember.Factory(), AddressbookDescription.Factory(), AddressbookHomeSet.Factory(), AddressData.Factory(), CalendarColor.Factory(), CalendarData.Factory(), CalendarDescription.Factory(), CalendarHomeSet.Factory(), CalendarProxyReadFor.Factory(), CalendarProxyWriteFor.Factory(), CalendarTimezone.Factory(), CalendarUserAddressSet.Factory(), CreationDate.Factory(), CurrentUserPrincipal.Factory(), CurrentUserPrivilegeSet.Factory(), DisplayName.Factory(), GetContentLength.Factory(), GetContentType.Factory(), GetCTag.Factory(), GetETag.Factory(), GetLastModified.Factory(), GroupMembership.Factory(), Owner.Factory(), QuotaAvailableBytes.Factory(), QuotaUsedBytes.Factory(), ResourceType.Factory(), ScheduleTag.Factory(), Source.Factory(), SupportedAddressData.Factory(), SupportedCalendarComponentSet.Factory(), SupportedReportSet.Factory(), SyncToken.Factory() AddMember.Factory, AddressbookDescription.Factory, AddressbookHomeSet.Factory, AddressData.Factory, CalendarColor.Factory, CalendarData.Factory, CalendarDescription.Factory, CalendarHomeSet.Factory, CalendarProxyReadFor.Factory, CalendarProxyWriteFor.Factory, CalendarTimezone.Factory, CalendarUserAddressSet.Factory, CreationDate.Factory, CurrentUserPrincipal.Factory, CurrentUserPrivilegeSet.Factory, DisplayName.Factory, GetContentLength.Factory, GetContentType.Factory, GetCTag.Factory, GetETag.Factory, GetLastModified.Factory, GroupMembership.Factory, Owner.Factory, QuotaAvailableBytes.Factory, QuotaUsedBytes.Factory, ResourceType.Factory, ScheduleTag.Factory, Source.Factory, SupportedAddressData.Factory, SupportedCalendarComponentSet.Factory, SupportedCalendarData.Factory, SupportedReportSet.Factory, SyncToken.Factory )) } Loading
src/main/kotlin/at/bitfire/dav4jvm/property/AddMember.kt +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ data class AddMember( val NAME = Property.Name(XmlUtils.NS_WEBDAV, "add-member") } class Factory: PropertyFactory { object Factory: PropertyFactory { override fun getName() = NAME override fun create(parser: XmlPullParser) = Loading