Loading src/main/java/at/bitfire/dav4android/PropertyUtils.kt 0 → 100644 +27 −0 Original line number Diff line number Diff line /* * 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 import at.bitfire.dav4android.property.* object PropertyUtils { fun getAllPropSet(): Array<Property.Name>{ return arrayOf( DisplayName.NAME, GetContentType.NAME, ResourceType.NAME, GetContentLength.NAME, GetLastModified.NAME, CreationDate.NAME, GetETag.NAME, QuotaUsedBytes.NAME, QuotaAvailableBytes.NAME ); } } No newline at end of file src/main/java/at/bitfire/dav4android/property/CreationDate.kt 0 → 100644 +34 −0 Original line number Diff line number Diff line /* * 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.PropertyFactory import at.bitfire.dav4android.XmlUtils import org.xmlpull.v1.XmlPullParser data class CreationDate( var creationDate: String ): Property { companion object { @JvmField val NAME = Property.Name(XmlUtils.NS_WEBDAV, "creationdate") } class Factory: PropertyFactory { override fun getName() = NAME override fun create(parser: XmlPullParser): CreationDate? { XmlUtils.readText(parser)?.let { it -> return CreationDate(it) } return null } } } No newline at end of file src/main/java/at/bitfire/dav4android/property/GetContentLength.kt 0 → 100644 +38 −0 Original line number Diff line number Diff line /* * 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 */ /** * @author David González Verdugo */ package at.bitfire.dav4android.property import at.bitfire.dav4android.Property import at.bitfire.dav4android.PropertyFactory import at.bitfire.dav4android.XmlUtils import org.xmlpull.v1.XmlPullParser data class GetContentLength( val contentLength: Long ) : Property { companion object { @JvmField val NAME = Property.Name(XmlUtils.NS_WEBDAV, "getcontentlength") } class Factory : PropertyFactory { override fun getName() = NAME override fun create(parser: XmlPullParser): GetContentLength? { XmlUtils.readText(parser)?.let { return GetContentLength(it.toLong()) } return null } } } No newline at end of file src/main/java/at/bitfire/dav4android/property/QuotaAvailableBytes.kt 0 → 100644 +38 −0 Original line number Diff line number Diff line /* * 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 */ /** * @author David González Verdugo */ package at.bitfire.dav4android.property import at.bitfire.dav4android.Property import at.bitfire.dav4android.PropertyFactory import at.bitfire.dav4android.XmlUtils import org.xmlpull.v1.XmlPullParser data class QuotaAvailableBytes( val quotaAvailableBytes: Long ) : Property { companion object { @JvmField val NAME = Property.Name(XmlUtils.NS_WEBDAV, "quota-available-bytes") } class Factory : PropertyFactory { override fun getName() = NAME override fun create(parser: XmlPullParser): QuotaAvailableBytes? { XmlUtils.readText(parser)?.let { return QuotaAvailableBytes(it.toLong()) } return null } } } No newline at end of file src/main/java/at/bitfire/dav4android/property/QuotaUsedBytes.kt 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * 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 */ /** * @author David González Verdugo */ package at.bitfire.dav4android.property import at.bitfire.dav4android.Property import at.bitfire.dav4android.PropertyFactory import at.bitfire.dav4android.XmlUtils import org.xmlpull.v1.XmlPullParser data class QuotaUsedBytes( val quotaUsedBytes: Long ) : Property { companion object { @JvmField val NAME = Property.Name(XmlUtils.NS_WEBDAV, "quota-used-bytes") } class Factory : PropertyFactory { override fun getName() = NAME override fun create(parser: XmlPullParser): QuotaUsedBytes? { XmlUtils.readText(parser)?.let { return QuotaUsedBytes(it.toLong()) } return null } } } No newline at end of file Loading
src/main/java/at/bitfire/dav4android/PropertyUtils.kt 0 → 100644 +27 −0 Original line number Diff line number Diff line /* * 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 import at.bitfire.dav4android.property.* object PropertyUtils { fun getAllPropSet(): Array<Property.Name>{ return arrayOf( DisplayName.NAME, GetContentType.NAME, ResourceType.NAME, GetContentLength.NAME, GetLastModified.NAME, CreationDate.NAME, GetETag.NAME, QuotaUsedBytes.NAME, QuotaAvailableBytes.NAME ); } } No newline at end of file
src/main/java/at/bitfire/dav4android/property/CreationDate.kt 0 → 100644 +34 −0 Original line number Diff line number Diff line /* * 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.PropertyFactory import at.bitfire.dav4android.XmlUtils import org.xmlpull.v1.XmlPullParser data class CreationDate( var creationDate: String ): Property { companion object { @JvmField val NAME = Property.Name(XmlUtils.NS_WEBDAV, "creationdate") } class Factory: PropertyFactory { override fun getName() = NAME override fun create(parser: XmlPullParser): CreationDate? { XmlUtils.readText(parser)?.let { it -> return CreationDate(it) } return null } } } No newline at end of file
src/main/java/at/bitfire/dav4android/property/GetContentLength.kt 0 → 100644 +38 −0 Original line number Diff line number Diff line /* * 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 */ /** * @author David González Verdugo */ package at.bitfire.dav4android.property import at.bitfire.dav4android.Property import at.bitfire.dav4android.PropertyFactory import at.bitfire.dav4android.XmlUtils import org.xmlpull.v1.XmlPullParser data class GetContentLength( val contentLength: Long ) : Property { companion object { @JvmField val NAME = Property.Name(XmlUtils.NS_WEBDAV, "getcontentlength") } class Factory : PropertyFactory { override fun getName() = NAME override fun create(parser: XmlPullParser): GetContentLength? { XmlUtils.readText(parser)?.let { return GetContentLength(it.toLong()) } return null } } } No newline at end of file
src/main/java/at/bitfire/dav4android/property/QuotaAvailableBytes.kt 0 → 100644 +38 −0 Original line number Diff line number Diff line /* * 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 */ /** * @author David González Verdugo */ package at.bitfire.dav4android.property import at.bitfire.dav4android.Property import at.bitfire.dav4android.PropertyFactory import at.bitfire.dav4android.XmlUtils import org.xmlpull.v1.XmlPullParser data class QuotaAvailableBytes( val quotaAvailableBytes: Long ) : Property { companion object { @JvmField val NAME = Property.Name(XmlUtils.NS_WEBDAV, "quota-available-bytes") } class Factory : PropertyFactory { override fun getName() = NAME override fun create(parser: XmlPullParser): QuotaAvailableBytes? { XmlUtils.readText(parser)?.let { return QuotaAvailableBytes(it.toLong()) } return null } } } No newline at end of file
src/main/java/at/bitfire/dav4android/property/QuotaUsedBytes.kt 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * 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 */ /** * @author David González Verdugo */ package at.bitfire.dav4android.property import at.bitfire.dav4android.Property import at.bitfire.dav4android.PropertyFactory import at.bitfire.dav4android.XmlUtils import org.xmlpull.v1.XmlPullParser data class QuotaUsedBytes( val quotaUsedBytes: Long ) : Property { companion object { @JvmField val NAME = Property.Name(XmlUtils.NS_WEBDAV, "quota-used-bytes") } class Factory : PropertyFactory { override fun getName() = NAME override fun create(parser: XmlPullParser): QuotaUsedBytes? { XmlUtils.readText(parser)?.let { return QuotaUsedBytes(it.toLong()) } return null } } } No newline at end of file