Renamed room transport classes
This commit is contained in:
parent
d0addc4c4f
commit
a758efc018
|
@ -15,7 +15,6 @@
|
||||||
*/
|
*/
|
||||||
package im.vector.matrix.android.internal.crypto.verification
|
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
|
import im.vector.matrix.android.api.session.crypto.sas.VerificationTransaction
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,7 +26,7 @@ internal abstract class DefaultVerificationTransaction(
|
||||||
override var otherDeviceId: String? = null,
|
override var otherDeviceId: String? = null,
|
||||||
override val isIncoming: Boolean) : VerificationTransaction {
|
override val isIncoming: Boolean) : VerificationTransaction {
|
||||||
|
|
||||||
lateinit var transport: SasTransport
|
lateinit var transport: VerificationTransport
|
||||||
|
|
||||||
interface Listener {
|
interface Listener {
|
||||||
fun transactionUpdated(tx: VerificationTransaction)
|
fun transactionUpdated(tx: VerificationTransaction)
|
||||||
|
|
|
@ -204,7 +204,7 @@ internal abstract class SASDefaultVerificationTransaction(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun isToDeviceTransport(): Boolean {
|
override fun isToDeviceTransport(): Boolean {
|
||||||
return transport is SasTransportToDevice
|
return transport is VerificationTransportToDevice
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun acceptVerificationEvent(senderId: String, info: VerificationInfo) {
|
override fun acceptVerificationEvent(senderId: String, info: VerificationInfo) {
|
||||||
|
|
|
@ -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.
|
* SAS verification can be performed using toDevice events or via DM.
|
||||||
* This class abstracts the concept of transport for SAS
|
* This class abstracts the concept of transport for SAS
|
||||||
*/
|
*/
|
||||||
internal interface SasTransport {
|
internal interface VerificationTransport {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a message
|
* Sends a message
|
|
@ -39,7 +39,7 @@ import java.util.*
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
internal class SasTransportRoomMessage(
|
internal class VerificationTransportRoomMessage(
|
||||||
private val workManagerProvider: WorkManagerProvider,
|
private val workManagerProvider: WorkManagerProvider,
|
||||||
private val stringProvider: StringProvider,
|
private val stringProvider: StringProvider,
|
||||||
private val sessionId: String,
|
private val sessionId: String,
|
||||||
|
@ -49,7 +49,7 @@ internal class SasTransportRoomMessage(
|
||||||
private val monarchy: Monarchy,
|
private val monarchy: Monarchy,
|
||||||
private val localEchoEventFactory: LocalEchoEventFactory,
|
private val localEchoEventFactory: LocalEchoEventFactory,
|
||||||
private val tx: DefaultVerificationTransaction?
|
private val tx: DefaultVerificationTransaction?
|
||||||
) : SasTransport {
|
) : VerificationTransport {
|
||||||
|
|
||||||
override fun sendToOther(type: String,
|
override fun sendToOther(type: String,
|
||||||
verificationInfo: VerificationInfo,
|
verificationInfo: VerificationInfo,
|
||||||
|
@ -304,7 +304,7 @@ internal class SasTransportRoomMessageFactory @Inject constructor(
|
||||||
private val deviceId: String?,
|
private val deviceId: String?,
|
||||||
private val localEchoEventFactory: LocalEchoEventFactory) {
|
private val localEchoEventFactory: LocalEchoEventFactory) {
|
||||||
|
|
||||||
fun createTransport(roomId: String, tx: DefaultVerificationTransaction?): SasTransportRoomMessage {
|
fun createTransport(roomId: String, tx: DefaultVerificationTransaction?): VerificationTransportRoomMessage {
|
||||||
return SasTransportRoomMessage(workManagerProvider, stringProvider, sessionId, userId, deviceId, roomId, monarchy, localEchoEventFactory, tx)
|
return VerificationTransportRoomMessage(workManagerProvider, stringProvider, sessionId, userId, deviceId, roomId, monarchy, localEchoEventFactory, tx)
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -28,11 +28,11 @@ import im.vector.matrix.android.internal.task.configureWith
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
internal class SasTransportToDevice(
|
internal class VerificationTransportToDevice(
|
||||||
private var tx: DefaultVerificationTransaction?,
|
private var tx: DefaultVerificationTransaction?,
|
||||||
private var sendToDeviceTask: SendToDeviceTask,
|
private var sendToDeviceTask: SendToDeviceTask,
|
||||||
private var taskExecutor: TaskExecutor
|
private var taskExecutor: TaskExecutor
|
||||||
) : SasTransport {
|
) : VerificationTransport {
|
||||||
|
|
||||||
override fun sendVerificationRequest(supportedMethods: List<String>,
|
override fun sendVerificationRequest(supportedMethods: List<String>,
|
||||||
localID: String,
|
localID: String,
|
||||||
|
@ -149,7 +149,7 @@ internal class SasTransportToDeviceFactory @Inject constructor(
|
||||||
private val sendToDeviceTask: SendToDeviceTask,
|
private val sendToDeviceTask: SendToDeviceTask,
|
||||||
private val taskExecutor: TaskExecutor) {
|
private val taskExecutor: TaskExecutor) {
|
||||||
|
|
||||||
fun createTransport(tx: DefaultVerificationTransaction?): SasTransportToDevice {
|
fun createTransport(tx: DefaultVerificationTransaction?): VerificationTransportToDevice {
|
||||||
return SasTransportToDevice(tx, sendToDeviceTask, taskExecutor)
|
return VerificationTransportToDevice(tx, sendToDeviceTask, taskExecutor)
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue