Create tag interface AccountDataContent
This commit is contained in:
parent
2d6f57e214
commit
446d826dd3
|
@ -19,6 +19,7 @@ package im.vector.matrix.android.api.session.securestorage
|
||||||
import com.squareup.moshi.Json
|
import com.squareup.moshi.Json
|
||||||
import com.squareup.moshi.JsonClass
|
import com.squareup.moshi.JsonClass
|
||||||
import im.vector.matrix.android.internal.di.MoshiProvider
|
import im.vector.matrix.android.internal.di.MoshiProvider
|
||||||
|
import im.vector.matrix.android.internal.session.user.accountdata.AccountDataContent
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The account_data will have an encrypted property that is a map from key ID to an object.
|
* The account_data will have an encrypted property that is a map from key ID to an object.
|
||||||
|
@ -32,7 +33,7 @@ data class EncryptedSecretContent(
|
||||||
@Json(name = "ciphertext") val ciphertext: String? = null,
|
@Json(name = "ciphertext") val ciphertext: String? = null,
|
||||||
@Json(name = "mac") val mac: String? = null,
|
@Json(name = "mac") val mac: String? = null,
|
||||||
@Json(name = "ephemeral") val ephemeral: String? = null
|
@Json(name = "ephemeral") val ephemeral: String? = null
|
||||||
) {
|
) : AccountDataContent {
|
||||||
companion object {
|
companion object {
|
||||||
/**
|
/**
|
||||||
* Facility method to convert from object which must be comprised of maps, lists,
|
* Facility method to convert from object which must be comprised of maps, lists,
|
||||||
|
|
|
@ -17,8 +17,9 @@
|
||||||
package im.vector.matrix.android.internal.session.sync.model.accountdata
|
package im.vector.matrix.android.internal.session.sync.model.accountdata
|
||||||
|
|
||||||
import com.squareup.moshi.Json
|
import com.squareup.moshi.Json
|
||||||
|
import im.vector.matrix.android.internal.session.user.accountdata.AccountDataContent
|
||||||
|
|
||||||
abstract class UserAccountData {
|
abstract class UserAccountData : AccountDataContent {
|
||||||
|
|
||||||
@Json(name = "type") abstract val type: String
|
@Json(name = "type") abstract val type: String
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 New Vector Ltd
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package im.vector.matrix.android.internal.session.user.accountdata
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tag class to identify every account data content
|
||||||
|
*/
|
||||||
|
internal interface AccountDataContent
|
Loading…
Reference in New Issue