Loading src/main/kotlin/at/bitfire/dav4jvm/DavAddressBook.kt +1 −6 Original line number Diff line number Diff line Loading @@ -104,12 +104,7 @@ class DavAddressBook @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error */ fun multiget( urls: List<HttpUrl>, contentType: String? = null, version: String? = null, callback: MultiResponseCallback ): List<Property> { fun multiget(urls: List<HttpUrl>, contentType: String? = null, version: String? = null, callback: MultiResponseCallback): List<Property> { /* <!ELEMENT addressbook-multiget ((DAV:allprop | DAV:propname | DAV:prop)?, Loading src/main/kotlin/at/bitfire/dav4jvm/DavCalendar.kt +8 −22 Original line number Diff line number Diff line Loading @@ -67,12 +67,7 @@ class DavCalendar @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error */ fun calendarQuery( component: String, start: Instant?, end: Instant?, callback: MultiResponseCallback ): List<Property> { fun calendarQuery(component: String, start: Instant?, end: Instant?, callback: MultiResponseCallback): List<Property> { /* <!ELEMENT calendar-query ((DAV:allprop | DAV:propname | DAV:prop)?, filter, timezone?)> Loading Loading @@ -102,17 +97,13 @@ class DavCalendar @JvmOverloads constructor( if (start != null || end != null) { insertTag(TIME_RANGE) { if (start != null) attribute( null, TIME_RANGE_START, timeFormatUTC.format( attribute(null, TIME_RANGE_START, timeFormatUTC.format( ZonedDateTime.ofInstant(start, ZoneOffset.UTC) ) ) )) if (end != null) attribute( null, TIME_RANGE_END, timeFormatUTC.format( attribute(null, TIME_RANGE_END, timeFormatUTC.format( ZonedDateTime.ofInstant(end, ZoneOffset.UTC) ) ) )) } } } Loading Loading @@ -155,12 +146,7 @@ class DavCalendar @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error */ fun multiget( urls: List<HttpUrl>, contentType: String? = null, version: String? = null, callback: MultiResponseCallback ): List<Property> { fun multiget(urls: List<HttpUrl>, contentType: String? = null, version: String? = null, callback: MultiResponseCallback): List<Property> { /* <!ELEMENT calendar-multiget ((DAV:allprop | DAV:propname | DAV:prop)?, DAV:href+)> Loading src/main/kotlin/at/bitfire/dav4jvm/DavCollection.kt +1 −7 Original line number Diff line number Diff line Loading @@ -77,13 +77,7 @@ open class DavCollection @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error */ fun reportChanges( syncToken: String?, infiniteDepth: Boolean, limit: Int?, vararg properties: Property.Name, callback: MultiResponseCallback ): List<Property> { fun reportChanges(syncToken: String?, infiniteDepth: Boolean, limit: Int?, vararg properties: Property.Name, callback: MultiResponseCallback): List<Property> { /* <!ELEMENT sync-collection (sync-token, sync-level, limit?, prop)> <!ELEMENT sync-token CDATA> <!-- Text MUST be a URI --> Loading src/main/kotlin/at/bitfire/dav4jvm/DavResource.kt +5 −24 Original line number Diff line number Diff line Loading @@ -384,13 +384,7 @@ open class DavResource @JvmOverloads constructor( * @throws DavException on high-level errors */ @Throws(IOException::class, HttpException::class) fun getRange( accept: String, offset: Long, size: Int, headers: Headers? = null, callback: ResponseCallback ) { fun getRange(accept: String, offset: Long, size: Int, headers: Headers? = null, callback: ResponseCallback) { followRedirects { val request = Request.Builder() .get() Loading Loading @@ -431,13 +425,7 @@ open class DavResource @JvmOverloads constructor( * @throws DavException on HTTPS -> HTTP redirect */ @Throws(IOException::class, HttpException::class) fun put( body: RequestBody, ifETag: String? = null, ifScheduleTag: String? = null, ifNoneMatch: Boolean = false, callback: ResponseCallback ) { fun put(body: RequestBody, ifETag: String? = null, ifScheduleTag: String? = null, ifNoneMatch: Boolean = false, callback: ResponseCallback) { followRedirects { val builder = Request.Builder() .put(body) Loading Loading @@ -633,7 +621,6 @@ open class DavResource @JvmOverloads constructor( } } // status handling /** Loading Loading @@ -775,10 +762,7 @@ open class DavResource @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error (for instance, when the response is not a Multi-Status response) */ protected fun processMultiStatus( response: Response, callback: MultiResponseCallback ): List<Property> { protected fun processMultiStatus(response: Response, callback: MultiResponseCallback): List<Property> { checkStatus(response) assertMultiStatus(response) response.body!!.use { Loading @@ -799,10 +783,7 @@ open class DavResource @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error (like an invalid XML response) */ protected fun processMultiStatus( reader: Reader, callback: MultiResponseCallback ): List<Property> { protected fun processMultiStatus(reader: Reader, callback: MultiResponseCallback): List<Property> { val responseProperties = mutableListOf<Property>() val parser = XmlUtils.newPullParser() Loading Loading
src/main/kotlin/at/bitfire/dav4jvm/DavAddressBook.kt +1 −6 Original line number Diff line number Diff line Loading @@ -104,12 +104,7 @@ class DavAddressBook @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error */ fun multiget( urls: List<HttpUrl>, contentType: String? = null, version: String? = null, callback: MultiResponseCallback ): List<Property> { fun multiget(urls: List<HttpUrl>, contentType: String? = null, version: String? = null, callback: MultiResponseCallback): List<Property> { /* <!ELEMENT addressbook-multiget ((DAV:allprop | DAV:propname | DAV:prop)?, Loading
src/main/kotlin/at/bitfire/dav4jvm/DavCalendar.kt +8 −22 Original line number Diff line number Diff line Loading @@ -67,12 +67,7 @@ class DavCalendar @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error */ fun calendarQuery( component: String, start: Instant?, end: Instant?, callback: MultiResponseCallback ): List<Property> { fun calendarQuery(component: String, start: Instant?, end: Instant?, callback: MultiResponseCallback): List<Property> { /* <!ELEMENT calendar-query ((DAV:allprop | DAV:propname | DAV:prop)?, filter, timezone?)> Loading Loading @@ -102,17 +97,13 @@ class DavCalendar @JvmOverloads constructor( if (start != null || end != null) { insertTag(TIME_RANGE) { if (start != null) attribute( null, TIME_RANGE_START, timeFormatUTC.format( attribute(null, TIME_RANGE_START, timeFormatUTC.format( ZonedDateTime.ofInstant(start, ZoneOffset.UTC) ) ) )) if (end != null) attribute( null, TIME_RANGE_END, timeFormatUTC.format( attribute(null, TIME_RANGE_END, timeFormatUTC.format( ZonedDateTime.ofInstant(end, ZoneOffset.UTC) ) ) )) } } } Loading Loading @@ -155,12 +146,7 @@ class DavCalendar @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error */ fun multiget( urls: List<HttpUrl>, contentType: String? = null, version: String? = null, callback: MultiResponseCallback ): List<Property> { fun multiget(urls: List<HttpUrl>, contentType: String? = null, version: String? = null, callback: MultiResponseCallback): List<Property> { /* <!ELEMENT calendar-multiget ((DAV:allprop | DAV:propname | DAV:prop)?, DAV:href+)> Loading
src/main/kotlin/at/bitfire/dav4jvm/DavCollection.kt +1 −7 Original line number Diff line number Diff line Loading @@ -77,13 +77,7 @@ open class DavCollection @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error */ fun reportChanges( syncToken: String?, infiniteDepth: Boolean, limit: Int?, vararg properties: Property.Name, callback: MultiResponseCallback ): List<Property> { fun reportChanges(syncToken: String?, infiniteDepth: Boolean, limit: Int?, vararg properties: Property.Name, callback: MultiResponseCallback): List<Property> { /* <!ELEMENT sync-collection (sync-token, sync-level, limit?, prop)> <!ELEMENT sync-token CDATA> <!-- Text MUST be a URI --> Loading
src/main/kotlin/at/bitfire/dav4jvm/DavResource.kt +5 −24 Original line number Diff line number Diff line Loading @@ -384,13 +384,7 @@ open class DavResource @JvmOverloads constructor( * @throws DavException on high-level errors */ @Throws(IOException::class, HttpException::class) fun getRange( accept: String, offset: Long, size: Int, headers: Headers? = null, callback: ResponseCallback ) { fun getRange(accept: String, offset: Long, size: Int, headers: Headers? = null, callback: ResponseCallback) { followRedirects { val request = Request.Builder() .get() Loading Loading @@ -431,13 +425,7 @@ open class DavResource @JvmOverloads constructor( * @throws DavException on HTTPS -> HTTP redirect */ @Throws(IOException::class, HttpException::class) fun put( body: RequestBody, ifETag: String? = null, ifScheduleTag: String? = null, ifNoneMatch: Boolean = false, callback: ResponseCallback ) { fun put(body: RequestBody, ifETag: String? = null, ifScheduleTag: String? = null, ifNoneMatch: Boolean = false, callback: ResponseCallback) { followRedirects { val builder = Request.Builder() .put(body) Loading Loading @@ -633,7 +621,6 @@ open class DavResource @JvmOverloads constructor( } } // status handling /** Loading Loading @@ -775,10 +762,7 @@ open class DavResource @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error (for instance, when the response is not a Multi-Status response) */ protected fun processMultiStatus( response: Response, callback: MultiResponseCallback ): List<Property> { protected fun processMultiStatus(response: Response, callback: MultiResponseCallback): List<Property> { checkStatus(response) assertMultiStatus(response) response.body!!.use { Loading @@ -799,10 +783,7 @@ open class DavResource @JvmOverloads constructor( * @throws HttpException on HTTP error * @throws DavException on WebDAV error (like an invalid XML response) */ protected fun processMultiStatus( reader: Reader, callback: MultiResponseCallback ): List<Property> { protected fun processMultiStatus(reader: Reader, callback: MultiResponseCallback): List<Property> { val responseProperties = mutableListOf<Property>() val parser = XmlUtils.newPullParser() Loading