Easemob Windows SDK
Public Types | Public Member Functions | List of all members
easemob::EMFileMessageBody Class Reference
Inheritance diagram for easemob::EMFileMessageBody:
Inheritance graph
Collaboration diagram for easemob::EMFileMessageBody:
Collaboration graph

Public Types

enum  EMDownloadStatus { DOWNLOADING, SUCCESSED, FAILED, PENDING }
 
- Public Types inherited from easemob::EMMessageBody
enum  EMMessageBodyType {
  TEXT, IMAGE, VIDEO, LOCATION,
  VOICE, FILE, COMMAND
}
 

Public Member Functions

 EMFileMessageBody (EMMessageBodyType=FILE)
 File message body constructor. More...
 
 EMFileMessageBody (const std::string &localPath, EMMessageBodyType=FILE)
 File message body constructor. More...
 
virtual ~EMFileMessageBody ()
 Class destructor. More...
 
std::string displayName () const
 Get display name of the attachment. More...
 
void setDisplayName (const std::string &)
 Set display name of the attachment. More...
 
const std::string & localPath () const
 Get local path of the attachment. More...
 
void setLocalPath (const std::string &)
 Set local path of the attachment. More...
 
const std::string & remotePath () const
 Get remote path of the attachment. More...
 
void setRemotePath (const std::string &)
 Set remote path of the attachment. More...
 
const std::string & secretKey () const
 Get secret key of the attachment, it's used to download attachment from server. More...
 
void setSecretKey (const std::string &)
 Set secret key of the attachment. More...
 
int64_t fileLength () const
 Get file length of the attachment. More...
 
void setFileLength (int64_t)
 Set file length of the attachment. More...
 
EMDownloadStatus downloadStatus () const
 Get file download status of the attachment. More...
 
void setDownloadStatus (EMDownloadStatus)
 Set download status of the attachment. More...
 
- Public Member Functions inherited from easemob::EMMessageBody
 EMMessageBody (EMMessageBodyType=TEXT)
 Message body constructor. More...
 
virtual ~EMMessageBody ()
 Class destructor. More...
 
EMMessageBodyType type () const
 Get message body type. More...
 
- Public Member Functions inherited from easemob::EMBaseObject
template<typename T >
T * cast ()
 

Additional Inherited Members

- Protected Attributes inherited from easemob::EMMessageBody
EMMessageBodyPrivate * mBodyPrivate
 
EMMessageBodyType mType
 

Member Enumeration Documentation

§ EMDownloadStatus

enum easemob::EMFileMessageBody::EMDownloadStatus

Download status of file attachment.

Constructor & Destructor Documentation

§ EMFileMessageBody() [1/2]

easemob::EMFileMessageBody::EMFileMessageBody ( EMMessageBodyType  = FILE)

File message body constructor.

Parameters
Attachmentfile type.
Returns
NA

§ EMFileMessageBody() [2/2]

easemob::EMFileMessageBody::EMFileMessageBody ( const std::string &  localPath,
EMMessageBodyType  = FILE 
)

File message body constructor.

Parameters
Attachmentlocal path.
Attachmenttype
Returns
NA

§ ~EMFileMessageBody()

virtual easemob::EMFileMessageBody::~EMFileMessageBody ( )
virtual

Class destructor.

Parameters
NA
Returns
NA

Member Function Documentation

§ displayName()

std::string easemob::EMFileMessageBody::displayName ( ) const

Get display name of the attachment.

Parameters
NA
Returns
The display name.

§ downloadStatus()

EMDownloadStatus easemob::EMFileMessageBody::downloadStatus ( ) const

Get file download status of the attachment.

Parameters
NA
Returns
The file download status.

§ fileLength()

int64_t easemob::EMFileMessageBody::fileLength ( ) const

Get file length of the attachment.

Parameters
NA
Returns
The file length.

§ localPath()

const std::string& easemob::EMFileMessageBody::localPath ( ) const

Get local path of the attachment.

Parameters
NA
Returns
The local path.

§ remotePath()

const std::string& easemob::EMFileMessageBody::remotePath ( ) const

Get remote path of the attachment.

Parameters
NA
Returns
The remote path.

§ secretKey()

const std::string& easemob::EMFileMessageBody::secretKey ( ) const

Get secret key of the attachment, it's used to download attachment from server.

Parameters
NA
Returns
The secret key.

§ setDisplayName()

void easemob::EMFileMessageBody::setDisplayName ( const std::string &  )

Set display name of the attachment.

Parameters
Thedisplay name.
Returns
NA

§ setDownloadStatus()

void easemob::EMFileMessageBody::setDownloadStatus ( EMDownloadStatus  )

Set download status of the attachment.

Note: Usually, user should NOT call this method directly.

Parameters
Thedownload status.
Returns
NA

§ setFileLength()

void easemob::EMFileMessageBody::setFileLength ( int64_t  )

Set file length of the attachment.

Note: It's usually not necessary to call this method, will calculate file length automatically when setting local path.

Parameters
Thefile length.
Returns
NA

§ setLocalPath()

void easemob::EMFileMessageBody::setLocalPath ( const std::string &  )

Set local path of the attachment.

Note: Received meesage should NOT change the local path.

Parameters
Thelocal path.
Returns
NA

§ setRemotePath()

void easemob::EMFileMessageBody::setRemotePath ( const std::string &  )

Set remote path of the attachment.

Note: It's internal used, user should never need to call this method.

Parameters
Theremote path.
Returns
NA

§ setSecretKey()

void easemob::EMFileMessageBody::setSecretKey ( const std::string &  )

Set secret key of the attachment.

Note: It's internal used, user should never need to call this method.

Parameters
Thesecret key.
Returns
NA

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