SignallingService class
Constructors
- SignallingService(MethodChannel methodChannel, dynamic handlerMap)
Properties
-
callbacks
↔ Map<
String, dynamic> -
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- receiptIdKey → String
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
acceptInvite(
{required String channelId, required String accountId, required String requestId, String? customInfo, bool? offlineEnable, required Callback callback}) → Future< void> - 接受对方邀请,但并不代表加入了频道,如果想在接受邀请时自动加入频道, acceptInviteAndJoin 错误码如下: 10201:已经成功拒绝邀请但是对方不在线 10404:频道不存在 10408:邀请不存在或已过期 10409:邀请已经拒绝 10410:邀请已经接受 回调返回: code = 200 为成功
-
acceptInviteAndJoin(
{required String channelId, required String accountId, required String requestId, String? customInfo, bool? offlineEnable, BigInt? selfUid, required Callback< ChannelFullInfo> callback}) → Future<void> - 接受对方邀请并自动加入频道, 组合接口 错误码如下: 10420:自己的其他端已经在频道内 10201:已经成功拒绝邀请但是对方不在线 10404:频道不存在 10407:已经频道内 10408:邀请不存在或已过期 10409:邀请已经拒绝 10410:邀请已经接受 10417:uid冲突 10419:频道人数超限 回调返回: code = 200 为成功 data: ChannelFullInfo
-
buildArguments<
T> ({Map? arg, Callback< T> ? callback}) → Map<String, dynamic> -
build arguments for methodChannel
inherited
-
call(
{required ChannelType type, required String accountId, required String requestId, String? channelName, String? channelExt, BigInt? selfUid, bool? offlineEnable, String? customInfo, required SignallingPushConfig pushConfig, required Callback< ChannelFullInfo> callback}) → Future<void> - 直接呼叫 , 用于用户新开一个频道并邀请对方加入频道。该接口为组合接口,等同于用户先创建频道,然后加入频道并邀请对方 错误码如下: 10201:已经成功发出命令但是对方不在线(推送可达,但是离线) 10202: 已经成功发出邀请但是对方推送不可达 10405:频道已存在 回调返回: code = 200 为成功 data: ChannelFullInfo
-
cancelInvite(
{required String channelId, required String accountId, required String requestId, String? customInfo, bool? offlineEnable, required Callback callback}) → Future< void> - 邀取消邀请 错误码如下: 10404:频道不存在 10408:邀请不存在或已过期 10409:邀请已经拒绝 10410:邀请已经接受 回调返回: code = 200 为成功
-
close(
{required String channelId, bool? offlineEnable, String? customInfo, required Callback callback}) → Future< void> -
关闭频道
错误码如下:
10406:不在频道内 -
create(
{required ChannelType type, required String channelName, String? channelExt, required Callback< ChannelBaseInfo> callback}) → Future<void> -
创建频道
同一时刻频道名互斥,不能重复创建,但如果频道名缺省,服务器会自动分配频道id。
错误码如下:
10405:频道已存在 回调返回: code = 200 为成功 data: ChannelBaseInfo -
invite(
{required String channelId, required String accountId, required String requestId, String? customInfo, required SignallingPushConfig pushConfig, bool? offlineEnable, required Callback callback}) → Future< void> - 邀请他人加入频道 该接口用于邀请对方加入频道,邀请者必须是创建者或者是频道中成员。如果需要对离线成员邀请,可以打开离线邀请开关并填写推送信息,被邀请者上线后通过离线通知接收到该邀请。 错误码如下: 10201:已经成功发出邀请但是对方不在线(推送可达,但是离线) 10202:已经成功发出邀请但是对方推送不可达 10404:频道不存在 10406:自己不在频道内(仅对于普通用户,频道创建者不在频道内也可以邀请别人) 10407:对方已经频道内 10419:频道人数超限 回调返回: code = 200 为成功
-
join(
{required String channelId, int? selfUid, String? customInfo, bool? offlineEnable, required Callback< ChannelFullInfo> callback}) → Future<void> -
加入频道
错误码如下:
10407:已经频道内 10417:uid冲突 10419:频道人数超限 10420:自己的其他端已经在频道内 -
leave(
{required String channelId, bool? offlineEnable, String? customInfo, required Callback callback}) → Future< void> - 离开频道 错误码如下: 10406:不在频道内
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryChannelInfo(
{required String channelName, required Callback< ChannelFullInfo> callback}) → Future<void> - 根据channelName反查channelInfo 错误码如下: 10404:频道不存在 回调返回: code = 200 为成功 data: ChannelBaseInfo
-
rejectInvite(
{required String channelId, required String accountId, required String requestId, String? customInfo, bool? offlineEnable, required Callback callback}) → Future< void> - 拒绝对方邀请 错误码如下: 10201:已经成功拒绝邀请但是对方不在线 10404:频道不存在 10408:邀请不存在或已过期 10409:邀请已经拒绝 10410:邀请已经接受 回调返回: code = 200 为成功
-
sendControl(
{required String channelId, String? accountId, String? customInfo, required Callback< void> callback}) → Future<void> - 该接口用于在频道中透传一些自定义指令,协助频道管理。该接口允许非频道内成员调用,但接收者必须是频道内成员或创建者 accountId 不传表示通知所有人 错误码如下: 10201:已经成功发出命令但是对方不在线(推送可达,但是离线) 10404:频道不存在 10406:不在频道内(自己或者对方) 回调返回: code = 200 为成功
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited