| Jabber Guest iOS SDK

- Main Page
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Functions Variables Enumerations Enumerator Properties Groups
Class Methods | List of all members
CJGuestCall Class Reference

This is the main class of the Jabber Guest iOS SDK. More...

`#import <JabberGuest/JabberGuest.h>`

Inherits NSObject.

## Class Methods
(CJGuestCall *) | + sharedInstance
| This method returns the active call instance. More...
(NSDictionary *) | + parseQueryString:
| This is a utility method that can be used to parse a Jabber Guest formatted URI passed to the iOS app on start-up. More...
(NSArray *) | + getAllLogs
| Returns an array of file names corresponding to the log files that exist on the device. More...
(NSString *) | + stringFromCallState:
| This will convert the call state enumeration to a string representation for diagnostics or troubleshooting. More...
(NSString *) | + stringFromMuteState:
| This will convert the mute state enumeration to a string representation for diagnostics or troubleshooting. More...

## Initializers
Although the initializers are accessible, the CJGuestCall object should be accessed through the sharedInstance (CJGuestCall) method.
(id) | - init
| Initializes an instance of CJGuestCall. More...
(id) | - initWithServerName:toURI:
| Initializes an instance of CJGuestCall with the serverName and toURI. More...

## Configuration
NSString * | serverName
| The server name through which we will establish this call.
NSString * | toURI
| The URI of the remote end point to which the call should be established. More...

## Video Control
IBOutlet UIImageView * | selfView
| The selfView will be updated with video from the camera on the device, providing feedback so the user can see what is being sent to the remote party in the call.
CGSize | selfSize
| The size of the self view video image.
IBOutlet UIImageView * | remoteView
| This will be updated with video sent from the remote endpoint of the call.
CGSize | remoteSize
| The size of the remote video image.
UIDeviceOrientation | captureOrientation
| Indicates the orientation of the device so the video capture can compensate and send the video in the correct orientation.
(void) | - startSelfView:
| This will begin capturing video from the local capture device and sending the video to the selfView if it was set. More...
(void) | - stopSelfView
| This will stop capturing video from the local capture device and sending the video to the selfView if it was set.
(void) | - switchCamera
| Cycle the local capture device to the next available one.

## Call Control
(void) | - startCall:
| After setting the serverName and toURI properties, call this method to establish a call with the remote endpoint. More...
(void) | - endCall
| After calling startCall() to establish the call with the remote endpoint, call this method to end the call and stop any media transmission between the local and remote endpoint.

## Call State
enum | CJGuestCallStateType { GuestCallStateNotInitialized, GuestCallStateDisconnected, GuestCallStateConnecting, GuestCallStateConnected, GuestCallStateDisconnecting }
| This identifies the progress of the call as the call is established with the remote endpoint. More...
CJGuestCallStateType | callState
| Indicates the current state of the call.

## Mute State
enum | CJGuestMuteStateType { GuestMuteStateMuted, GuestMuteStateUnmuting, GuestMuteStateUnmuted, GuestMuteStateMuting }
| Muting or unmuting a media stream requires some coordination between resources, so the state of the media stream will transition between these values. More...
CJGuestMuteStateType | audioOutState
| Represents the mute state of the audio being sent to the remote end point.
CJGuestMuteStateType | videoOutState
| Represents the mute state of the video being sent to the remote end point.
CJGuestMuteStateType | audioInState
| Represents the mute state of the audio being received by the local end point.
CJGuestMuteStateType | videoInState
| Represents the mute state of the video being received by the local end point.
BOOL | audioOutMuted
| Convenience property for determining whether the audio output is muted. More...
BOOL | audioOutUnmuted
| Convenience property for determining whether the audio output is unmuted. More...
BOOL | audioInMuted
| Convenience property for determining whether the audio input is muted. More...
BOOL | audioInUnmuted
| Convenience property for determining whether the audio input is unmuted. More...
BOOL | videoOutMuted
| Convenience property for determining whether the video output is muted. More...
BOOL | videoOutUnmuted
| Convenience property for determining whether the video output is unmuted. More...
BOOL | videoInMuted
| Convenience property for determining whether the video input is muted. More...
BOOL | videoInUnmuted
| Convenience property for determining whether the video input is unmuted. More...
(void) | - muteAudioOut
| Start the process of muting the audio output. More...
(void) | - unmuteAudioOut
| Start the process of unmuting the audio output. More...
(void) | - muteVideoOut
| Start the process of muting the video output. More...
(void) | - unmuteVideoOut
| Start the process of unmuting the video output. More...

## DTMF Control
NSString * | sentDTMF
| Provides a string representation of the last DTMF digit sent.
(void) | - sendDTMF:
| Add a single digit to the queue of digits being sent to the remote endpoint. More...
(void) | - sendDTMFString:
| Add a sequence of DTMF (0-9, *, #) to the queue of digits being sent to the remote endpoint. More...

## Miscellaneous
IBOutlet id < CJGuestInvalidCertDelegate > | invalidCertDelegate
| This delegate is called when HTTP requests encounter problems verifying the certificate for a web site. More...
BOOL ready | DEPRECATED_ATTRIBUTE
| Indicates the call is ready and active (it is not disconnected).
CJGuestAudioStatistics * | audioStatistics
| Provides access to the audio stream statistics.
CJGuestVideoStatistics * | videoStatistics
| Provides access to the video stream statistics.
NSString * | htmlCallStatistics
| Provides an HTML formatted view of the audio and video statistics for display in a web view, or web browser.
(void) | - audioSetActive:
| Changes the state of the audio session, giving or removing control over the audio inputs to the application. More...

## Network Status
enum | CJGuestNetworkStatus
(void) | - updateNetworkStatus:
| Notify that network status has changed. More...

## Detailed Description

This is the main class of the Jabber Guest iOS SDK.

CJGuestCall represents the lifecycle of a single entire call. Only one instance of this class exists, and that instance is accessed through the sharedInstance (CJGuestCall) static method.

CJGuestCall will also send out notifications via NSNotificationCenter whenever specific events occur, like the call state changed, or a DTMF was sent on the call. Any component interested in responding to these notifications should register for them by adding an observer through the NSNotificationCenter.

## Member Enumeration Documentation

- (enum) CJGuestCallStateType

This identifies the progress of the call as the call is established with the remote endpoint.

Enumerator
GuestCallStateNotInitialized | CJGuestCall has not been initialized with a valid server name.
GuestCallStateDisconnected | CJGuestCall is not communicating with any remote endpoints and is ready to establish a new communication session.
GuestCallStateConnecting | CJGuestCall is trying to connect a call to the called party from the URI that it was given. During this time, the CJGuestCall instance is attempting to connect to the called party, negotiate audio and/or video via SDP, and setup the multimedia streams as appropriate.
GuestCallStateConnected | CJGuestCall instance is currently connected to the called party from the URI that it was given. All applicable audio and/or video streams are established and an active call is in progress.
GuestCallStateDisconnecting | CJGuestCall instance is either attempting to end an active call at the request of the device user, or the called party has ended the active call. During this state, the CJGuestCall instance will begin cleaning up all resources related to the previous call as appropriate.

- (enum) CJGuestMuteStateType

Muting or unmuting a media stream requires some coordination between resources, so the state of the media stream will transition between these values.

Enumerator
GuestMuteStateMuted | The media stream is muted, no media is passing.
GuestMuteStateUnmuting | The media stream is transitioning to the unmuted state and may not be passing media.
GuestMuteStateUnmuted | The media stream is unmuted, media is passing.
GuestMuteStateMuting | The media stream is transitioning to the muted state and may be passing media.

## Method Documentation

- (void) audioSetActive: |  | (BOOL) | active |

Changes the state of the audio session, giving or removing control over the audio inputs to the application.

It also allows the application to use a bluetooth device for audio input.

Parameters

  active | true - Activate the audio session for the application. false - Deactivate the audio session for the application, allowing other applications to gain control over the audio session.

+ (NSArray *) getAllLogs |  |  |

Returns an array of file names corresponding to the log files that exist on the device.

Returns
  A list of file names corresponding to the log files.

- (id) init |  |  |

Initializes an instance of CJGuestCall.

Returns
  The initialized instance of CJGuestCall.

- (id) initWithServerName: |  | (NSString *) | serverName
toURI: |  | (NSString *) | toURI

Initializes an instance of CJGuestCall with the serverName and toURI.

Parameters

  serverName | The name of the server through which we will connected with the remote endpoint.
  toURI | The URI of the endpoint to which we would like to connect.

Returns
  The initialized instance of CJGuestCall

See Also
  serverName, toURI

- (void) muteAudioOut |  |  |

Start the process of muting the audio output.

The audio output will not be muted immediately, but audioOutState will transition from unmuted to muting and then to muted.

- (void) muteVideoOut |  |  |

Start the process of muting the video output.

The video output will not be muted immediately, but videoOutState will transition from unmuted to muting and then to muted.

+ (NSDictionary *) parseQueryString: |  | (NSString *) | query |

This is a utility method that can be used to parse a Jabber Guest formatted URI passed to the iOS app on start-up.

Parameters

  query | The query string to parse for name value pairs.

Returns
  A dictionary containing the key value pairs from the passed query string.

- (void) sendDTMF: |  | (char) | dtmf |

Add a single digit to the queue of digits being sent to the remote endpoint.

Parameters

  dtmf | The DTMF (0-9, *, #) to add to the queue.

See Also
  - sendDTMFString:

- (void) sendDTMFString: |  | (NSString *) | dtmfString |

Add a sequence of DTMF (0-9, *, #) to the queue of digits being sent to the remote endpoint.

Once you've added the DTMF to the queue, they will be sent to the remote endpoint with specific timing. Use the sentDTMF property and CJGuestCallSentDTMFNotification to determine which DTMF was last sent.

Parameters

  dtmfString | the sequence of DTMF to add to the queue.

+ (CJGuestCall *) sharedInstance |  |  |

This method returns the active call instance.

Returns
  The active call instance.

- (void) startCall: |  | (CJGuestVideoLicenseCompletion) | completion |

After setting the serverName and toURI properties, call this method to establish a call with the remote endpoint.

Parameters

  completion,: | block to be executed upon completion

- (void) startSelfView: |  | (CJGuestVideoLicenseCompletion) | completion |

This will begin capturing video from the local capture device and sending the video to the selfView if it was set.

Parameters

  completion,: | block to be executed upon completion

+ (NSString *) stringFromCallState: |  | (CJGuestCallStateType) | state |

This will convert the call state enumeration to a string representation for diagnostics or troubleshooting.

Parameters

  state | The call state for which you would like the string representation.

Returns
  The string representation of the state value.

+ (NSString *) stringFromMuteState: |  | (CJGuestMuteStateType) | state |

This will convert the mute state enumeration to a string representation for diagnostics or troubleshooting.

Parameters

  state | The mute state for which you would like the string representation.

Returns
  The string representation of the state value.

- (void) unmuteAudioOut |  |  |

Start the process of unmuting the audio output.

The audio output will not be unmuted immediately, but audioOutState will transition from muted to unmuting and then to unmuted.

- (void) unmuteVideoOut |  |  |

Start the process of unmuting the video output.

The video output will not be unmuted immediately, but videoOutState will transition from muted to unmuting and then to unmuted.

- (void) updateNetworkStatus: |  | (CJGuestNetworkStatus) | networkStatus |

Notify that network status has changed.

Parameters

  networkStatus | see above

## Property Documentation

- (BOOL) audioInMuted
| read nonatomic assign

Convenience property for determining whether the audio input is muted.

See Also
  audioInState

- (BOOL) audioInUnmuted
| read nonatomic assign

Convenience property for determining whether the audio input is unmuted.

See Also
  audioInState

- (BOOL) audioOutMuted
| read nonatomic assign

Convenience property for determining whether the audio output is muted.

See Also
  audioOutState

- (BOOL) audioOutUnmuted
| read nonatomic assign

Convenience property for determining whether the audio output is unmuted.

See Also
  audioOutState

- (IBOutlet id<CJGuestInvalidCertDelegate>) invalidCertDelegate
| read write nonatomic weak

This delegate is called when HTTP requests encounter problems verifying the certificate for a web site.

Implementing this delegate gives control over accepting or rejecting the certificate being verified.

- (NSString*) toURI
| read write nonatomic strong

The URI of the remote end point to which the call should be established.

Examples:

- 18005551212
- 5000
- 5000@.nosp@m.exam.nosp@m.ple.c.nosp@m.om

- (BOOL) videoInMuted
| read nonatomic assign

Convenience property for determining whether the video input is muted.

See Also
  videoInState

- (BOOL) videoInUnmuted
| read nonatomic assign

Convenience property for determining whether the video input is unmuted.

See Also
  videoInState

- (BOOL) videoOutMuted
| read nonatomic assign

Convenience property for determining whether the video output is muted.

See Also
  videoOutState

- (BOOL) videoOutUnmuted
| read nonatomic assign

Convenience property for determining whether the video output is unmuted.

See Also
  videoOutState