IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMSignalingManagerabstract

Public Member Functions

virtual ~V2TIMSignalingManager ()
 
virtual void AddSignalingListener (V2TIMSignalingListener *listener)=0
 
virtual void RemoveSignalingListener (V2TIMSignalingListener *listener)=0
 
virtual V2TIMString Invite (const V2TIMString &invitee, const V2TIMString &data, bool onlineUserOnly, const V2TIMOfflinePushInfo &offlinePushInfo, int timeout, V2TIMCallback *callback)=0
 
virtual V2TIMString InviteInGroup (const V2TIMString &groupID, const V2TIMStringVector &inviteeList, const V2TIMString &data, bool onlineUserOnly, int timeout, V2TIMCallback *callback)=0
 
virtual void Cancel (const V2TIMString &inviteID, const V2TIMString &data, V2TIMCallback *callback)=0
 
virtual void Accept (const V2TIMString &inviteID, const V2TIMString &data, V2TIMCallback *callback)=0
 
virtual void Reject (const V2TIMString &inviteID, const V2TIMString &data, V2TIMCallback *callback)=0
 
virtual V2TIMSignalingInfo GetSignalingInfo (const V2TIMMessage &msg)=0
 
virtual void AddInvitedSignaling (const V2TIMSignalingInfo &info, V2TIMCallback *callback)=0
 
virtual void ModifyInvitation (const V2TIMString &inviteID, const V2TIMString &data, V2TIMCallback *callback)=0
 

Constructor & Destructor Documentation

◆ ~V2TIMSignalingManager()

virtual ~V2TIMSignalingManager ( )
inlinevirtual

Member Function Documentation

◆ AddSignalingListener()

virtual void AddSignalingListener ( V2TIMSignalingListener listener)
pure virtual

Add the signaling listener

◆ RemoveSignalingListener()

virtual void RemoveSignalingListener ( V2TIMSignalingListener listener)
pure virtual

Remove the signaling listener

◆ Invite()

virtual V2TIMString Invite ( const V2TIMString invitee,
const V2TIMString data,
bool  onlineUserOnly,
const V2TIMOfflinePushInfo offlinePushInfo,
int  timeout,
V2TIMCallback callback 
)
pure virtual

Invite someone

Parameters
inviteeInvitee's user ID
dataCustom data
onlineUserOnlyWhether the message can be received only by online users. If this field is set to true, the message can be received only by online users, and the invitation and the canceling, accepting, rejecting, and timeout of the invitation will not appear among historical messages.
offlinePushInfoOffline push information, where the desc field is required. The information specified by desc will be displayed by default during push.
timeoutTimeout duration, in seconds. If it is set to 0, the SDK does not perform timeout detection nor trigger the OnInvitationTimeout callback.
Returns
inviteID Invitation ID. If the invitation fails, empty string is returned.

◆ InviteInGroup()

virtual V2TIMString InviteInGroup ( const V2TIMString groupID,
const V2TIMStringVector inviteeList,
const V2TIMString data,
bool  onlineUserOnly,
int  timeout,
V2TIMCallback callback 
)
pure virtual

Invite certain users in the group

Parameters
groupIDID of the inviter's group
inviteeListList of invitees. Invitees specified by inviteeList must be in the group specified by groupID. Otherwise, the invitation fails.
onlineUserOnlyWhether the message can be received only by online users. If this field is set to true, the message can be received only by online users, and the invitation and the canceling, accepting, rejecting, and timeout of the invitation will not appear among historical messages.
timeoutTimeout duration, in seconds. If it is set to 0, the SDK will not perform timeout detection or trigger the onInvitationTimeout callback.
Returns
inviteID Invitation ID. If the invitation fails, empty string is returned.
Attention
Currently, Group invitation does not support offline push. If you need offline push, you can send custom offline push messages to invitees separately For more descriptions, see TRTCAVCallImpl -> sendOnlineMessageWithOfflinePushInfo API

◆ Cancel()

virtual void Cancel ( const V2TIMString inviteID,
const V2TIMString data,
V2TIMCallback callback 
)
pure virtual

Cancel an invitation (called by the inviter)

Parameters
inviteIDInvitation ID
Attention
If all invitees have processed the current invitation (including timeout), the current invitation cannot be cancelled.

◆ Accept()

virtual void Accept ( const V2TIMString inviteID,
const V2TIMString data,
V2TIMCallback callback 
)
pure virtual

The invitee accepts the invitation

Attention
One can accept only invitations targeted at themselves. When receiving the onReceiveNewInvitation callback, check whether the current user is specified in inviteeList. If no, the current user cannot accept the invitation.

◆ Reject()

virtual void Reject ( const V2TIMString inviteID,
const V2TIMString data,
V2TIMCallback callback 
)
pure virtual

The invitee rejects the invitation

Attention
One can reject only invitations targeted at themselves. When receiving the onReceiveNewInvitation callback, check whether the current user is specified in inviteeList. If no, the current user cannot reject the invitation.

◆ GetSignalingInfo()

virtual V2TIMSignalingInfo GetSignalingInfo ( const V2TIMMessage msg)
pure virtual

Get the signaling information

If onlineUserOnly is set to false in the invite operation, a custom message is generated for each signaling operation (including the invite, cancel, accept, reject, and timeout operations). The message will be delivered to users via V2TIMAdvancedMsgListener -> onRecvNewMessage and can be pulled by users via historical message pulling. If you want to customize the display text based on the signaling information, call this API to get the signaling information.

Parameters
msgMessage object
Returns
V2TIMSignalingInfo Signaling information. If the V2TIMSignalingInfo::inviteID value is empty string, msg is not a signaling message.

◆ AddInvitedSignaling()

virtual void AddInvitedSignaling ( const V2TIMSignalingInfo info,
V2TIMCallback callback 
)
pure virtual

Add invitation signaling

This API is mainly used to sync group invitations sent to offline users after they are online.

When the invitee clicks the offline push message notification and starts the App:

  1. If the inviter sends 1v1 signaling while the invitee is offline, the SDK can automatically sync the invitation signaling. If the invitation has not timed out, onReceiveNewInvitation will be triggered.
  2. If the inviter sends group signaling while the invitee is offline, different SDK behaviors are as follows:
  • versions lower than 6.7: SDK cannot automatically sync the invitation signaling. For the invitees to handle the invitation after they are online, the inviter can send an extra C2C offline push message carrying the V2TIMSignalingInfo object to each invitee and, when the invitees receive the offline push message, call addInvitedSignaling to sync V2TIMSignalingInfo to SDK.
  • versions equal or higher than 6.7: SDK can automatically sync messages in the last 30 seconds. If there are invitation signaling messages that have not timed out, onReceiveNewInvitation will be triggered. You don't need to call this API to sync the invitation signaling info.
Attention
If the added signaling information already exists, the callback throws the ERR_SDK_SIGNALING_ALREADY_EXISTS error code.

◆ ModifyInvitation()

virtual void ModifyInvitation ( const V2TIMString inviteID,
const V2TIMString data,
V2TIMCallback callback 
)
pure virtual

Modify the invitation (supported only in 6.7 and later versions)

Attention
Only supports modifying the custom field data of the invitation. Invitation that can only be received by online users cannot be modified.