Skip to content

qchat.attachment.QChatAttachmentModule

Zvicii edited this page Jul 11, 2022 · 7 revisions

Class: QChatAttachmentModule

qchat/attachment.QChatAttachmentModule

Hierarchy

Table of contents

Methods

Properties

Constructors

Methods

eventNames

eventNames(): keyof QChatAttachmentEvents[]

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

Returns

keyof QChatAttachmentEvents[]

Inherited from

EventEmitter.eventNames


listeners

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

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof QChatAttachmentEvents

Parameters

Name Type
event T

Returns

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

Inherited from

EventEmitter.listeners


listenerCount

listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof QChatAttachmentEvents

Returns

number

Inherited from

EventEmitter.listenerCount


emit

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

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends keyof QChatAttachmentEvents

Parameters

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

Returns

boolean

Inherited from

EventEmitter.emit


on

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

Add a listener for a given event.

Type parameters

Name Type
T extends keyof QChatAttachmentEvents

Parameters

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

Returns

QChatAttachmentModule

Inherited from

EventEmitter.on


addListener

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

Type parameters

Name Type
T extends keyof QChatAttachmentEvents

Parameters

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

Returns

QChatAttachmentModule

Inherited from

EventEmitter.addListener


once

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

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof QChatAttachmentEvents

Parameters

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

Returns

QChatAttachmentModule

Inherited from

EventEmitter.once


removeListener

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

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof QChatAttachmentEvents

Parameters

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

Returns

QChatAttachmentModule

Inherited from

EventEmitter.removeListener


off

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

Type parameters

Name Type
T extends keyof QChatAttachmentEvents

Parameters

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

Returns

QChatAttachmentModule

Inherited from

EventEmitter.off


removeAllListeners

removeAllListeners(event?): QChatAttachmentModule

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof QChatAttachmentEvents

Returns

QChatAttachmentModule

Inherited from

EventEmitter.removeAllListeners


initEventHandlers

initEventHandlers(): void

注册全局回调

Returns

void


upload

upload(param): Promise<QChatAttachmentUploadResp>

Fn

upload(param: QChatAttachmentUploadParam) 上传附件

Parameters

Name Type
param QChatAttachmentUploadParam

Returns

Promise<QChatAttachmentUploadResp>

void


stopUpload

stopUpload(param): void

Fn

void StopUpload(const std::string& task_id) 停止上传附件

Parameters

Name Type
param QChatAttachmentStopUploadParam

Returns

void

void


download

download(param): Promise<QChatAttachmentDownloadResp>

Fn

download(param: QChatAttachmentDownloadParam) 下载附件

Parameters

Name Type
param QChatAttachmentDownloadParam

Returns

Promise<QChatAttachmentDownloadResp>

void


stopDownload

stopDownload(param): void

Fn

stopDownload(param: QChatAttachmentStopDownloadParam) 停止下载附件

Parameters

Name Type
param QChatAttachmentStopDownloadParam

Returns

void

void

Properties

instance

instance: any

Defined in

ts/qchat/attachment.ts:27

Constructors

constructor

new QChatAttachmentModule()

Overrides

EventEmitter<QChatAttachmentEvents&gt;.constructor

Clone this wiki locally