floo2
Public Member Functions | Friends | List of all members
floo::BMXImageAttachment Class Reference

图片消息附件 More...

#include <bmx_image_attachment.h>

Inheritance diagram for floo::BMXImageAttachment:
floo::BMXFileAttachment floo::BMXMessageAttachment floo::BMXBaseObject

Public Member Functions

 BMXImageAttachment (const std::string &path, const Size &size, const std::string &displayName="")
 构造函数,构建发送图片消息附件 More...
 
 BMXImageAttachment (const std::string &ratelUrl, const Size &size, const std::string &displayName, int64_t fileLength)
 构造函数,构建接收图片消息附件 More...
 
virtual ~BMXImageAttachment ()
 析构函数
 
virtual Type type () const
 返回图片附件类型 More...
 
virtual BMXMessageAttachmentPtr clone () const
 克隆函数 More...
 
const Size & size () const
 图片大小 More...
 
const std::string & thumbnailUrl () const
 远程使用缩略图URL More...
 
void setThumbnail (const std::string &path)
 设置发送图片消息缩略图 More...
 
const std::string & thumbnailPath () const
 缩略图本地路径 More...
 
DownloadStatus thumbnailDownloadStatus () const
 缩略图下载状态 More...
 
- Public Member Functions inherited from floo::BMXFileAttachment
 BMXFileAttachment (const std::string &path, const std::string &displayName="")
 构造函数,构建发送文件消息附件 More...
 
 BMXFileAttachment (const std::string &ratelUrl, const std::string &displayName, int64_t fileLength)
 构造函数,构建接收文件消息附件 More...
 
virtual ~BMXFileAttachment ()
 析构函数
 
const std::string & path () const
 本地路径 More...
 
const std::string & displayName () const
 显示名 More...
 
const std::string & ratelUrl () const
 远程ratel使用URL More...
 
const std::string & url () const
 远程使用URL More...
 
int64_t fileLength () const
 文件长度 More...
 
DownloadStatus downloadStatus () const
 附件下载状态 More...
 
- Public Member Functions inherited from floo::BMXMessageAttachment
 BMXMessageAttachment ()
 构造函数
 
virtual ~BMXMessageAttachment ()
 析构函数
 
- Public Member Functions inherited from floo::BMXBaseObject
template<typename T >
T * cast ()
 

Friends

class Encoder< BMXImageAttachment >
 
class Decoder< BMXImageAttachment >
 

Additional Inherited Members

- Public Types inherited from floo::BMXMessageAttachment
enum  Type {
  Type::Image = 1, Type::Voice, Type::Video, Type::File,
  Type::Location, Type::Command, Type::Forward
}
 附件类型 More...
 
enum  DownloadStatus {
  DownloadStatus::Downloaing, DownloadStatus::Successed, DownloadStatus::Failed, DownloadStatus::NotStart,
  DownloadStatus::Canceled
}
 附件下载状态 More...
 
- Protected Attributes inherited from floo::BMXFileAttachment
std::string mPath
 
std::string mDisplayName
 
std::string mRatelUrl
 
std::string mUrl
 
int64_t mFileLength
 
DownloadStatus mDownloadStatus
 

Detailed Description

图片消息附件

Constructor & Destructor Documentation

◆ BMXImageAttachment() [1/2]

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

构造函数,构建发送图片消息附件

Parameters
path本地路径
size图片的大小,宽度和高度
displayName展示名

◆ BMXImageAttachment() [2/2]

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

构造函数,构建接收图片消息附件

Parameters
url图片ratel服务器地址
size图片的大小,宽度和高度
displayName展示名
fileLength文件大小

Member Function Documentation

◆ clone()

virtual BMXMessageAttachmentPtr floo::BMXImageAttachment::clone ( ) const
virtual

克隆函数

Returns
BMXMessageAttachmentPtr

Reimplemented from floo::BMXFileAttachment.

◆ setThumbnail()

void floo::BMXImageAttachment::setThumbnail ( const std::string &  path)

设置发送图片消息缩略图

Parameters
path本地路径

◆ size()

const Size& floo::BMXImageAttachment::size ( ) const

图片大小

Returns
Size

◆ thumbnailDownloadStatus()

DownloadStatus floo::BMXImageAttachment::thumbnailDownloadStatus ( ) const

缩略图下载状态

Returns
DownloadStatus

◆ thumbnailPath()

const std::string& floo::BMXImageAttachment::thumbnailPath ( ) const

缩略图本地路径

Returns
std::string

◆ thumbnailUrl()

const std::string& floo::BMXImageAttachment::thumbnailUrl ( ) const

远程使用缩略图URL

Returns
std::string

◆ type()

virtual Type floo::BMXImageAttachment::type ( ) const
inlinevirtual

返回图片附件类型

Returns
Type

Reimplemented from floo::BMXFileAttachment.


The documentation for this class was generated from the following file: