藍鶯開發者
Web & Mini ProgramiOSAndroidC++Server API

floo::BMXFileAttachment#

訊息檔案附件

#include <bmx_file_attachment.h>

Inherits from floo::BMXMessageAttachment, BMXBaseObject

Inherited by floo::BMXImageAttachment, floo::BMXVideoAttachment, floo::BMXVoiceAttachment

Public Functions#

Name
BMXFileAttachment(const std::string & path, const std::string & displayName ="")
構造函數,構建發送檔案訊息附件
BMXFileAttachment(const std::string & ratelUrl, const std::string & displayName, int64_t fileLength)
構造函數,構建接收檔案訊息附件
virtual~BMXFileAttachment()
析構函數
virtual Typetype() const
回傳檔案類型
virtual BMXMessageAttachmentPtrclone() const
克隆函數
const std::string &path() const
本地路徑
const std::string &displayName() const
顯示名
const std::string &ratelUrl() const
遠程ratel使用URL
const std::string &url() const
遠程使用URL
int64_tfileLength() const
檔案長度
DownloadStatusdownloadStatus() const
附件下載狀態

Protected Attributes#

Name
std::stringmPath
std::stringmDisplayName
std::stringmRatelUrl
std::stringmUrl
int64_tmFileLength
DownloadStatusmDownloadStatus

Friends#

Additional inherited members#

Public Types inherited from floo::BMXMessageAttachment

Name
enum classType { Image, Voice, Video, File, Location, Command, Forward}
附件類型
enum classDownloadStatus { Downloaing, Successed, Failed, NotStart, Canceled}
附件下載狀態

Public Functions inherited from floo::BMXMessageAttachment

Name
BMXMessageAttachment()
構造函數
virtual~BMXMessageAttachment()
析構函數

Public Functions Documentation#

function BMXFileAttachment#

BMXFileAttachment(
    const std::string & path,
    const std::string & displayName =""
)

構造函數,構建發送檔案訊息附件

Parameters:

  • path 檔案的本地路徑
  • displayName 檔案展示名

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXFileAttachment",function="BMXFileAttachment" %}{% endlanying_code_snippet %}

function BMXFileAttachment#

BMXFileAttachment(
    const std::string & ratelUrl,
    const std::string & displayName,
    int64_t fileLength
)

構造函數,構建接收檔案訊息附件

Parameters:

  • ratelUrl ratel檔案伺服器地址
  • displayName 檔案展示名
  • fileLength 檔案大小

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXFileAttachment",function="BMXFileAttachment" %}{% endlanying_code_snippet %}

function ~BMXFileAttachment#

inline virtual ~BMXFileAttachment()

析構函數

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXFileAttachment",function="~BMXFileAttachment" %}{% endlanying_code_snippet %}

function type#

inline virtual Type type() const

回傳檔案類型

Return: Type

Reimplements: floo::BMXMessageAttachment::type

Reimplemented by: floo::BMXImageAttachment::type, floo::BMXVideoAttachment::type, floo::BMXVoiceAttachment::type

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXFileAttachment",function="type" %}{% endlanying_code_snippet %}

function clone#

virtual BMXMessageAttachmentPtr clone() const

克隆函數

Return: BMXMessageAttachmentPtr

Reimplements: floo::BMXMessageAttachment::clone

Reimplemented by: floo::BMXImageAttachment::clone, floo::BMXVideoAttachment::clone, floo::BMXVoiceAttachment::clone

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXFileAttachment",function="clone" %}{% endlanying_code_snippet %}

function path#

const std::string & path() const

本地路徑

Return: std::string

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXFileAttachment",function="path" %}{% endlanying_code_snippet %}

function displayName#

const std::string & displayName() const

顯示名

Return: std::string

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXFileAttachment",function="displayName" %}{% endlanying_code_snippet %}

function ratelUrl#

const std::string & ratelUrl() const

遠程ratel使用URL

Return: std::string

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXFileAttachment",function="ratelUrl" %}{% endlanying_code_snippet %}

function url#

const std::string & url() const

遠程使用URL

Return: std::string

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXFileAttachment",function="url" %}{% endlanying_code_snippet %}

function fileLength#

int64_t fileLength() const

檔案長度

Return: std::string

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXFileAttachment",function="fileLength" %}{% endlanying_code_snippet %}

function downloadStatus#

DownloadStatus downloadStatus() const

附件下載狀態

Return: DownloadStatus

Protected Attributes Documentation#

variable mPath#

std::string mPath;

variable mDisplayName#

std::string mDisplayName;

variable mRatelUrl#

std::string mRatelUrl;

variable mUrl#

std::string mUrl;

variable mFileLength#

int64_t mFileLength;

variable mDownloadStatus#

DownloadStatus mDownloadStatus;

Friends#

friend Encoder< BMXFileAttachment >#

friend class Encoder< BMXFileAttachment >(
    Encoder< BMXFileAttachment > 
);

friend Decoder< BMXFileAttachment >#

friend class Decoder< BMXFileAttachment >(
    Decoder< BMXFileAttachment > 
);

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXFileAttachment",function="downloadStatus" %}{% endlanying_code_snippet %}

Updated on 2022-01-26 at 17:20:40 +0800

自動產生的 API 內容,僅在必要位置補充精簡的 AI 解說。