floo2
Public Member Functions | Protected Attributes | Friends | List of all members
floo::BMXFileAttachment Class Reference

消息文件附件 More...

#include <bmx_file_attachment.h>

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

Public Member Functions

 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 ()
 析构函数
 
virtual Type type () const
 返回文件类型 More...
 
virtual BMXMessageAttachmentPtr clone () const
 克隆函数 More...
 
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 ()
 

Protected Attributes

std::string mPath
 
std::string mDisplayName
 
std::string mRatelUrl
 
std::string mUrl
 
int64_t mFileLength
 
DownloadStatus mDownloadStatus
 

Friends

class Encoder< BMXFileAttachment >
 
class Decoder< BMXFileAttachment >
 

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...
 

Detailed Description

消息文件附件

Constructor & Destructor Documentation

◆ BMXFileAttachment() [1/2]

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

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

Parameters
path文件的本地路径
displayName文件展示名

◆ BMXFileAttachment() [2/2]

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

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

Parameters
ratelUrlratel文件服务器地址
displayName文件展示名
fileLength文件大小

Member Function Documentation

◆ clone()

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

克隆函数

Returns
BMXMessageAttachmentPtr

Implements floo::BMXMessageAttachment.

Reimplemented in floo::BMXVideoAttachment, floo::BMXImageAttachment, and floo::BMXVoiceAttachment.

◆ displayName()

const std::string& floo::BMXFileAttachment::displayName ( ) const

显示名

Returns
std::string

◆ downloadStatus()

DownloadStatus floo::BMXFileAttachment::downloadStatus ( ) const

附件下载状态

Returns
DownloadStatus

◆ fileLength()

int64_t floo::BMXFileAttachment::fileLength ( ) const

文件长度

Returns
std::string

◆ path()

const std::string& floo::BMXFileAttachment::path ( ) const

本地路径

Returns
std::string

◆ ratelUrl()

const std::string& floo::BMXFileAttachment::ratelUrl ( ) const

远程ratel使用URL

Returns
std::string

◆ type()

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

返回文件类型

Returns
Type

Implements floo::BMXMessageAttachment.

Reimplemented in floo::BMXVideoAttachment, floo::BMXImageAttachment, and floo::BMXVoiceAttachment.

◆ url()

const std::string& floo::BMXFileAttachment::url ( ) const

远程使用URL

Returns
std::string

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