IrisRtcChatSession Class Reference

Inherits from IrisRtcJingleSession : NSObject
Declared in IrisRtcChatSession.h

Overview

The IrisRtcChatSession is a class used to create and manage the chat session.

This class provides the below apis

1) Creating the session : API’s to create chat session between the participant involved.

2) Joining the session : Joining the chat session.

3) Sending chat message to the remote participant

4) close api will be used to close the session

Other Methods

  isVideoBridgeEnable

private variable set isVideoBridgeEnable as true to make calls using videobridge.

@property BOOL isVideoBridgeEnable

Discussion

private variable set isVideoBridgeEnable as true to make calls using videobridge.

Declared In

IrisRtcChatSession.h

– createWithRoomId:notificationData:delegate:error:

Creating and starting a chat session using the room id for the room which has been already allocated for the invloved participants.

- (BOOL)createWithRoomId:(NSString *)roomId notificationData:(NSString *)notificationData delegate:(id<IrisRtcChatSessionDelegate>)delegate error:(NSError **)outError

Parameters

roomId

Room Id of the room allocated for the participants invalved.

notificationData

notification data.

delegate

The delegate object for IrisRtcChatSession used to receive the callbacks.

outError

Provides error code and basic error description when any exception occured in api call.

Discussion

Creating and starting a chat session using the room id for the room which has been already allocated for the invloved participants.

Declared In

IrisRtcChatSession.h

– createWithParticipants:notificationData:delegate:error:

Creating and starting a chat session which involves getting the room id from server and creating the room using the room id.

- (BOOL)createWithParticipants:(NSArray *)participants notificationData:(NSString *)notificationData delegate:(id<IrisRtcChatSessionDelegate>)delegate error:(NSError **)outError

Parameters

participants

participants target routing id.

notificationData

notification data.

delegate

The delegate object for IrisRtcVideoSession used to receive the callbacks.

outError

Provides error code and basic error description when any exception occured in api call.

Discussion

Creating and starting a chat session which involves getting the room id from server and creating the room using the room id.

Declared In

IrisRtcChatSession.h

– joinWithSessionId:roomToken:roomTokenExpiryTime:rtcServer:delegate:error:

Joining a chat session which involves starting a session and joining the room with room id which is received in notification

- (BOOL)joinWithSessionId:(NSString *)sessionId roomToken:(NSString *)roomToken roomTokenExpiryTime:(NSInteger)roomTokenExpiry rtcServer:(NSString *)rtcServer delegate:(id<IrisRtcChatSessionDelegate>)delegate error:(NSError **)outError

Parameters

sessionId

room id

roomToken

rooomtoken which is received in notification.

rtcServer

rtcServerURL.

delegate

The delegate object for IrisRtcVideoSession,used to receive the callbacks.

outError

Provides error code and basic error description when any exception occured in api call.

roomTokenExpiryTime

rommtokenexpiry which is received in notification.

Discussion

Joining a chat session which involves starting a session and joining the room with room id which is received in notification

Declared In

IrisRtcChatSession.h

– setUserProfile:

setting up user profile information.

- (void)setUserProfile:(IrisRtcUserProfile *)userProfile

Parameters

userProfile

userprofile information.

Discussion

setting up user profile information.

Declared In

IrisRtcChatSession.h

Sending chat messages

– sendChatMessage:error:

This method is used for sending chat message.

- (BOOL)sendChatMessage:(IrisChatMessage *)message error:(NSError **)outError

Parameters

message

Chat message that needs to be sent

outError

Provides error code and basic error description when any exception occured in api call.

Discussion

This method is used for sending chat message.

Declared In

IrisRtcChatSession.h

Sending chat state

– sendChatState:

This method is used for sending chat state.

- (void)sendChatState:(IrisChatState)state

Parameters

state

Chat state

Discussion

This method is used for sending chat state.

Declared In

IrisRtcChatSession.h

Closing the Session

– close

This method is used for Closing the session.

- (void)close

Discussion

This method is used for Closing the session.

Declared In

IrisRtcChatSession.h