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 add(observer:) and add(observer:queue:) provided.

    See more

    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 Call object by calling the Call.add(observer:) method

    See more

    Declaration

    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 Call object by calling the Call.add(recordingObserver:) method

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCallRecordingObserver)
    public protocol CallRecordingObserver : NSObjectProtocol
  • Object representing a call participant and its state in the call.

    See more

    Declaration

    Swift

    @objc(BDKCallParticipant)
    public protocol CallParticipant : NSObjectProtocol
  • An object representing the participants inside a call and their state.

    See more

    Declaration

    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 Call.participants property

    See more

    Declaration

    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 more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCallRegistry)
    public protocol CallRegistry : NSObjectProtocol
  • An observer of a CallRegistry object.

    You subscribe as a CallRegistryObserver when you want to be notified when Call objects are added or removed from the CallRegistry.

    See more

    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 more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCallClient)
    public protocol CallClient : NSObjectProtocol
  • An observer of a call client object.

    You subscribe as a CallClientObserver when you want to react about CallClient object state changes. You are required to implement at least the callClientDidChangeState(_:oldState:newState:) method invoked after the CallClient has changed its state

    See more

    Declaration

    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 CallClient.addIncomingCall(observer:) method on the SDK call client.

    See more

    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 more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKChatClient)
    public protocol ChatClient : NSObjectProtocol
  • An observer of a chat client object.

    You subscribe as a ChatClientObserver when you want to react about ChatClient object state changes. You are required to implement at least the chatClientDidChangeState(_:oldState:newState:) method invoked after the ChatClient has changed its state

    See more

    Declaration

    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 ChannelViewController when events occur giving them the chance to react to those events.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKChannelViewControllerDelegate)
    public protocol ChannelViewControllerDelegate
  • Classes conforming to this protocol serve the purpose of providing UserDetails objects and CallKit CXHandle 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.
    See more

    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 ChatNotification object representing the touched notification. You usually present a ChannelViewController interface in response to this event handing it an OpenChatIntent object created from the notification.

    See more

    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 FileShareNotification object representing the touched notification. You usually present a CallWindow interface in response to this event handing it an OpenDownloadsIntent object. Doing so it will redirect the user of your app to the Downloads screen shown by the Kaleyra Video CallViewController.

    See more

    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 more

    Declaration

    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 more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKIntent)
    public protocol Intent : NSObjectProtocol
  • An observer of the Session object.

    Classes conforming to this protocol will be notified when the session state changes

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKSessionObserver)
    public protocol SessionObserver
  • 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 Session object initialiser

    See more

    Declaration

    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 more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKAccessTokenProvider)
    public protocol AccessTokenProviderObjc : NSObjectProtocol
  • Represents the delegate of a CallViewController instance. CallViewController instances will notify their delegate when they have finished handling a call and they are ready to be dismissed.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCallViewControllerDelegate)
    public protocol CallViewControllerDelegate : NSObjectProtocol
  • The CallWindow delegate. CallWindow instances will notify their delegate when events requiring its intervention have occurred.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCallWindowDelegate)
    public protocol CallWindowDelegate