mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-21 02:01:03 +07:00
080e1d98c6
* Add Quick Settings tile - Add multi-client support to AmneziaVpnService - Make AmneziaActivity permanently connected to AmneziaVpnService while it is running - Refactor processing of connection state changes on qt side - Add VpnState DataStore - Add check if AmneziaVpnService is running * Add tile reset when the server is removed from the application
28 lines
849 B
Kotlin
28 lines
849 B
Kotlin
package org.amnezia.vpn.qt
|
|
|
|
import org.amnezia.vpn.protocol.ProtocolState
|
|
import org.amnezia.vpn.protocol.Status
|
|
|
|
/**
|
|
* JNI functions of the AndroidController class from android_controller.cpp,
|
|
* called by events in the Android part of the client
|
|
*/
|
|
object QtAndroidController {
|
|
|
|
fun onStatus(status: Status) = onStatus(status.state)
|
|
fun onStatus(protocolState: ProtocolState) = onStatus(protocolState.ordinal)
|
|
|
|
external fun onStatus(stateCode: Int)
|
|
external fun onServiceDisconnected()
|
|
external fun onServiceError()
|
|
|
|
external fun onVpnPermissionRejected()
|
|
external fun onVpnStateChanged(stateCode: Int)
|
|
external fun onStatisticsUpdate(rxBytes: Long, txBytes: Long)
|
|
|
|
external fun onFileOpened(uri: String)
|
|
|
|
external fun onConfigImported(data: String)
|
|
|
|
external fun decodeQrCode(data: String): Boolean
|
|
} |