CoreDelegate
public protocol CoreDelegate : AnyObject
-
onGlobalStateChanged(core:Default implementationstate: message: ) Global state notification callback.
Default Implementation
Declaration
Swift
func onGlobalStateChanged(core: Core, state: GlobalState, message: String)Parameters
corethe LinphoneCore.
statethe LinphoneGlobalState
messageinformational message.
-
onRegistrationStateChanged(core:Default implementationproxyConfig: state: message: ) Registration state notification callback prototype.
- deprecated: 06/04/2020 Use LinphoneCoreCbsAccountRegistrationStateChangedCb instead
Default Implementation
Declaration
Swift
func onRegistrationStateChanged(core: Core, proxyConfig: ProxyConfig, state: RegistrationState, message: String)Parameters
corethe LinphoneCore
proxyConfigthe LinphoneProxyConfig which state has changed
statethe current LinphoneRegistrationState
messagea non nil informational message about the state
-
onConferenceInfoReceived(core:Default implementationconferenceInfo: ) Callback prototype for notifying the application about a received conference info.
Default Implementation
Declaration
Swift
func onConferenceInfoReceived(core: Core, conferenceInfo: ConferenceInfo)Parameters
coreLinphoneCore object
conferenceInfothe LinphoneConferenceInfo received
-
onPushNotificationReceived(core:Default implementationpayload: ) Callback prototype for notifying the application a push notification was received. On iOS it only works with pushkit (VoIP) pushes.
Default Implementation
Declaration
Swift
func onPushNotificationReceived(core: Core, payload: String)Parameters
coreLinphoneCore object
payloadthe body of the push notification, if any
-
onPreviewDisplayErrorOccurred(core:Default implementationerrorCode: ) Callback to notify that there are errors from the video rendering. Check LinphoneCallCbsVideoDisplayErrorOccurredCb for more details.
Default Implementation
Declaration
Swift
func onPreviewDisplayErrorOccurred(core: Core, errorCode: Int)Parameters
coreLinphoneCore object
errorCodeThe error code. It depends of the display filter (available for OpenGL)
-
onCallStateChanged(core:Default implementationcall: state: message: ) Call state notification callback.
Default Implementation
Declaration
Parameters
corethe LinphoneCore
callthe LinphoneCall object whose state is changed.
statethe new LinphoneCallState of the call
messagea 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
coreLinphoneCore object
linphoneFriendLinphoneFriend object
uriOrTelThe URI or phone number for which the presence model has changed
presenceModelThe 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
coreLinphoneCore object
linphoneFriendThe LinphoneFriend aimed by the subscription.
urlURI 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
corethe LinphoneCore
authInfoa LinphoneAuthInfo pre-filled with username, realm and domain values as much as possible
methodthe 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
corethe LinphoneCore
previousCallIdthe previous callid.
currentCallIdthe new callid.
-
onMessageReceived(core:Default implementationchatRoom: message: ) Chat message callback prototype.
Default Implementation
Declaration
Swift
func onMessageReceived(core: Core, chatRoom: ChatRoom, message: ChatMessage)Parameters
coreLinphoneCore object
chatRoomLinphoneChatRoom involved in this conversation. Can be created by the framework in case the From-URI is not present in any chat room.
messageLinphoneChatMessage incoming message
-
onMessagesReceived(core:Default implementationchatRoom: messages: ) Chat messages callback prototype. Only called when aggregation is enabled (aka [sip] chat_messages_aggregation == 1 or using linphone_core_set_chat_messages_aggregation_enabled), it replaces the single message received callback.
Default Implementation
Declaration
Swift
func onMessagesReceived(core: Core, chatRoom: ChatRoom, messages: [ChatMessage])Parameters
coreLinphoneCore object
chatRoomLinphoneChatRoom involved in this conversation. Can be created by the framework in case the From-URI is not present in any chat room.
messagesThe of incoming messages
-
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
coreLinphoneCore object
chatRoomLinphoneChatRoom involved in this conversation. Can be be created by the framework in case the From-URI is not present in any chat room.
messageLinphoneChatMessage outgoing message
-
onChatRoomSessionStateChanged(core:Default implementationchatRoom: state: message: ) Chat room session state changed callback.
Default Implementation
Declaration
Parameters
coreLinphoneCore object
chatRoomLinphoneChatRoom that has been marked as read.
statethe new LinphoneCallState of the call
messagea non nil informational message about the state.
-
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
coreLinphoneCore object
chatRoomLinphoneChatRoom involved in this conversation. Can be be created by the framework in case the from-URI is not present in any chat room.
messageLinphoneChatMessage 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
corethe LinphoneCore
referTothe address of the refer
-
onCallGoclearAckSent(core:Default implementationcall: ) -
onCallEncryptionChanged(core:Default implementationcall: mediaEncryptionEnabled: authenticationToken: ) Call encryption changed callback.
Default Implementation
Declaration
Parameters
corethe LinphoneCore
callthe LinphoneCall on which encryption is changed.
mediaEncryptionEnabledwhether encryption is activated.
authenticationTokenan authentication_token, currently set for ZRTP kind of encryption only.
-
onCallSendMasterKeyChanged(core:Default implementationcall: masterKey: ) -
onCallReceiveMasterKeyChanged(core:Default implementationcall: masterKey: ) -
onTransferStateChanged(core:Default implementationtransfered: callState: ) Callback for notifying progresses of transfers.
Default Implementation
Parameters
corethe LinphoneCore
transferedthe LinphoneCall that was transfered
callStatethe 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
corethe LinphoneCore
callthe call whose info message belongs to.
messagethe 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
coreLinphoneCore object
linphoneEventthe LinphoneEvent
statethe new LinphoneSubscriptionState
-
onNotifySent(core:Default implementationlinphoneEvent: body: ) Callback prototype for notifying the application about notification that is being sent.
Default Implementation
Parameters
coreLinphoneCore object
linphoneEventthe LinphoneEvent received
bodythe LinphoneContent of the event
-
onNotifyReceived(core:Default implementationlinphoneEvent: notifiedEvent: body: ) Callback prototype for notifying the application about notification received from the network.
Default Implementation
Declaration
Parameters
coreLinphoneCore object
linphoneEventthe LinphoneEvent received
notifiedEventThe event as string
bodythe 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
coreLinphoneCore object
linphoneEventthe LinphoneEvent received
subscribeEventThe event as string
bodythe 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
coreLinphoneCore object
linphoneEventthe LinphoneEvent
statethe 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
corethe LinphoneCore
statusthe current LinphoneConfiguringState
messageinformational 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
corethe LinphoneCore
reachabletrue if network is reachable.
-
onLogCollectionUploadStateChanged(core:Default implementationstate: info: ) Callback prototype for reporting log collection upload state change.
Default Implementation
Declaration
Parameters
coreLinphoneCore object
stateThe state of the log collection upload
infoAdditional 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
coreLinphoneCore object
offsetthe number of bytes sent since the start of the upload
totalthe total number of bytes to upload
-
onFriendListCreated(core:Default implementationfriendList: ) Callback prototype for reporting when a friend list has been added to the core friend lists.
Default Implementation
Declaration
Swift
func onFriendListCreated(core: Core, friendList: FriendList)Parameters
coreLinphoneCore object
friendListLinphoneFriendList object
-
onFriendListRemoved(core:Default implementationfriendList: ) Callback prototype for reporting when a friend list has been removed from the core friend lists.
Default Implementation
Declaration
Swift
func onFriendListRemoved(core: Core, friendList: FriendList)Parameters
coreLinphoneCore object
friendListLinphoneFriendList 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
coreLinphoneCore object
resultThe result of the version update check
urlThe 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
coreLinphoneCore object
conferenceThe LinphoneConference object for which the state has changed
statethe current LinphoneChatRoomState
-
onChatRoomStateChanged(core:Default implementationchatRoom: state: ) Callback prototype telling that a LinphoneChatRoom state has changed.
Default Implementation
Declaration
Parameters
coreLinphoneCore object
chatRoomThe LinphoneChatRoom object for which the state has changed
statethe 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
coreLinphoneCore object
statusthe return status of the registration action.
userIdthe userId published on the encryption engine server
infoinformation 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
coreLinphoneCore object
resultThe 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
coreLinphoneCore 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
coreLinphoneCore 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
coreLinphoneCore object
audioDevicethe 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
coreLinphoneCore 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
coreThe LinphoneCore.
statusThe LinphoneEcCalibratorStatus of the calibrator.
delayMsThe 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
coreThe 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
coreThe LinphoneCore.
-
onAccountRegistrationStateChanged(core:Default implementationaccount: state: message: ) Callback notifying that a LinphoneAccount has its registration state changed.
Default Implementation
Declaration
Swift
func onAccountRegistrationStateChanged(core: Core, account: Account, state: RegistrationState, message: String)Parameters
coreThe LinphoneCore object.
accountThe LinphoneAccount object which has its registration changed.
stateThe new state for this account.
messagea non nil informational message about the state
CoreDelegate Protocol Reference