CallClient
@available(iOS 12.0, *)
@objc(BDKCallClient)
public protocol CallClient : NSObjectProtocol
The client responsible for connecting and maintaining a connection with the Kaleyra Video call services.
Once started, the object will connect and keep the connection with Kaleyra Video platform, communicating and exchanging events with the servers.
-
A property holding the current state of the client.
Declaration
Swift
var state: CallClientState { get }
-
Adds a
CallClientObserver, notified about changes in the state of the client.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: CallClientObserver)Parameters
observerThe observer to be added.
-
Adds a
CallClientObserverspecifying 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: CallClientObserver, queue: DispatchQueue?)Parameters
observerThe observer to be added
queueThe dispatch queue onto which the observer will be notified when an event occurs.
-
Removes a
CallClientObserverobserver.Once removed the observer will not receive client state change notifications anymore unless it is added once again.
Declaration
Swift
@objc(removeObserver:) func remove(observer: CallClientObserver)Parameters
observerThe observer to be removed.
-
Adds an
IncomingCallObservernotified about incoming calls received.Important
The observer will be notified synchronously on a private background queue. The observer object will be held weakly.Declaration
Swift
@objc(addIncomingCallObserver:) func addIncomingCall(observer: IncomingCallObserver)Parameters
observerThe observer to be added.
-
Adds an
IncomingCallObserverspecifying 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(addIncomingCallObserver:queue:) func addIncomingCall(observer: IncomingCallObserver, queue: DispatchQueue?)Parameters
observerThe observer to be added
queueThe dispatch queue onto which the observer will be notified when an event occurs.
-
Removes a
IncomingCallObserverobserver.Once removed the observer will not receive incoming calls received notifications anymore unless it is added once again.
Declaration
Swift
@objc(removeIncomingCallObserver:) func removeIncomingCall(observer: IncomingCallObserver)Parameters
observerThe observer to be removed.
View on GitHub
CallClient Protocol Reference