CallRegistry

@available(iOS 12.0, *)
@objc(BDKCallRegistry)
public protocol CallRegistry : NSObjectProtocol

A call registry acts as a repository containing the calls currently handled by the sdk. It won’t track call history though, so once a call ends it will removed from the registry.

  • An array of the calls currently being handled by the sdk.

    Declaration

    Swift

    @objc
    var calls: [Call] { get }
  • A boolean flag indicating whether the sdk is busy processing a call, or not.

    Declaration

    Swift

    @objc
    var isBusy: Bool { get }
  • Returns the call identified locally with the UUID provided as argument, or nil if a call with the identifier provided cannot be found.

    Declaration

    Swift

    @objc(callWithUUID:)
    func call(with uuid: UUID) -> Call?

    Parameters

    uuid

    The local UUID of the call that must be retrieved.

    Return Value

    A call identified by the UUID provided or nil if a call cannot be found.

Observers

  • Adds a CallRegistryObserver, notified when calls are added or removed from the registry.

    Important

    The observer will be notified synchronously on a private background queue. The observer object will be held weakly.

    Declaration

    Swift

    @objc(addObserver:)
    func add(observer: CallRegistryObserver)

    Parameters

    observer

    The observer to be added.

  • Adds a CallRegistryObserver specifying on which dispatch queue it must be notified.

    When a nil queue is provided the observer will be notified synchronously on a private background queue. Otherwise the observer will be notified asynchronously on the queue provided.

    Important

    The observer will be held weakly.

    Declaration

    Swift

    @objc(addObserver:queue:)
    func add(observer: CallRegistryObserver, queue: DispatchQueue?)

    Parameters

    observer

    The observer to be added

    queue

    The dispatch queue onto which the observer will be notified when an event occurs.

  • Removes a CallRegistryObserver observer.

    Once removed the observer will not receive events anymore unless it is added once again.

    Declaration

    Swift

    @objc(removeObserver:)
    func remove(observer: CallRegistryObserver)

    Parameters

    observer

    The observer to be removed.