floo::BMXVideoAttachment

Video attachment of message

#include <bmx_video_attachment.h>

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

Public Functions

Name
BMXVideoAttachment(const std::string & path, int duration, const [Size] & size, const std::string & displayName ="")
Constructor to build the video attachment to send
BMXVideoAttachment(const std::string & path, const std::string & thumbnailPath, int duration, const [Size] & size, const std::string & displayName ="")
Constructor to build the video attachment to send
BMXVideoAttachment(const std::string & ratelUrl, int duration, const [Size] & size, const std::string & displayName, int64_t fileLength)
Constructor to build the video attachment to receive
BMXVideoAttachment(const std::string & ratelUrl, const std::string & thumbnailRatelUrl, int duration, const [Size] & size, const std::string & displayName, int64_t fileLength)
Constructor to build the video attachment to receive
virtual ~BMXVideoAttachment()
Destructor
virtual Type type() const
Type of returned file
virtual BMXMessageAttachmentPtr clone() const
Cloning function
const [Size] & size() const
Video size, width, and height
int32_t duration() const
Length of video clip
void setThumbnail(const std::string & path)
Set the thumbnail for video clip to send
const std::string & thumbnailPath() const
Local path of thumbnail
const std::string & thumbnailUrl() const
URL for remote thumbnail
void setThumbnailRatelUrl(const std::string & thumbnailRatelUrl)
Set thumbnail ratel server path to send video clip message
const std::string & thumbnailRatelUrl() const
Thumbnail ratel server path
DownloadStatus thumbnailDownloadStatus() const
Thumbnail downloading state

Friends

Name
class Encoder< BMXVideoAttachment >
class Decoder< BMXVideoAttachment >

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 BMXVideoAttachment

BMXVideoAttachment(
    const std::string & path,
    int duration,
    const Size & size,
    const std::string & displayName =""
)

Constructor to build the video attachment to send

Parameters:

  • path Local path of file
  • duration Length of video clip
  • size Video size, width, and height
  • displayName Display name of file

Example:

function BMXVideoAttachment

BMXVideoAttachment(
    const std::string & path,
    const std::string & thumbnailPath,
    int duration,
    const Size & size,
    const std::string & displayName =""
)

Constructor to build the video attachment to send

Parameters:

  • path Local path of file
  • thumbnailPath Local path of thumbnail file
  • duration Length of video clip
  • size Video size, width, and height
  • displayName Display name of file

Example:

function BMXVideoAttachment

BMXVideoAttachment(
    const std::string & ratelUrl,
    int duration,
    const Size & size,
    const std::string & displayName,
    int64_t fileLength
)

Constructor to build the video attachment to receive

Parameters:

  • ratelUrl Address of ratel file server
  • duration Length of video clip
  • size Video size, width, and height
  • displayName Display name of file
  • fileLength File size

Example:

function BMXVideoAttachment

BMXVideoAttachment(
    const std::string & ratelUrl,
    const std::string & thumbnailRatelUrl,
    int duration,
    const Size & size,
    const std::string & displayName,
    int64_t fileLength
)

Constructor to build the video attachment to receive

Parameters:

  • ratelUrl Address of ratel file server
  • thumbnailRatelUrl Thumbnail ratel file server address
  • duration Length of video clip
  • size Video size, width, and height
  • displayName Display name of file
  • fileLength File size

Example:

function ~BMXVideoAttachment

inline virtual ~BMXVideoAttachment()

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 size

const Size & size() const

Video size, width, and height

Return: Size

Example:

size_t count() const { return mResult.size();
const size_t __words = __b.size() / _S_word_bit;
const size_t __extrabits = __b.size() % _S_word_bit;

function duration

int32_t duration() const

Length of video clip

Return: int32_t

Example:

function setThumbnail

void setThumbnail(
    const std::string & path
)

Set the thumbnail for video clip to send

Parameters:

  • path Thumbnail of video clip message

Example:

function thumbnailPath

const std::string & thumbnailPath() const

Local path of thumbnail

Return: std::string

Example:

function thumbnailUrl

const std::string & thumbnailUrl() const

URL for remote thumbnail

Return: std::string

Example:

function setThumbnailRatelUrl

void setThumbnailRatelUrl(
    const std::string & thumbnailRatelUrl
)

Set thumbnail ratel server path to send video clip message

Parameters:

  • thumbnailRatelUrl Thumbnail server path for video clip message

Example:

function thumbnailRatelUrl

const std::string & thumbnailRatelUrl() const

Thumbnail ratel server path

Return: std::string

Example:

function thumbnailDownloadStatus

DownloadStatus thumbnailDownloadStatus() const

Thumbnail downloading state

Return: DownloadStatus

Friends

friend Encoder< BMXVideoAttachment >

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

friend Decoder< BMXVideoAttachment >

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

Example:


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

© 2019-2024 MaximTop | Homepage | Site Map Last modified time: 2024-09-26 03:17:35

results matching ""

    No results matching ""