CoreDelegate

public protocol CoreDelegate : AnyObject

Undocumented

  • 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.

  • 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

  • Call state notification callback.

    Default Implementation

    Declaration

    Swift

    func onCallStateChanged(core: Core, call: Call, state: Call.State, message: String)

    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.

  • Report status change for a friend previously added to the LinphoneCore with linphone_core_add_friend().

    Default Implementation

    Declaration

    Swift

    func onNotifyPresenceReceived(core: Core, linphoneFriend: Friend)

    Parameters

    core

    LinphoneCore object

    linphoneFriend

    Updated LinphoneFriend

  • 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

  • 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

    Declaration

    Swift

    func onNewSubscriptionRequested(core: Core, linphoneFriend: Friend, url: String)

    Parameters

    core

    LinphoneCore object

    linphoneFriend

    The LinphoneFriend aimed by the subscription.

    url

    URI of the subscriber

  • 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:callLog:) Default implementation

    Callback to notify a new call-log entry has been added. This is done typically when a call terminates.

    Default Implementation

    Declaration

    Swift

    func onCallLogUpdated(core: Core, callLog: CallLog)

    Parameters

    core

    the LinphoneCore

    callLog

    the new LinphoneCallLog entry added.

  • 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.

  • 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:chatRoom:message:) Default implementation

    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:chatRoom:) Default implementation

    Chat room marked as read callback.

    Default Implementation

    Declaration

    Swift

    func onChatRoomRead(core: Core, chatRoom: ChatRoom)

    Parameters

    core

    LinphoneCore object

    chatRoom

    LinphoneChatRoom that has been marked as read.

  • 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:chatRoom:) Default implementation

    Is composing notification callback prototype.

    Default Implementation

    Declaration

    Swift

    func onIsComposingReceived(core: Core, chatRoom: ChatRoom)

    Parameters

    core

    LinphoneCore object

    chatRoom

    LinphoneChatRoom involved in the conversation.

  • onDtmfReceived(core:call:dtmf:) Default implementation

    Callback for being notified of DTMFs received.

    Default Implementation

    Declaration

    Swift

    func onDtmfReceived(core: Core, call: Call, dtmf: Int)

    Parameters

    core

    the LinphoneCore

    call

    the LinphoneCall that received the dtmf

    dtmf

    the ascii code of the dtmf

  • onReferReceived(core:referTo:) Default implementation

    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

  • Call encryption changed callback.

    Default Implementation

    Declaration

    Swift

    func onCallEncryptionChanged(core: Core, call: Call, mediaEncryptionEnabled: Bool, authenticationToken: String)

    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.

  • Callback for notifying progresses of transfers.

    Default Implementation

    Declaration

    Swift

    func onTransferStateChanged(core: Core, transfered: Call, callState: Call.State)

    Parameters

    core

    the LinphoneCore

    transfered

    the LinphoneCall that was transfered

    callState

    the LinphoneCallState of the call to transfer target at the far end.

  • Callback prototype when using the buddy plugin.

    Default Implementation

    Declaration

    Swift

    func onBuddyInfoUpdated(core: Core, linphoneFriend: Friend)

    Parameters

    core

    the LinphoneCore

    linphoneFriend

    the LinphoneFriend that has been updated

  • Callback for receiving quality statistics for calls.

    Default Implementation

    Declaration

    Swift

    func onCallStatsUpdated(core: Core, call: Call, callStats: CallStats)

    Parameters

    core

    the LinphoneCore

    call

    the call

    callStats

    the call statistics.

  • onInfoReceived(core:call:message:) Default implementation

    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.

  • 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

  • Callback prototype for notifying the application about notification received from the network.

    Default Implementation

    Declaration

    Swift

    func onNotifyReceived(core: Core, linphoneEvent: Event, notifiedEvent: String, body: Content)

    Parameters

    core

    LinphoneCore object

    linphoneEvent

    the LinphoneEvent received

    notifiedEvent

    The event as string

    body

    the LinphoneContent of the event

  • Callback prototype for notifying the application about subscription received from the network.

    Default Implementation

    Declaration

    Swift

    func onSubscribeReceived(core: Core, linphoneEvent: Event, subscribeEvent: String, body: Content)

    Parameters

    core

    LinphoneCore object

    linphoneEvent

    the LinphoneEvent received

    subscribeEvent

    The event as string

    body

    the LinphoneContent of the event

  • 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

  • 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:reachable:) Default implementation

    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.

  • Callback prototype for reporting log collection upload state change.

    Default Implementation

    Declaration

    Swift

    func onLogCollectionUploadStateChanged(core: Core, state: Core.LogCollectionUploadState, info: String)

    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.

  • 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:friendList:) Default implementation

    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:friendList:) Default implementation

    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:call:) Default implementation

    Callback notifying that a new LinphoneCall (either incoming or outgoing) has been created.

    Default Implementation

    Declaration

    Swift

    func onCallCreated(core: Core, call: Call)

    Parameters

    core

    LinphoneCore object that has created the call

    call

    The newly created LinphoneCall object

  • 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

  • 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

  • Callback prototype telling that a LinphoneChatRoom state has changed.

    Default Implementation

    Declaration

    Swift

    func onChatRoomStateChanged(core: Core, chatRoom: ChatRoom, state: ChatRoom.State)

    Parameters

    core

    LinphoneCore object

    chatRoom

    The LinphoneChatRoom object for which the state has changed

    state

    the current LinphoneChatRoomState

  • Callback prototype telling that a LinphoneChatRoom subject has changed.

    Default Implementation

    Declaration

    Swift

    func onChatRoomSubjectChanged(core: Core, chatRoom: ChatRoom)

    Parameters

    core

    LinphoneCore object

    chatRoom

    The LinphoneChatRoom object for which the subject has changed

  • Callback prototype telling that a LinphoneChatRoom ephemeral message has expired.

    Default Implementation

    Declaration

    Swift

    func onChatRoomEphemeralMessageDeleted(core: Core, chatRoom: ChatRoom)

    Parameters

    core

    LinphoneCore object

    chatRoom

    The LinphoneChatRoom object for which a message has expired.

  • 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:result:) Default implementation

    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

  • 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

  • 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.