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

音频消息附件 More...

#include <bmx_voice_attachment.h>

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

Public Member Functions

 BMXVoiceAttachment (const std::string &path, int duration, const std::string &displayName="")
 构造函数,构建发送音频消息附件 More...
 
 BMXVoiceAttachment (const std::string &ratelUrl, int duration, const std::string &displayName, int64_t fileLength)
 构造函数,构建接收音频消息附件 More...
 
virtual ~BMXVoiceAttachment ()
 析构函数
 
virtual Type type () const
 返回文件类型 More...
 
virtual BMXMessageAttachmentPtr clone () const
 克隆函数 More...
 
int32_t duration () 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< BMXVoiceAttachment >
 
class Decoder< BMXVoiceAttachment >
 

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

◆ BMXVoiceAttachment() [1/2]

floo::BMXVoiceAttachment::BMXVoiceAttachment ( const std::string &  path,
int  duration,
const std::string &  displayName = "" 
)

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

Parameters
path文件的本地路径
duration音频时长
displayName文件展示名

◆ BMXVoiceAttachment() [2/2]

floo::BMXVoiceAttachment::BMXVoiceAttachment ( const std::string &  ratelUrl,
int  duration,
const std::string &  displayName,
int64_t  fileLength 
)

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

Parameters
ratelUrlratel文件服务器地址
duration音频时长
displayName文件展示名
fileLength文件大小

Member Function Documentation

◆ clone()

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

克隆函数

Returns
BMXMessageAttachmentPtr

Reimplemented from floo::BMXFileAttachment.

◆ duration()

int32_t floo::BMXVoiceAttachment::duration ( ) const

语音时长

Returns
int32_t

◆ type()

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

返回文件类型

Returns
Type

Reimplemented from floo::BMXFileAttachment.


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