mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-27 12:00:03 +03:00
Create tag interface AccountDataContent
This commit is contained in:
parent
2d6f57e214
commit
446d826dd3
3 changed files with 26 additions and 2 deletions
|
@ -19,6 +19,7 @@ package im.vector.matrix.android.api.session.securestorage
|
|||
import com.squareup.moshi.Json
|
||||
import com.squareup.moshi.JsonClass
|
||||
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.
|
||||
|
@ -32,7 +33,7 @@ data class EncryptedSecretContent(
|
|||
@Json(name = "ciphertext") val ciphertext: String? = null,
|
||||
@Json(name = "mac") val mac: String? = null,
|
||||
@Json(name = "ephemeral") val ephemeral: String? = null
|
||||
) {
|
||||
) : AccountDataContent {
|
||||
companion object {
|
||||
/**
|
||||
* 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
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -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 a new issue