SOSSessionManager Class Reference

Inherits from NSObject
Declared in SOSSessionManager.h

Overview

The SOSSessionManager class is the main interface to the SOS framework.

This object manages the flow of SOS sessions throughout the lifetime of the app. Configuration and customization of the SOS framework is handled through the public properties on the SOSSessionManager instance.

SOSSessionManager conforms to a multicast delegate model for messaging. Any class which implements the SOSDelegate protocol can be added to a list of delegates to receive messages asynchronously.

To get an instance of this class, use the SCServiceCloud.sos property on [SCServiceCloud sharedInstance].

SOS Management Objects

  annotations

Public reference to the SOSScreenAnnotations instance used by the SOS framework.

@property (readonly, atomic) SOSScreenAnnotations *annotations

Declared In

SOSSessionManager.h

  masking

Public reference to the SOSMasking instance used by the SOS framework.

@property (readonly, atomic) SOSMasking *masking

Declared In

SOSSessionManager.h

  agentAvailability

Public reference to the SOSAgentAvailability object used for checking availability of SOS agents.

@property (readonly, atomic) SOSAgentAvailability *agentAvailability

Declared In

SOSSessionManager.h

  networkReporter

Public reference to the SOSNetworkReporter object. This object will accept delegates to listen to audio and video network traffic events.

@property (readonly, atomic) SOSNetworkReporter *networkReporter

Declared In

SOSSessionManager.h

Other Properties

  state

The current SOSSessionState.

@property (readonly, atomic) SOSSessionState state

Declared In

SOSSessionManager.h

Session Management

– startSessionWithOptions:

Starts the process for creating an SOS session.

- (void)startSessionWithOptions:(SOSOptions *)options

Parameters

options

SOSOptions object that determines the behavior of this session.

Discussion

Equivalent to invoking startSessionWithOptions:completion: and providing a nil block.

Declared In

SOSSessionManager.h

– startSessionWithOptions:completion:

Starts the process for creating an SOS session.

- (void)startSessionWithOptions:(SOSOptions *)options completion:(SOSCompletionHandler)block

Parameters

options

SOSOptions object that determines the behavior of this session.

block

Completion block which is executed when the session has been fully connected to all services. At this point the session is active and waiting for an agent to join.

Discussion

By default, the user is asked if they would like to initiate an SOS session. Delegate methods:

Note: The NSError returned in the block is nil on success.

Declared In

SOSSessionManager.h

– stopSession

Begins a teardown of an SOS Session.

- (void)stopSession

Discussion

Equivalent to invoking stopSessionWithCompletion: and providing a nil block.

Declared In

SOSSessionManager.h

– stopSessionWithCompletion:

Begins a teardown of an SOS Session.

- (void)stopSessionWithCompletion:(SOSCompletionHandler)block

Parameters

block

Completion block which is executed when the session has fully stopped, and all connected services have been torn down.

Discussion

By default, the user is asked if they would like to stop the SOS session. Delegate Methods:

Note: The NSError returned in the block is nil on success.

Declared In

SOSSessionManager.h

  screenSharing

Provides a reference to an instance of the SOSScreenSharing class.

@property (readonly, atomic) SOSScreenSharing *screenSharing

Declared In

SOSSessionManager.h

Delegate Management

– addDelegate:

Adds an instance of an NSObject implementing the SOSDelegate protocol to the list of delegates to notify.

- (void)addDelegate:(id<SOSDelegate>)delegate

Parameters

delegate

NSObject instance to add.

Declared In

SOSSessionManager.h

– removeDelegate:

Removes an instance of an NSObject implementing the SOSDelegate protocol to the list of delegates to notify.

- (void)removeDelegate:(id<SOSDelegate>)delegate

Parameters

delegate

NSObject instance to remove.

Declared In

SOSSessionManager.h

Class Methods

+ frameworkVersion

Returns the NSString containing the current version of the framework.

+ (NSString *)frameworkVersion

Return Value

An NSString containing the framework version.

Declared In

SOSSessionManager.h