SOSSessionManager
@interface SOSSessionManager : NSObject
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]
.
-
Public reference to the
SOSScreenAnnotations
instance used by the SOS framework.Declaration
Objective-C
@property (readonly, atomic) SOSScreenAnnotations *annotations;
Swift
var annotations: SOSScreenAnnotations! { get }
-
Public reference to the
SOSMasking
instance used by the SOS framework.Declaration
Objective-C
@property (readonly, atomic) SOSMasking *masking;
Swift
var masking: SOSMasking! { get }
-
Public reference to the
SOSAgentAvailability
object used for checking availability of SOS agents.Declaration
Objective-C
@property (readonly, atomic) SOSAgentAvailability *agentAvailability;
Swift
var agentAvailability: SOSAgentAvailability! { get }
-
Public reference to the
SOSNetworkReporter
object. This object will accept delegates to listen to audio and video network traffic events.See
SOSNetworkReportDelegateDeclaration
Objective-C
@property (readonly, atomic) SOSNetworkReporter *networkReporter;
Swift
var networkReporter: SOSNetworkReporter! { get }
-
The current
SOSSessionState
.Declaration
Objective-C
@property (readonly, atomic) SOSSessionState state;
Swift
var state: SOSSessionState { get }
-
Starts the process for creating an SOS session.
Equivalent to invoking
-startSessionWithOptions:completion:
and providing anil
block.See
Declaration
Objective-C
- (void)startSessionWithOptions:(SOSOptions *)options;
Swift
func startSession(with options: SOSOptions!)
Parameters
options
SOSOptions
object that determines the behavior of this session. -
Starts the process for creating an SOS session.
By default, the user is asked if they would like to initiate an SOS session. Delegate methods:
-[SOSDelegate sosDidConnect:]
– Invoked when all session handshakes and negotiations have completed. The session is fully connected now.-[SOSDelegate sosDidStart:]
– Invoked when the session has begun negotiating with required services.-[SOSDelegate sos:stateDidChange:previous:]
– Invoked at each state change.-[SOSDelegate sos:didError:]
– Invoked if there is an error at any point during the lifetime of a session.Note
The
NSError
returned in the block isnil
on success.See
See
Declaration
Objective-C
- (void)startSessionWithOptions:(SOSOptions *)options completion:(__strong SOSCompletionHandler)block;
Swift
func startSession(with options: SOSOptions!, completion block: SOSCompletionHandler!)
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.
-
Begins a teardown of an SOS Session.
Equivalent to invoking
-stopSessionWithCompletion:
and providing anil
block.Declaration
Objective-C
- (void)stopSession;
Swift
func stopSession()
-
Begins a teardown of an SOS Session.
By default, the user is asked if they would like to stop the SOS session. Delegate Methods:
-[SOSDelegate sos:didStopWithReason:error:]
– Invoked when the session has been fully torn down.-[SOSDelegate sos:stateDidChange:previous:]
– Invoked at each state change.-[SOSDelegate sos:didError:]
– Invoked if there is an error at any point during the lifetime of a session.Note
The
NSError
returned in the block isnil
on success.See
Declaration
Objective-C
- (void)stopSessionWithCompletion:(__strong SOSCompletionHandler)block;
Swift
func stopSession(completion block: SOSCompletionHandler!)
Parameters
block
Completion block which is executed when the session has fully stopped, and all connected services have been torn down.
-
Provides a reference to an instance of the
SOSScreenSharing
class.Declaration
Objective-C
@property (readonly, atomic) SOSScreenSharing *screenSharing;
Swift
var screenSharing: SOSScreenSharing! { get }
-
Adds an instance of an
NSObject
implementing theSOSDelegate
protocol to the list of delegates to notify.Declaration
Objective-C
- (void)addDelegate:(id<SOSDelegate>)delegate;
Swift
func add(_ delegate: SOSDelegate!)
Parameters
delegate
NSObject
instance to add. -
Removes an instance of an
NSObject
implementing theSOSDelegate
protocol to the list of delegates to notify.Declaration
Objective-C
- (void)removeDelegate:(id<SOSDelegate>)delegate;
Swift
func remove(_ delegate: SOSDelegate!)
Parameters
delegate
NSObject
instance to remove.
-
Returns the
NSString
containing the current version of the framework.Declaration
Objective-C
+ (NSString *)frameworkVersion;
Swift
class func frameworkVersion() -> String!
Return Value
An
NSString
containing the framework version.