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

floo::BMXImageAttachment#

圖片訊息附件

#include <bmx_image_attachment.h>

Inherits from floo::BMXFileAttachment, floo::BMXMessageAttachment, BMXBaseObject

Public Functions#

Name
BMXImageAttachment(const std::string & path, const [Size] & size, const std::string & displayName ="")
構造函數,構建發送圖片訊息附件
BMXImageAttachment(const std::string & ratelUrl, const [Size] & size, const std::string & displayName, int64_t fileLength)
構造函數,構建接收圖片訊息附件
virtual~BMXImageAttachment()
析構函數
virtual Typetype() const
回傳圖片附件類型
virtual BMXMessageAttachmentPtrclone() const
克隆函數
const [Size] &size() const
圖片大小
const std::string &thumbnailUrl() const
遠程使用縮略圖URL
voidsetThumbnail(const std::string & path)
設定發送圖片訊息縮略圖
const std::string &thumbnailPath() const
縮略圖本地路徑
DownloadStatusthumbnailDownloadStatus() 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_tfileLength() const
檔案長度
DownloadStatusdownloadStatus() const
附件下載狀態

Protected Attributes inherited from floo::BMXFileAttachment

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

Friends inherited from floo::BMXFileAttachment

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 BMXImageAttachment#

BMXImageAttachment(
    const std::string & path,
    const Size & size,
    const std::string & displayName =""
)

構造函數,構建發送圖片訊息附件

Parameters:

  • path 本地路徑
  • size 圖片的大小,寬度和高度
  • displayName 展示名

Example:

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

function BMXImageAttachment#

BMXImageAttachment(
    const std::string & ratelUrl,
    const Size & size,
    const std::string & displayName,
    int64_t fileLength
)

構造函數,構建接收圖片訊息附件

Parameters:

  • url 圖片ratel伺服器地址
  • size 圖片的大小,寬度和高度
  • displayName 展示名
  • fileLength 檔案大小

Example:

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

function ~BMXImageAttachment#

inline virtual ~BMXImageAttachment()

析構函數

Example:

{% lanying_code_snippet repo="lanying-im-embedded",class="BMXImageAttachment",function="~BMXImageAttachment" %}{% 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="BMXImageAttachment",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="BMXImageAttachment",function="clone" %}{% endlanying_code_snippet %}

function size#

const Size & size() const

圖片大小

Return: Size

Example:

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

function thumbnailUrl#

const std::string & thumbnailUrl() const

遠程使用縮略圖URL

Return: std::string

Example:

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

function setThumbnail#

void setThumbnail(
    const std::string & path
)

設定發送圖片訊息縮略圖

Parameters:

  • path 本地路徑

Example:

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

function thumbnailPath#

const std::string & thumbnailPath() const

縮略圖本地路徑

Return: std::string

Example:

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

function thumbnailDownloadStatus#

DownloadStatus thumbnailDownloadStatus() const

縮略圖下載狀態

Return: DownloadStatus

Friends#

friend Encoder< BMXImageAttachment >#

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

friend Decoder< BMXImageAttachment >#

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

Example:

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

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

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