Wire incoming call policy and caller continuation through JNI
This commit is contained in:
1 parent
7d5399cd62
commit
4cebd0be54
3 files changed
+8
-8
No files matched your search
@@ -3,7 +3,7 @@ package com.utun.chat.data
|
||||
import com.utun.chat.R
|
||||
|
||||
/** Состояние единственной звонковой сессии; не зависит от Activity или ViewModel. */
|
||||
enum class CallPhase { NONE, OUTGOING, RINGING, INCOMING, ACTIVE, ENDED }
|
||||
enum class CallPhase { NONE, OUTGOING, RINGING, INCOMING, ACTIVE, ENDED, WAIT_DECISION, PENDING_INCOMING }
|
||||
|
||||
/** Значения CONN_TYPE_* общего ядра. */
|
||||
enum class CallConnectionType(val labelRes: Int) {
|
||||
|
||||
@@ -271,7 +271,7 @@ object NativeLib {
|
||||
fun callDecline(callId: Long) { nativeCallDecline(callId) }
|
||||
fun callHangup(callId: Long) { nativeCallHangup(callId) }
|
||||
fun callContinue(callId: Long) { nativeCallContinue(callId) }
|
||||
fun setPhoneState(state: Int) { nativeSetPhoneState(state) }
|
||||
fun setPhoneState(state: Int, policy: Int) { nativeSetPhoneState(state, policy) }
|
||||
fun callIsOnline(channelId: String, peerNodeId: Long): Boolean = nativeCallIsOnline(channelId, peerNodeId)
|
||||
/* action: radio_call_action, результат — CHAT_EVT_RADIO_CALL (65). */
|
||||
fun radioCall(id: Long, action: Int, group: Long = 0, peer: Long = 0): Boolean = nativeRadioCall(id, group, peer, action)
|
||||
@@ -419,7 +419,7 @@ object NativeLib {
|
||||
private external fun nativeCallDecline(callId: Long)
|
||||
private external fun nativeCallHangup(callId: Long)
|
||||
private external fun nativeCallContinue(callId: Long)
|
||||
private external fun nativeSetPhoneState(state: Int)
|
||||
private external fun nativeSetPhoneState(state: Int, policy: Int)
|
||||
private external fun nativeCallIsOnline(channelId: String, peerNodeId: Long): Boolean
|
||||
private external fun nativeCallAudioStart(callId: Long): Boolean
|
||||
private external fun nativeCallAudioFeed(callId: Long, samples: ShortArray, capturePtsUs: Long): Boolean
|
||||
|
||||
Reference in new issue
Block a user