Renamed room transport classes

This commit is contained in:
Valere 2020-01-24 11:32:24 +01:00
parent d0addc4c4f
commit a758efc018
5 changed files with 11 additions and 12 deletions

View file

@ -15,7 +15,6 @@
*/
package im.vector.matrix.android.internal.crypto.verification
import im.vector.matrix.android.api.session.crypto.sas.CancelCode
import im.vector.matrix.android.api.session.crypto.sas.VerificationTransaction
/**
@ -27,7 +26,7 @@ internal abstract class DefaultVerificationTransaction(
override var otherDeviceId: String? = null,
override val isIncoming: Boolean) : VerificationTransaction {
lateinit var transport: SasTransport
lateinit var transport: VerificationTransport
interface Listener {
fun transactionUpdated(tx: VerificationTransaction)

View file

@ -204,7 +204,7 @@ internal abstract class SASDefaultVerificationTransaction(
}
override fun isToDeviceTransport(): Boolean {
return transport is SasTransportToDevice
return transport is VerificationTransportToDevice
}
override fun acceptVerificationEvent(senderId: String, info: VerificationInfo) {

View file

@ -23,7 +23,7 @@ import im.vector.matrix.android.api.session.room.model.message.MessageVerificati
* SAS verification can be performed using toDevice events or via DM.
* This class abstracts the concept of transport for SAS
*/
internal interface SasTransport {
internal interface VerificationTransport {
/**
* Sends a message

View file

@ -39,7 +39,7 @@ import java.util.*
import java.util.concurrent.TimeUnit
import javax.inject.Inject
internal class SasTransportRoomMessage(
internal class VerificationTransportRoomMessage(
private val workManagerProvider: WorkManagerProvider,
private val stringProvider: StringProvider,
private val sessionId: String,
@ -49,7 +49,7 @@ internal class SasTransportRoomMessage(
private val monarchy: Monarchy,
private val localEchoEventFactory: LocalEchoEventFactory,
private val tx: DefaultVerificationTransaction?
) : SasTransport {
) : VerificationTransport {
override fun sendToOther(type: String,
verificationInfo: VerificationInfo,
@ -304,7 +304,7 @@ internal class SasTransportRoomMessageFactory @Inject constructor(
private val deviceId: String?,
private val localEchoEventFactory: LocalEchoEventFactory) {
fun createTransport(roomId: String, tx: DefaultVerificationTransaction?): SasTransportRoomMessage {
return SasTransportRoomMessage(workManagerProvider, stringProvider, sessionId, userId, deviceId, roomId, monarchy, localEchoEventFactory, tx)
fun createTransport(roomId: String, tx: DefaultVerificationTransaction?): VerificationTransportRoomMessage {
return VerificationTransportRoomMessage(workManagerProvider, stringProvider, sessionId, userId, deviceId, roomId, monarchy, localEchoEventFactory, tx)
}
}

View file

@ -28,11 +28,11 @@ import im.vector.matrix.android.internal.task.configureWith
import timber.log.Timber
import javax.inject.Inject
internal class SasTransportToDevice(
internal class VerificationTransportToDevice(
private var tx: DefaultVerificationTransaction?,
private var sendToDeviceTask: SendToDeviceTask,
private var taskExecutor: TaskExecutor
) : SasTransport {
) : VerificationTransport {
override fun sendVerificationRequest(supportedMethods: List<String>,
localID: String,
@ -149,7 +149,7 @@ internal class SasTransportToDeviceFactory @Inject constructor(
private val sendToDeviceTask: SendToDeviceTask,
private val taskExecutor: TaskExecutor) {
fun createTransport(tx: DefaultVerificationTransaction?): SasTransportToDevice {
return SasTransportToDevice(tx, sendToDeviceTask, taskExecutor)
fun createTransport(tx: DefaultVerificationTransaction?): VerificationTransportToDevice {
return VerificationTransportToDevice(tx, sendToDeviceTask, taskExecutor)
}
}