floo::BMXVoiceAttachment#
音訊訊息附件
#include <bmx_voice_attachment.h>
Inherits from floo::BMXFileAttachment, floo::BMXMessageAttachment, BMXBaseObject
Public Functions#
| Name | |
|---|---|
| BMXVoiceAttachment(const std::string & path, int duration, const std::string & displayName ="") 構造函數,構建發送音訊訊息附件 | |
| BMXVoiceAttachment(const std::string & ratelUrl, int duration, const std::string & displayName, int64_t fileLength) 構造函數,構建接收音訊訊息附件 | |
| virtual | ~BMXVoiceAttachment() 析構函數 |
| virtual Type | type() const 回傳檔案類型 |
| virtual BMXMessageAttachmentPtr | clone() const 克隆函數 |
| int32_t | duration() const 語音時長 |
Friends#
Additional inherited members#
Public Functions inherited from floo::BMXFileAttachment
| Name | |
|---|---|
| BMXFileAttachment(const std::string & path, const std::string & displayName ="") 構造函數,構建發送檔案訊息附件 | |
| BMXFileAttachment(const std::string & ratelUrl, const std::string & displayName, int64_t fileLength) 構造函數,構建接收檔案訊息附件 | |
| virtual | ~BMXFileAttachment() 析構函數 |
| const std::string & | path() const 本地路徑 |
| const std::string & | displayName() const 顯示名 |
| const std::string & | ratelUrl() const 遠程ratel使用URL |
| const std::string & | url() const 遠程使用URL |
| int64_t | fileLength() const 檔案長度 |
| DownloadStatus | downloadStatus() const 附件下載狀態 |
Protected Attributes inherited from floo::BMXFileAttachment
| Name | |
|---|---|
| std::string | mPath |
| std::string | mDisplayName |
| std::string | mRatelUrl |
| std::string | mUrl |
| int64_t | mFileLength |
| DownloadStatus | mDownloadStatus |
Friends inherited from floo::BMXFileAttachment
| Name | |
|---|---|
| class | Encoder< BMXFileAttachment > |
| class | Decoder< BMXFileAttachment > |
Public Types inherited from floo::BMXMessageAttachment
| Name | |
|---|---|
| enum class | Type { Image, Voice, Video, File, Location, Command, Forward} 附件類型 |
| enum class | DownloadStatus { Downloaing, Successed, Failed, NotStart, Canceled} 附件下載狀態 |
Public Functions inherited from floo::BMXMessageAttachment
| Name | |
|---|---|
| BMXMessageAttachment() 構造函數 | |
| virtual | ~BMXMessageAttachment() 析構函數 |
Public Functions Documentation#
function BMXVoiceAttachment#
BMXVoiceAttachment(
const std::string & path,
int duration,
const std::string & displayName =""
)
構造函數,構建發送音訊訊息附件
Parameters:
- path 檔案的本地路徑
- duration 音訊時長
- displayName 檔案展示名
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVoiceAttachment",function="BMXVoiceAttachment" %}{% endlanying_code_snippet %}
function BMXVoiceAttachment#
BMXVoiceAttachment(
const std::string & ratelUrl,
int duration,
const std::string & displayName,
int64_t fileLength
)
構造函數,構建接收音訊訊息附件
Parameters:
- ratelUrl ratel檔案伺服器地址
- duration 音訊時長
- displayName 檔案展示名
- fileLength 檔案大小
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVoiceAttachment",function="BMXVoiceAttachment" %}{% endlanying_code_snippet %}
function ~BMXVoiceAttachment#
inline virtual ~BMXVoiceAttachment()
析構函數
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVoiceAttachment",function="~BMXVoiceAttachment" %}{% endlanying_code_snippet %}
function type#
inline virtual Type type() const
回傳檔案類型
Return: Type
Reimplements: floo::BMXFileAttachment::type
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVoiceAttachment",function="type" %}{% endlanying_code_snippet %}
function clone#
virtual BMXMessageAttachmentPtr clone() const
克隆函數
Return: BMXMessageAttachmentPtr
Reimplements: floo::BMXFileAttachment::clone
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVoiceAttachment",function="clone" %}{% endlanying_code_snippet %}
function duration#
int32_t duration() const
語音時長
Return: int32_t
Friends#
friend Encoder< BMXVoiceAttachment >#
friend class Encoder< BMXVoiceAttachment >(
Encoder< BMXVoiceAttachment >
);
friend Decoder< BMXVoiceAttachment >#
friend class Decoder< BMXVoiceAttachment >(
Decoder< BMXVoiceAttachment >
);
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVoiceAttachment",function="duration" %}{% endlanying_code_snippet %}
Updated on 2022-01-26 at 17:20:40 +0800