SOSSessionBaseViewController Class Reference

Inherits from UIViewController
Conforms to SOSSessionViewController
Declared in SOSSessionBaseViewController.h

Overview

The SOSScreenSharingBaseViewController serves as the base controller which manages interactions between the UI and SOS backend for the screen sharing phase of SOS.

If you wish to replace the screen sharing UI, your class must implement this base class.

All method overrides require a call back to super for SOS to function properly.

UI Action Handlers

– handlePause:

Action performed when pausing or unpausing an SOS Session.

- (IBAction)handlePause:(id)sender

Parameters

sender

The object which triggered the action.

Discussion

This method will automatically call setSOSPaused:. The value will be derived from the negation of isSOSPaused. If you wish to handle the muted state in a different way, you can ignore this action and use setSOSPaused: directly instead.

Warning: This method is used to communicate between the UI API and the SOS backend. If you wish to override this method you can do so safely; however you must call this method on super. Failure to do so will result in undefined and likely broken behavior from SOS.

Declared In

SOSSessionBaseViewController.h

– handleMute:

Action performed when muting or unmuting the audio for an SOS Session.

- (IBAction)handleMute:(id)sender

Parameters

sender

The object which triggered the action.

Discussion

This method will automatically call setSOSMuted:. The value will be derived from the negation of isSOSMuted. If you wish to handle the muted state in a different way, you can ignore this action and use setSOSMuted: directly instead.

Warning: This method is used to communicate between the UI API and the SOS backend. If you wish to override this method you can do so safely; however you must call this method on super. Failure to do so will result in undefined and likely broken behavior from SOS.

Declared In

SOSSessionBaseViewController.h

– handleEndSession:

Action performed when confirming an end session.

- (IBAction)handleEndSession:(id)sender

Parameters

sender

The object which triggered the action.

Discussion

Warning: Executing this action will immediately trigger the end session cleanup. The responsibility of handling user confirmation remains as an implementation detail for the view controller.

This method is used to communicate between the UI API and the SOS backend. If you wish to override this method you can do so safely; however you must call this method on super. Failure to do so will result in undefined and likely broken behavior from SOS.

Declared In

SOSSessionBaseViewController.h

Session State Management

– setSOSMuted:

Call this (required) method when informing the SOS backend that you wish to mute outgoing audio. This method will instruct the backend to continue/discontinue transmitting audio from the device.

- (void)setSOSMuted:(BOOL)isMuted

Parameters

isMuted

Whether the outgoing audio stream has been muted.

Discussion

Warning: This method is used to communicate between the UI API and the SOS backend. If you wish to override this method you can do so safely; however you must call this method on super. Failure to do so will result in undefined and likely broken behavior from SOS.

Declared In

SOSSessionBaseViewController.h

– isSOSMuted

Call this (required) method to get the current muted state of the SOS Session.

- (BOOL)isSOSMuted

Return Value

The current muted state of the SOS Session.

Discussion

Warning: This method is used to communicate between the UI API and the SOS backend. If you wish to override this method you can do so safely; however you must call this method on super. Failure to do so will result in undefined and likely broken behavior from SOS.

Declared In

SOSSessionBaseViewController.h

– setSOSPaused:

Call this (required) method when informing the SOS backend that you wish to pause the session. This method will instruct the backend to continue/discontinue all audio and video traffic from the device.

- (void)setSOSPaused:(BOOL)isPaused

Parameters

isPaused

Whether the outgoing audio/video traffic has been paused.

Discussion

Warning: This method is used to communicate between the UI API and the SOS backend. If you wish to override this method you can do so safely; however you must call this method on super. Failure to do so will result in undefined and likely broken behavior from SOS.

Declared In

SOSSessionBaseViewController.h

– isSOSPaused

Call this (required) method to get the current local paused state of the SOS Session.

- (BOOL)isSOSPaused

Return Value

The current paused state of the SOS Session.

Discussion

Warning: This method is used to communicate between the UI API and the SOS backend. If you wish to override this method you can do so safely; however you must call this method on super. Failure to do so will result in undefined and likely broken behavior from SOS.

Declared In

SOSSessionBaseViewController.h

– isRecording

This value is set on the service cloud integration. It should not change during the lifetime of a session. You can use this method to determine if you wish to display a recording status in your UI.

- (BOOL)isRecording

Return Value

Whether the session is being recorded.

Discussion

Warning: This method is used to communicate between the UI API and the SOS backend. If you wish to override this method you can do so safely; however you must call this method on super. Failure to do so will result in undefined and likely broken behavior from SOS.

Declared In

SOSSessionBaseViewController.h

Session Information

– agentName

Call this (required) method to get the agent name.

- (NSString *)agentName

Return Value

The agent name.

Discussion

Warning: This method is used to communicate between the UI API and the SOS backend. If you wish to override this method you can do so safely; however you must call this method on super. Failure to do so will result in undefined and likely broken behavior from SOS.

Declared In

SOSSessionBaseViewController.h