floo::BMXVoiceAttachment

Audio attachment

#include <bmx_voice_attachment.h>

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

Public Functions

Name
BMXVoiceAttachment(const std::string & path, int duration, const std::string & displayName ="")
Constructor to build the audio attachment to send
BMXVoiceAttachment(const std::string & ratelUrl, int duration, const std::string & displayName, int64_t fileLength)
Constructor to build the audio attachment to receive
virtual ~BMXVoiceAttachment()
Destructor
virtual Type type() const
Type of returned file
virtual BMXMessageAttachmentPtr clone() const
Cloning function
int32_t duration() const
Length of speech

Friends

Name
class Encoder< BMXVoiceAttachment >
class Decoder< BMXVoiceAttachment >

Additional inherited members

Public Functions inherited from floo::BMXFileAttachment

Name
BMXFileAttachment(const std::string & path, const std::string & displayName ="")
Constructor to build the message attachment of sent file
BMXFileAttachment(const std::string & ratelUrl, const std::string & displayName, int64_t fileLength)
Constructor to build the message attachment of received file
virtual ~BMXFileAttachment()
Destructor
const std::string & path() const
Local path
const std::string & displayName() const
Display name
const std::string & ratelUrl() const
URL for remote ratel
const std::string & url() const
URL for remote
int64_t fileLength() const
File length
DownloadStatus downloadStatus() const
Attachment download state

Protected Attributes inherited from floo::BMXFileAttachment

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

Friends inherited from floo::BMXFileAttachment

Name
class Encoder< BMXFileAttachment >
class Decoder< BMXFileAttachment >

Public Types inherited from floo::BMXMessageAttachment

Name
enum class Type { Image, Voice, Video, File, Location, Command, Forward}
Attachment type
enum class DownloadStatus { Downloaing, Successed, Failed, NotStart, Canceled}
Attachment download state

Public Functions inherited from floo::BMXMessageAttachment

Name
BMXMessageAttachment()
Constructor
virtual ~BMXMessageAttachment()
Destructor

Public Functions Documentation

function BMXVoiceAttachment

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

Constructor to build the audio attachment to send

Parameters:

  • path Local path of file
  • duration Audio length
  • displayName Display name of file

Example:

function BMXVoiceAttachment

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

Constructor to build the audio attachment to receive

Parameters:

  • ratelUrl Address of ratel file server
  • duration Audio length
  • displayName Display name of file
  • fileLength File size

Example:

function ~BMXVoiceAttachment

inline virtual ~BMXVoiceAttachment()

Destructor

Example:

function type

inline virtual Type type() const

Type of returned file

Return: Type

Reimplements: floo::BMXFileAttachment::type

Example:

function clone

virtual BMXMessageAttachmentPtr clone() const

Cloning function

Return: BMXMessageAttachmentPtr

Reimplements: floo::BMXFileAttachment::clone

Example:

function duration

int32_t duration() const

Length of speech

Return: int32_t

Friends

friend Encoder< BMXVoiceAttachment >

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

friend Decoder< BMXVoiceAttachment >

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

Example:


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

© 2019-2023 MaximTop | Homepage Last modified time: 2023-08-09 14:48:15

results matching ""

    No results matching ""