Commit c6dea84c authored by davigonz's avatar davigonz

Include CreationDate, GetContentLength and quota properties

parent 8f7b0821
/*
* 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
/*
* 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
/*
* 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
/*
* 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
/*
* 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
......@@ -9,14 +9,18 @@ at.bitfire.dav4android.property.CalendarProxyReadFor$Factory
at.bitfire.dav4android.property.CalendarProxyWriteFor$Factory
at.bitfire.dav4android.property.CalendarTimezone$Factory
at.bitfire.dav4android.property.CalendarUserAddressSet$Factory
at.bitfire.dav4android.property.CreationDate$Factory
at.bitfire.dav4android.property.CurrentUserPrincipal$Factory
at.bitfire.dav4android.property.CurrentUserPrivilegeSet$Factory
at.bitfire.dav4android.property.DisplayName$Factory
at.bitfire.dav4android.property.GetContentLength$Factory
at.bitfire.dav4android.property.GetContentType$Factory
at.bitfire.dav4android.property.GetCTag$Factory
at.bitfire.dav4android.property.GetETag$Factory
at.bitfire.dav4android.property.GetLastModified$Factory
at.bitfire.dav4android.property.GroupMembership$Factory
at.bitfire.dav4android.property.QuotaAvailableBytes$Factory
at.bitfire.dav4android.property.QuotaUsedBytes$Factory
at.bitfire.dav4android.property.ResourceType$Factory
at.bitfire.dav4android.property.Source$Factory
at.bitfire.dav4android.property.SupportedAddressData$Factory
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment