mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
37 lines
1.1 KiB
Kotlin
37 lines
1.1 KiB
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 onNotificationStateChanged()
|
|
external fun onVpnStateChanged(stateCode: Int)
|
|
external fun onStatisticsUpdate(rxBytes: Long, txBytes: Long)
|
|
|
|
external fun onFileOpened(uri: String)
|
|
|
|
external fun onConfigImported(data: String)
|
|
|
|
external fun onAuthResult(result: Boolean)
|
|
|
|
external fun decodeQrCode(data: String): Boolean
|
|
|
|
external fun onImeInsetsChanged(heightDp: Int)
|
|
external fun onSystemBarsInsetsChanged(navBarHeightDp: Int, statusBarHeightDp: Int)
|
|
|
|
external fun onActivityPaused()
|
|
external fun onActivityResumed()
|
|
} |