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 Type type() const
返回文件类型
virtual BMXMessageAttachmentPtr clone() 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_t fileLength() const
文件长度
DownloadStatus downloadStatus() const
附件下载状态

Protected Attributes

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

Friends

Name
class Encoder< BMXFileAttachment >
class Decoder< BMXFileAttachment >

Additional inherited members

Public Types inherited from floo::BMXMessageAttachment

Name
enum class Type { Image, Voice, Video, File, Location, Command, Forward}
附件类型
enum class DownloadStatus { 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:

function BMXFileAttachment

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

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

Parameters:

  • ratelUrl ratel文件服务器地址
  • displayName 文件展示名
  • fileLength 文件大小

Example:

function ~BMXFileAttachment

inline virtual ~BMXFileAttachment()

析构函数

Example:

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:

function clone

virtual BMXMessageAttachmentPtr clone() const

克隆函数

Return: BMXMessageAttachmentPtr

Reimplements: floo::BMXMessageAttachment::clone

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

Example:

function path

const std::string & path() const

本地路径

Return: std::string

Example:

function displayName

const std::string & displayName() const

显示名

Return: std::string

Example:

function ratelUrl

const std::string & ratelUrl() const

远程ratel使用URL

Return: std::string

Example:

function url

const std::string & url() const

远程使用URL

Return: std::string

Example:

function fileLength

int64_t fileLength() const

文件长度

Return: std::string

Example:

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:


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

© 2019-2024 美信拓扑 | 官网 | 网站地图 该文件修订时间: 2024-12-07 06:49:06