Protocols
The following protocols are available globally.
-
An object the representing Kaleyra Video VoIP call.
The object provides information about the current state of the call (e.g if it’s dialing, connecting, ended and so on), information about the kind of call it’s being performed (e.g. a group call, or a one to one call), the call direction, and the call type (Audio Only, Audio Upgradable or Audio / Video). It also provides information regarding call participants and their state within the call (e.g if a participant has answered, declined and so on).
Changes in the state of a call object will be notified to its observers. You can register as a call observer using the methods
See moreadd(observer:)
andadd(observer:queue:)
provided.Declaration
Swift
@available(iOS 12.0, *) @objc(BDKCall) public protocol Call : NSObjectProtocol
-
A call observer, notified about call events.
You subscribe as a call observer adding a class conforming to this protocol to a
See moreCall
object by calling theCall.add(observer:)
methodDeclaration
Swift
@available(iOS 12.0, *) @objc(BDKCallObserver) public protocol CallObserver : NSObjectProtocol
-
An observer, notified about call recording events.
You subscribe as a call recording observer adding a class conforming to this protocol to a
See moreCall
object by calling theCall.add(recordingObserver:)
methodDeclaration
Swift
@available(iOS 12.0, *) @objc(BDKCallRecordingObserver) public protocol CallRecordingObserver : NSObjectProtocol
-
Object representing a call participant and its state in the call.
See moreDeclaration
Swift
@objc(BDKCallParticipant) public protocol CallParticipant : NSObjectProtocol
-
An object representing the participants inside a call and their state.
See moreDeclaration
Swift
@available(iOS 12.0, *) @objc(BDKCallParticipants) public protocol CallParticipants : NSObjectProtocol
-
An observer of call participants object, informed about participant state changes.
You subscribe to participant state changes by adding an observer, a component conforming to this protocol, to the
See moreCall.participants
propertyDeclaration
Swift
@available(iOS 12.0, *) @objc(BDKCallParticipantsObserver) public protocol CallParticipantsObserver : 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.
See moreDeclaration
Swift
@available(iOS 12.0, *) @objc(BDKCallRegistry) public protocol CallRegistry : NSObjectProtocol
-
An observer of a
CallRegistry
object.You subscribe as a
See moreCallRegistryObserver
when you want to be notified whenCall
objects are added or removed from theCallRegistry
.Declaration
Swift
@available(iOS 12.0, *) @objc(BDKCallRegistryObserver) public protocol CallRegistryObserver : 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.
See moreDeclaration
Swift
@available(iOS 12.0, *) @objc(BDKCallClient) public protocol CallClient : NSObjectProtocol
-
An observer of a call client object.
You subscribe as a
See moreCallClientObserver
when you want to react aboutCallClient
object state changes. You are required to implement at least thecallClientDidChangeState(_:oldState:newState:)
method invoked after theCallClient
has changed its stateDeclaration
Swift
@available(iOS 12.0, *) @objc(BDKCallClientObserver) public protocol CallClientObserver : NSObjectProtocol
-
Classes conforming to this protocol represent an incoming call observer.
The call client will notify its observers when an incoming call is received. In order to be notified of incoming calls you should call the
See moreCallClient.addIncomingCall(observer:)
method on the SDK call client.Declaration
Swift
@available(iOS 12.0, *) @objc(BDKIncomingCallObserver) public protocol IncomingCallObserver : NSObjectProtocol
-
The client responsible for connecting and maintaining a connection with the Kaleyra Video chat service.
See moreDeclaration
Swift
@available(iOS 12.0, *) @objc(BDKChatClient) public protocol ChatClient : NSObjectProtocol
-
An observer of a chat client object.
You subscribe as a
See moreChatClientObserver
when you want to react aboutChatClient
object state changes. You are required to implement at least thechatClientDidChangeState(_:oldState:newState:)
method invoked after theChatClient
has changed its stateDeclaration
Swift
@available(iOS 12.0, *) @objc(BDKChatClientObserver) public protocol ChatClientObserver : NSObjectProtocol
-
Represents the
ChannelViewController
‘s delegate.Classes conforming to this class will be notified by the
See moreChannelViewController
when events occur giving them the chance to react to those events.Declaration
Swift
@available(iOS 12.0, *) @objc(BDKChannelViewControllerDelegate) public protocol ChannelViewControllerDelegate
-
Classes conforming to this protocol serve the purpose of providing
UserDetails
objects and CallKitCXHandle
objects to the Kaleyra Video SDK when it needs to display information regarding a particular user of your system to the app user. For example the SDK might ask user information when it must update the user interface when an outgoing call is being performed. Kaleyra Video does not own user information like user’s first name, last name, email addresses and so on. It is hosting app responsibility to provide those information through this protocol.Important
Classes implementing this protocol must be thread safe, the protocol methods might be invoked concurrently on a background system queue. You should take this into account if you are going to fetch user information from a component which is not inherently thread safe.Declaration
Swift
@available(iOS 12.0, *) @objc(BDKUserDetailsProvider) public protocol UserDetailsProvider
-
Represents a chat notification touch listener
Classes conforming to this protocol are notified when a chat notification has been touched by the user, providing the
See moreChatNotification
object representing the touched notification. You usually present aChannelViewController
interface in response to this event handing it anOpenChatIntent
object created from the notification.Declaration
Swift
@available(iOS 12.0, *) @objc(BDKInAppChatNotificationTouchListener) public protocol InAppChatNotificationTouchListener
-
Represents a file share notification touch listener.
Classes conforming to this protocol are notified when a file share notification has been touched by the user, providing the
See moreFileShareNotification
object representing the touched notification. You usually present aCallWindow
interface in response to this event handing it anOpenDownloadsIntent
object. Doing so it will redirect the user of your app to the Downloads screen shown by the Kaleyra VideoCallViewController
.Declaration
Swift
@available(iOS 12.0, *) @objc(BDKInAppFileShareNotificationTouchListener) public protocol InAppFileShareNotificationTouchListener
-
Represents the central coordination point for in-app notifications.
When this service is started whenever a chat message is received or a new file has been uploaded during a call an in-app notification will be presented to the user.
See moreDeclaration
Swift
@available(iOS 12.0, *) @objc(BDKInAppNotificationsCoordinator) public protocol InAppNotificationsCoordinator
-
Represents a request for an action that the SDK should fulfil on behalf of the user.
See moreDeclaration
Swift
@available(iOS 12.0, *) @objc(BDKIntent) public protocol Intent : NSObjectProtocol
-
A component providing “access tokens” for a user.
The Kaleyra Video SDK adopts a strong authentication mechanism based on JWT access tokens. Whenever the SDK needs an access token for a particular user, this component will be asked to provide an access token for a particular user You are required to provide a component conforming to this protocol as an argument of the
See moreSession
object initialiserDeclaration
Swift
@available(iOS 12.0, *) public protocol AccessTokenProvider
-
A component providing “access tokens” for a user. This protocol is meant to be used in objective-c.
This protocol is the objective-c version of the
AccessTokenProvider
protocol.See also
AccessTokenProvider
Declaration
Swift
@available(iOS 12.0, *) @objc(BDKAccessTokenProvider) public protocol AccessTokenProviderObjc : NSObjectProtocol
-
Represents the delegate of a
See moreCallViewController
instance.CallViewController
instances will notify their delegate when they have finished handling a call and they are ready to be dismissed.Declaration
Swift
@available(iOS 12.0, *) @objc(BDKCallViewControllerDelegate) public protocol CallViewControllerDelegate : NSObjectProtocol
-
The
See moreCallWindow
delegate.CallWindow
instances will notify their delegate when events requiring its intervention have occurred.Declaration
Swift
@available(iOS 12.0, *) @objc(BDKCallWindowDelegate) public protocol CallWindowDelegate