Skip to content

qchat.instance.QChatInstanceModule

Zvicii edited this page Feb 10, 2023 · 7 revisions

Class: QChatInstanceModule

qchat/instance.QChatInstanceModule

Hierarchy

Table of contents

Methods

Properties

Constructors

Methods

eventNames

eventNames(): keyof QChatInstanceEvents[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof QChatInstanceEvents[]

Inherited from

EventEmitter.eventNames

Defined in

node_modules/eventemitter3/index.d.ts:15


listeners

listeners<T>(event): (...args: ArgumentMap<QChatInstanceEvents>[Extract<T, keyof QChatInstanceEvents>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof QChatInstanceEvents

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<QChatInstanceEvents>[Extract<T, keyof QChatInstanceEvents>]) => void[]

Inherited from

EventEmitter.listeners

Defined in

node_modules/eventemitter3/index.d.ts:20


listenerCount

listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof QChatInstanceEvents

Returns

number

Inherited from

EventEmitter.listenerCount

Defined in

node_modules/eventemitter3/index.d.ts:27


emit

emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends keyof QChatInstanceEvents

Parameters

Name Type
event T
...args ArgumentMap<QChatInstanceEvents>[Extract<T, keyof QChatInstanceEvents>]

Returns

boolean

Inherited from

EventEmitter.emit

Defined in

node_modules/eventemitter3/index.d.ts:32


on

on<T>(event, fn, context?): QChatInstanceModule

Add a listener for a given event.

Type parameters

Name Type
T extends keyof QChatInstanceEvents

Parameters

Name Type
event T
fn (...args: ArgumentMap<QChatInstanceEvents>[Extract<T, keyof QChatInstanceEvents>]) => void
context? any

Returns

QChatInstanceModule

Inherited from

EventEmitter.on

Defined in

node_modules/eventemitter3/index.d.ts:40


addListener

addListener<T>(event, fn, context?): QChatInstanceModule

Type parameters

Name Type
T extends keyof QChatInstanceEvents

Parameters

Name Type
event T
fn (...args: ArgumentMap<QChatInstanceEvents>[Extract<T, keyof QChatInstanceEvents>]) => void
context? any

Returns

QChatInstanceModule

Inherited from

EventEmitter.addListener

Defined in

node_modules/eventemitter3/index.d.ts:45


once

once<T>(event, fn, context?): QChatInstanceModule

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof QChatInstanceEvents

Parameters

Name Type
event T
fn (...args: ArgumentMap<QChatInstanceEvents>[Extract<T, keyof QChatInstanceEvents>]) => void
context? any

Returns

QChatInstanceModule

Inherited from

EventEmitter.once

Defined in

node_modules/eventemitter3/index.d.ts:54


removeListener

removeListener<T>(event, fn?, context?, once?): QChatInstanceModule

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof QChatInstanceEvents

Parameters

Name Type
event T
fn? (...args: ArgumentMap<QChatInstanceEvents>[Extract<T, keyof QChatInstanceEvents>]) => void
context? any
once? boolean

Returns

QChatInstanceModule

Inherited from

EventEmitter.removeListener

Defined in

node_modules/eventemitter3/index.d.ts:63


off

off<T>(event, fn?, context?, once?): QChatInstanceModule

Type parameters

Name Type
T extends keyof QChatInstanceEvents

Parameters

Name Type
event T
fn? (...args: ArgumentMap<QChatInstanceEvents>[Extract<T, keyof QChatInstanceEvents>]) => void
context? any
once? boolean

Returns

QChatInstanceModule

Inherited from

EventEmitter.off

Defined in

node_modules/eventemitter3/index.d.ts:69


removeAllListeners

removeAllListeners(event?): QChatInstanceModule

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof QChatInstanceEvents

Returns

QChatInstanceModule

Inherited from

EventEmitter.removeAllListeners

Defined in

node_modules/eventemitter3/index.d.ts:79


initEventHandlers

initEventHandlers(): void

注册全局回调

Returns

void

Defined in

ts/qchat/instance.ts:32


init

init(param): boolean

Fn

init(param: QChatInitParam) 圈组模块初始化(SDK初始化时调用一次) @param[in] param 接口参数

Parameters

Name Type
param QChatInitParam

Returns

boolean

boolean 模块加载结果

Defined in

ts/qchat/instance.ts:40


cleanup

cleanup(param): boolean

Fn

cleanup(param: QChatCleanupParam) 圈组模块清理(卸载SDK时调用一次) @param[in] param 接口参数

Parameters

Name Type
param QChatCleanupParam

Returns

boolean

boolean 模块清理结果

Defined in

ts/qchat/instance.ts:49


login

login(param): Promise<QChatLoginResp>

Fn

login(param: QChatLoginParam) 登录圈组 @param[in] param 接口参数

Parameters

Name Type
param QChatLoginParam

Returns

Promise<QChatLoginResp>

void

Defined in

ts/qchat/instance.ts:58


logout

logout(param): Promise<QChatLogoutResp>

Fn

logout(param: QChatLogoutParam) 登出圈组 @param[in] param 接口参数

Parameters

Name Type
param QChatLogoutParam

Returns

Promise<QChatLogoutResp>

void

Defined in

ts/qchat/instance.ts:73


kickOtherClients

kickOtherClients(param): Promise<QChatKickResp>

Fn

kickOtherClients(param: QChatKickParam) 踢掉自己指定的一个其他端 @param[in] param 接口参数

Parameters

Name Type
param QChatKickParam

Returns

Promise<QChatKickResp>

void

Defined in

ts/qchat/instance.ts:88

Properties

instance

instance: any

Defined in

ts/qchat/instance.ts:26

Constructors

constructor

new QChatInstanceModule()

Overrides

EventEmitter<QChatInstanceEvents&gt;.constructor

Defined in

ts/qchat/instance.ts:27

Clone this wiki locally