CoreDelegate
public protocol CoreDelegate : AnyObject
Undocumented
-
onGlobalStateChanged(core:
Default implementationstate: message: ) Global state notification callback.
Default Implementation
Declaration
Swift
func onGlobalStateChanged(core: Core, state: GlobalState, message: String)
Parameters
core
the LinphoneCore.
state
the LinphoneGlobalState
message
informational message.
-
onRegistrationStateChanged(core:
Default implementationproxyConfig: state: message: ) Registration state notification callback prototype.
Default Implementation
Declaration
Swift
func onRegistrationStateChanged(core: Core, proxyConfig: ProxyConfig, state: RegistrationState, message: String)
Parameters
core
the LinphoneCore
proxyConfig
the LinphoneProxyConfig which state has changed
state
the current LinphoneRegistrationState
message
a non nil informational message about the state
-
onCallStateChanged(core:
Default implementationcall: state: message: ) Call state notification callback.
Default Implementation
Declaration
Parameters
core
the LinphoneCore
call
the LinphoneCall object whose state is changed.
state
the new LinphoneCallState of the call
message
a non nil informational message about the state.
-
onNotifyPresenceReceived(core:
Default implementationlinphoneFriend: ) -
onNotifyPresenceReceivedForUriOrTel(core:
Default implementationlinphoneFriend: uriOrTel: presenceModel: ) Reports presence model change for a specific URI or phone number of a friend.
Default Implementation
Declaration
Swift
func onNotifyPresenceReceivedForUriOrTel(core: Core, linphoneFriend: Friend, uriOrTel: String, presenceModel: PresenceModel)
Parameters
core
LinphoneCore object
linphoneFriend
LinphoneFriend object
uriOrTel
The URI or phone number for which the presence model has changed
presenceModel
The new LinphonePresenceModel
-
onNewSubscriptionRequested(core:
Default implementationlinphoneFriend: url: ) Reports that a new subscription request has been received and wait for a decision.
Note
A subscription request is notified by this function only if the LinphoneSubscribePolicy for the given LinphoneFriend has been set to LinphoneSPWait. See linphone_friend_set_inc_subscribe_policy.Default Implementation
Parameters
core
LinphoneCore object
linphoneFriend
The LinphoneFriend aimed by the subscription.
url
URI of the subscriber
-
onAuthenticationRequested(core:
Default implementationauthInfo: method: ) Callback for requesting authentication information to application or user.
Default Implementation
Declaration
Swift
func onAuthenticationRequested(core: Core, authInfo: AuthInfo, method: AuthMethod)
Parameters
core
the LinphoneCore
authInfo
a LinphoneAuthInfo pre-filled with username, realm and domain values as much as possible
method
the type of authentication requested as LinphoneAuthMethod enum Application shall reply to this callback using linphone_core_add_auth_info.
-
onCallLogUpdated(core:
Default implementationcallLog: ) -
onCallIdUpdated(core:
Default implementationpreviousCallId: currentCallId: ) Callback to notify the callid of a call has been updated. This is done typically when a call retry.
Default Implementation
Declaration
Swift
func onCallIdUpdated(core: Core, previousCallId: String, currentCallId: String)
Parameters
core
the LinphoneCore
previousCallId
the previous callid.
currentCallId
the new callid.
-
onMessageReceived(core:
Default implementationchatRoom: message: ) Chat message callback prototype.
Default Implementation
Declaration
Swift
func onMessageReceived(core: Core, chatRoom: ChatRoom, message: ChatMessage)
Parameters
core
LinphoneCore object
chatRoom
LinphoneChatRoom involved in this conversation. Can be created by the framework in case the From-URI is not present in any chat room.
message
LinphoneChatMessage incoming message
-
onMessageSent(core:
Default implementationchatRoom: message: ) Called after the #send method of the LinphoneChatMessage was called. The message will be in state InProgress. In case of resend this callback won’t be called.
Default Implementation
Declaration
Swift
func onMessageSent(core: Core, chatRoom: ChatRoom, message: ChatMessage)
Parameters
core
LinphoneCore object
chatRoom
LinphoneChatRoom involved in this conversation. Can be be created by the framework in case the From-URI is not present in any chat room.
message
LinphoneChatMessage outgoing message
-
onChatRoomRead(core:
Default implementationchatRoom: ) -
onMessageReceivedUnableDecrypt(core:
Default implementationchatRoom: message: ) Chat message not decrypted callback prototype.
Default Implementation
Declaration
Swift
func onMessageReceivedUnableDecrypt(core: Core, chatRoom: ChatRoom, message: ChatMessage)
Parameters
core
LinphoneCore object
chatRoom
LinphoneChatRoom involved in this conversation. Can be be created by the framework in case the from-URI is not present in any chat room.
message
LinphoneChatMessage incoming message
-
onIsComposingReceived(core:
Default implementationchatRoom: ) -
onDtmfReceived(core:
Default implementationcall: dtmf: ) -
onReferReceived(core:
Default implementationreferTo: ) Callback prototype for when a refer is received.
Default Implementation
Declaration
Swift
func onReferReceived(core: Core, referTo: String)
Parameters
core
the LinphoneCore
referTo
the address of the refer
-
onCallEncryptionChanged(core:
Default implementationcall: mediaEncryptionEnabled: authenticationToken: ) Call encryption changed callback.
Default Implementation
Declaration
Parameters
core
the LinphoneCore
call
the LinphoneCall on which encryption is changed.
mediaEncryptionEnabled
whether encryption is activated.
authenticationToken
an authentication_token, currently set for ZRTP kind of encryption only.
-
onTransferStateChanged(core:
Default implementationtransfered: callState: ) Callback for notifying progresses of transfers.
Default Implementation
Parameters
core
the LinphoneCore
transfered
the LinphoneCall that was transfered
callState
the LinphoneCallState of the call to transfer target at the far end.
-
onBuddyInfoUpdated(core:
Default implementationlinphoneFriend: ) -
onCallStatsUpdated(core:
Default implementationcall: callStats: ) -
onInfoReceived(core:
Default implementationcall: message: ) Callback prototype for receiving info messages.
Default Implementation
Declaration
Swift
func onInfoReceived(core: Core, call: Call, message: InfoMessage)
Parameters
core
the LinphoneCore
call
the call whose info message belongs to.
message
the info message.
-
onSubscriptionStateChanged(core:
Default implementationlinphoneEvent: state: ) Callback prototype for notifying the application about changes of subscription states, including arrival of new subscriptions.
Default Implementation
Declaration
Swift
func onSubscriptionStateChanged(core: Core, linphoneEvent: Event, state: SubscriptionState)
Parameters
core
LinphoneCore object
linphoneEvent
the LinphoneEvent
state
the new LinphoneSubscriptionState
-
onNotifyReceived(core:
Default implementationlinphoneEvent: notifiedEvent: body: ) Callback prototype for notifying the application about notification received from the network.
Default Implementation
Declaration
Parameters
core
LinphoneCore object
linphoneEvent
the LinphoneEvent received
notifiedEvent
The event as string
body
the LinphoneContent of the event
-
onSubscribeReceived(core:
Default implementationlinphoneEvent: subscribeEvent: body: ) Callback prototype for notifying the application about subscription received from the network.
Default Implementation
Declaration
Parameters
core
LinphoneCore object
linphoneEvent
the LinphoneEvent received
subscribeEvent
The event as string
body
the LinphoneContent of the event
-
onPublishStateChanged(core:
Default implementationlinphoneEvent: state: ) Callback prototype for notifying the application about changes of publish states.
Default Implementation
Declaration
Swift
func onPublishStateChanged(core: Core, linphoneEvent: Event, state: PublishState)
Parameters
core
LinphoneCore object
linphoneEvent
the LinphoneEvent
state
the new LinphonePublishState
-
onConfiguringStatus(core:
Default implementationstatus: message: ) Callback prototype for configuring status changes notification.
Default Implementation
Declaration
Swift
func onConfiguringStatus(core: Core, status: ConfiguringState, message: String)
Parameters
core
the LinphoneCore
status
the current LinphoneConfiguringState
message
informational message.
-
onNetworkReachable(core:
Default implementationreachable: ) Callback prototype for reporting network change either automatically detected or notified by linphone_core_set_network_reachable.
Default Implementation
Declaration
Swift
func onNetworkReachable(core: Core, reachable: Bool)
Parameters
core
the LinphoneCore
reachable
true if network is reachable.
-
onLogCollectionUploadStateChanged(core:
Default implementationstate: info: ) Callback prototype for reporting log collection upload state change.
Default Implementation
Declaration
Parameters
core
LinphoneCore object
state
The state of the log collection upload
info
Additional information: error message in case of error state, URL of uploaded file in case of success.
-
onLogCollectionUploadProgressIndication(core:
Default implementationoffset: total: ) Callback prototype for reporting log collection upload progress indication.
Default Implementation
Declaration
Swift
func onLogCollectionUploadProgressIndication(core: Core, offset: Int, total: Int)
Parameters
core
LinphoneCore object
offset
the number of bytes sent since the start of the upload
total
the total number of bytes to upload
-
onFriendListCreated(core:
Default implementationfriendList: ) Callback prototype for reporting when a friend list has been added to the core friends list.
Default Implementation
Declaration
Swift
func onFriendListCreated(core: Core, friendList: FriendList)
Parameters
core
LinphoneCore object
friendList
LinphoneFriendList object
-
onFriendListRemoved(core:
Default implementationfriendList: ) Callback prototype for reporting when a friend list has been removed from the core friends list.
Default Implementation
Declaration
Swift
func onFriendListRemoved(core: Core, friendList: FriendList)
Parameters
core
LinphoneCore object
friendList
LinphoneFriendList object
-
onCallCreated(core:
Default implementationcall: ) -
onVersionUpdateCheckResultReceived(core:
Default implementationresult: version: url: ) Callback prototype for reporting the result of a version update check.
Default Implementation
Declaration
Swift
func onVersionUpdateCheckResultReceived(core: Core, result: VersionUpdateCheckResult, version: String, url: String)
Parameters
core
LinphoneCore object
result
The result of the version update check
url
The url where to download the new version if the result is #LinphoneVersionUpdateCheckNewVersionAvailable
-
onConferenceStateChanged(core:
Default implementationconference: state: ) Callback prototype telling that a LinphoneConference state has changed.
Default Implementation
Declaration
Swift
func onConferenceStateChanged(core: Core, conference: Conference, state: Conference.State)
Parameters
core
LinphoneCore object
conference
The LinphoneConference object for which the state has changed
state
the current LinphoneChatRoomState
-
onChatRoomStateChanged(core:
Default implementationchatRoom: state: ) Callback prototype telling that a LinphoneChatRoom state has changed.
Default Implementation
Declaration
Parameters
core
LinphoneCore object
chatRoom
The LinphoneChatRoom object for which the state has changed
state
the current LinphoneChatRoomState
-
onChatRoomSubjectChanged(core:
Default implementationchatRoom: ) -
onChatRoomEphemeralMessageDeleted(core:
Default implementationchatRoom: ) -
onImeeUserRegistration(core:
Default implementationstatus: userId: info: ) Callback prototype telling that an Instant Message Encryption Engine user registered on the server with or without success.
Default Implementation
Declaration
Swift
func onImeeUserRegistration(core: Core, status: Bool, userId: String, info: String)
Parameters
core
LinphoneCore object
status
the return status of the registration action.
userId
the userId published on the encryption engine server
info
information about failure
-
onQrcodeFound(core:
Default implementationresult: ) Callback prototype telling the result of decoded qrcode.
Default Implementation
Declaration
Swift
func onQrcodeFound(core: Core, result: String)
Parameters
core
LinphoneCore object
result
The result of the decoded qrcode
-
onFirstCallStarted(core:
Default implementation) Callback prototype telling a call has started (incoming or outgoing) while there was no other call.
Default Implementation
Declaration
Swift
func onFirstCallStarted(core: Core)
Parameters
core
LinphoneCore object
-
onLastCallEnded(core:
Default implementation) Callback prototype telling the last call has ended (#LinphoneCore.get_calls_nb() returns 0)
Default Implementation
Declaration
Swift
func onLastCallEnded(core: Core)
Parameters
core
LinphoneCore object
-
onAudioDeviceChanged(core:
Default implementationaudioDevice: ) Callback prototype telling that the audio device for at least one call has changed.
Default Implementation
Declaration
Swift
func onAudioDeviceChanged(core: Core, audioDevice: AudioDevice)
Parameters
core
LinphoneCore object
audioDevice
the newly used LinphoneAudioDevice object
-
onAudioDevicesListUpdated(core:
Default implementation) Callback prototype telling the audio devices list has been updated. Either a new device is available or a previously available device isn’t anymore. You can call linphone_core_get_audio_devices to get the new list.
Default Implementation
Declaration
Swift
func onAudioDevicesListUpdated(core: Core)
Parameters
core
LinphoneCore object
-
onEcCalibrationResult(core:
Default implementationstatus: delayMs: ) Function prototype used by #linphone_core_cbs_set_ec_calibrator_result().
Default Implementation
Declaration
Swift
func onEcCalibrationResult(core: Core, status: EcCalibratorStatus, delayMs: Int)
Parameters
core
The LinphoneCore.
status
The LinphoneEcCalibratorStatus of the calibrator.
delayMs
The measured delay if available.
-
onEcCalibrationAudioInit(core:
Default implementation) Function prototype used by #linphone_core_cbs_set_ec_calibrator_audio_init().
Default Implementation
Declaration
Swift
func onEcCalibrationAudioInit(core: Core)
Parameters
core
The LinphoneCore.
-
onEcCalibrationAudioUninit(core:
Default implementation) Function prototype used by #linphone_core_cbs_set_ec_calibrator_audio_uninit().
Default Implementation
Declaration
Swift
func onEcCalibrationAudioUninit(core: Core)
Parameters
core
The LinphoneCore.