BCXCallRegistry

Objective-C

@protocol BCXCallRegistry <NSObject>

Swift

protocol BCXCallRegistry : 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.

  • Returns an array of the calls currently being handled by the sdk.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSArray<id<BCXCall>> *_Nonnull calls;
  • A boolean flag indicating whether the sdk is busy processing a call, or not.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isBusy) BOOL busy;

    Swift

    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.

    Throws an NSInvalidArgumentException if a nil UUID is provided as argument.

    Declaration

    Objective-C

    - (nullable id<BCXCall>)callWithUUID:(nonnull NSUUID *)UUID;

    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.

  • Adds an observer that will be notified synchronously on a private background queue, when a new call is added to the registry or an old one is removed from it. The observer object will be held weakly.

    Declaration

    Objective-C

    - (void)addObserver:(nonnull id<BCXCallRegistryObserver>)observer;

    Parameters

    observer

    The observer to be added.

  • Adds an observer specifying on which dispatch queue it must be notified when a call is added to the registry or removed from it. If 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. The observer will be held weakly.

    Declaration

    Objective-C

    - (void)addObserver:(nonnull id<BCXCallRegistryObserver>)observer
                  queue:(nullable dispatch_queue_t)queue;

    Parameters

    observer

    The observer to add.

    queue

    The dispatch queue onto which the observer will be notified.

  • Removes the observer.

    Declaration

    Objective-C

    - (void)removeObserver:(nonnull id<BCXCallRegistryObserver>)observer;

    Parameters

    observer

    The observer to be removed.