-
Notifications
You must be signed in to change notification settings - Fork 2
qchat.attachment.QChatAttachmentModule
qchat/attachment.QChatAttachmentModule
-
EventEmitter
<QChatAttachmentEvents
>↳
QChatAttachmentModule
- eventNames
- listeners
- listenerCount
- emit
- on
- addListener
- once
- removeListener
- off
- removeAllListeners
- initEventHandlers
- upload
- stopUpload
- download
- stopDownload
▸ eventNames(): keyof QChatAttachmentEvents
[]
Return an array listing the events for which the emitter has registered listeners.
keyof QChatAttachmentEvents
[]
EventEmitter.eventNames
▸ listeners<T
>(event
): (...args
: ArgumentMap
<QChatAttachmentEvents
>[Extract
<T
, keyof QChatAttachmentEvents
>]) => void
[]
Return the listeners registered for a given event.
Name | Type |
---|---|
T |
extends keyof QChatAttachmentEvents
|
Name | Type |
---|---|
event |
T |
(...args
: ArgumentMap
<QChatAttachmentEvents
>[Extract
<T
, keyof QChatAttachmentEvents
>]) => void
[]
EventEmitter.listeners
▸ listenerCount(event
): number
Return the number of listeners listening to a given event.
Name | Type |
---|---|
event |
keyof QChatAttachmentEvents
|
number
EventEmitter.listenerCount
▸ emit<T
>(event
, ...args
): boolean
Calls each of the listeners registered for a given event.
Name | Type |
---|---|
T |
extends keyof QChatAttachmentEvents
|
Name | Type |
---|---|
event |
T |
...args |
ArgumentMap <QChatAttachmentEvents >[Extract <T , keyof QChatAttachmentEvents >] |
boolean
EventEmitter.emit
▸ on<T
>(event
, fn
, context?
): QChatAttachmentModule
Add a listener for a given event.
Name | Type |
---|---|
T |
extends keyof QChatAttachmentEvents
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <QChatAttachmentEvents >[Extract <T , keyof QChatAttachmentEvents >]) => void
|
context? |
any |
EventEmitter.on
▸ addListener<T
>(event
, fn
, context?
): QChatAttachmentModule
Name | Type |
---|---|
T |
extends keyof QChatAttachmentEvents
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <QChatAttachmentEvents >[Extract <T , keyof QChatAttachmentEvents >]) => void
|
context? |
any |
EventEmitter.addListener
▸ once<T
>(event
, fn
, context?
): QChatAttachmentModule
Add a one-time listener for a given event.
Name | Type |
---|---|
T |
extends keyof QChatAttachmentEvents
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <QChatAttachmentEvents >[Extract <T , keyof QChatAttachmentEvents >]) => void
|
context? |
any |
EventEmitter.once
▸ removeListener<T
>(event
, fn?
, context?
, once?
): QChatAttachmentModule
Remove the listeners of a given event.
Name | Type |
---|---|
T |
extends keyof QChatAttachmentEvents
|
Name | Type |
---|---|
event |
T |
fn? |
(...args : ArgumentMap <QChatAttachmentEvents >[Extract <T , keyof QChatAttachmentEvents >]) => void
|
context? |
any |
once? |
boolean |
EventEmitter.removeListener
▸ off<T
>(event
, fn?
, context?
, once?
): QChatAttachmentModule
Name | Type |
---|---|
T |
extends keyof QChatAttachmentEvents
|
Name | Type |
---|---|
event |
T |
fn? |
(...args : ArgumentMap <QChatAttachmentEvents >[Extract <T , keyof QChatAttachmentEvents >]) => void
|
context? |
any |
once? |
boolean |
EventEmitter.off
▸ removeAllListeners(event?
): QChatAttachmentModule
Remove all listeners, or those of the specified event.
Name | Type |
---|---|
event? |
keyof QChatAttachmentEvents
|
EventEmitter.removeAllListeners
▸ initEventHandlers(): void
注册全局回调
void
▸ upload(param
): Promise
<QChatAttachmentUploadResp
>
Fn
upload(param: QChatAttachmentUploadParam) 上传附件
Name | Type |
---|---|
param |
QChatAttachmentUploadParam |
Promise
<QChatAttachmentUploadResp
>
void
▸ stopUpload(param
): void
Fn
void StopUpload(const std::string& task_id) 停止上传附件
Name | Type |
---|---|
param |
QChatAttachmentStopUploadParam |
void
void
▸ download(param
): Promise
<QChatAttachmentDownloadResp
>
Fn
download(param: QChatAttachmentDownloadParam) 下载附件
Name | Type |
---|---|
param |
QChatAttachmentDownloadParam |
Promise
<QChatAttachmentDownloadResp
>
void
▸ stopDownload(param
): void
Fn
stopDownload(param: QChatAttachmentStopDownloadParam) 停止下载附件
Name | Type |
---|---|
param |
QChatAttachmentStopDownloadParam |
void
void
• instance: any
• new QChatAttachmentModule()
EventEmitter<QChatAttachmentEvents>.constructor
- chatroom/chatroom
- chatroom_def/chatroom_def
- nim/client
- nim/data_sync
- nim/friend
- nim/global
- nim/msglog
- nim/nos
- nim/online_session
- nim/pass_through_proxy
- nim/plugin
- nim/session
- nim/subscribe_event
- nim/super_team
- nim/sysmsg
- nim/talk
- nim/talkex
- nim/team
- nim/tool
- nim/user
- nim_def/client_def
- nim_def/data_sync_def
- nim_def/doc_trans_def
- nim_def/friend_def
- nim_def/global_def
- nim_def/msglog_def
- nim_def/nos_def
- nim_def/online_session_def
- nim_def/pass_through_proxy_def
- nim_def/plugin_def
- nim_def/session_def
- nim_def/subscribe_event_def
- nim_def/super_team_def
- nim_def/sysmsg_def
- nim_def/talk_def
- nim_def/talkex_def
- nim_def/team_def
- nim_def/tool_def
- nim_def/user_def
- node-nim
- qchat/attachment
- qchat/channel
- qchat/channel_category
- qchat/instance
- qchat/message
- qchat/role
- qchat/server
- qchat/system_notification
- qchat_def/attachment_def
- qchat_def/channel_def
- qchat_def/instance_def
- qchat_def/message_def
- qchat_def/public_def
- qchat_def/role_def
- qchat_def/server_def
- qchat_def/system_notification_def