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 moreCallobject 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 moreCallobject 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.participantspropertyDeclaration
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
CallRegistryobject.You subscribe as a
See moreCallRegistryObserverwhen you want to be notified whenCallobjects 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 moreCallClientObserverwhen you want to react aboutCallClientobject state changes. You are required to implement at least thecallClientDidChangeState(_:oldState:newState:)method invoked after theCallClienthas 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 moreChatClientObserverwhen you want to react aboutChatClientobject state changes. You are required to implement at least thechatClientDidChangeState(_:oldState:newState:)method invoked after theChatClienthas 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 moreChannelViewControllerwhen 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
UserDetailsobjects and CallKitCXHandleobjects 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.See moreImportant
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 moreChatNotificationobject representing the touched notification. You usually present aChannelViewControllerinterface in response to this event handing it anOpenChatIntentobject 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 moreFileShareNotificationobject representing the touched notification. You usually present aCallWindowinterface in response to this event handing it anOpenDownloadsIntentobject. 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 moreSessionobject 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
AccessTokenProviderprotocol.See moreSee also
AccessTokenProviderDeclaration
Swift
@available(iOS 12.0, *) @objc(BDKAccessTokenProvider) public protocol AccessTokenProviderObjc : NSObjectProtocol -
Represents the delegate of a
See moreCallViewControllerinstance.CallViewControllerinstances 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 moreCallWindowdelegate.CallWindowinstances will notify their delegate when events requiring its intervention have occurred.Declaration
Swift
@available(iOS 12.0, *) @objc(BDKCallWindowDelegate) public protocol CallWindowDelegate
View on GitHub
Protocols Reference