BDKCallRegistry
Objective-C
@protocol BDKCallRegistry <NSObject>
Swift
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.
-
Returns an array of the calls currently being handled by the sdk.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSArray<id<BDKCall>> *_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
NSInvalidArgumentExceptionif a nil UUID is provided as argument.Declaration
Objective-C
- (nullable id<BDKCall>)callWithUUID:(nonnull NSUUID *)UUID;Parameters
UUIDThe 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<BDKCallRegistryObserver>)observer;Parameters
observerThe 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<BDKCallRegistryObserver>)observer queue:(nullable dispatch_queue_t)queue;Parameters
observerThe observer to add.
queueThe dispatch queue onto which the observer will be notified.
-
Removes the observer.
Declaration
Objective-C
- (void)removeObserver:(nonnull id<BDKCallRegistryObserver>)observer;Parameters
observerThe observer to be removed.
View on GitHub
BDKCallRegistry Protocol Reference