Commit 01999cba authored by Ronan's avatar Ronan
Browse files

feat(Message): add interface

parent f9a078be
......@@ -32,6 +32,7 @@ LINPHONE_BEGIN_NAMESPACE
class Address;
class ChatRoom;
class Content;
class ErrorInfo;
class MessagePrivate;
......@@ -39,52 +40,43 @@ class LINPHONE_PUBLIC Message : public Object {
friend class ChatRoom;
public:
std::string getText () const;
MessageDirection getDirection () const;
/**
* @brief Set a chat message text to be sent by linphone_chat_room_send_message.
*/
int setText (const std::string &text);
std::shared_ptr<const Address> getFromAddress () const;
std::shared_ptr<const Address> getToAddress () const;
std::shared_ptr<const Address> getLocalAddress () const;
std::shared_ptr<const Address> getRemoteAddress () const;
/**
* @brief Get the state of the message.
*/
// ChatMessageState getState () const;
std::shared_ptr<ChatRoom> getChatRoom () const;
/**
* @brief Get if the message was encrypted when transfered.
*/
bool isSecured ();
std::shared_ptr<const ErrorInfo> getErrorInfo () const;
/**
* @brief Get the time the message was sent.
*/
time_t getTime () const;
std::string getContentType () const;
std::shared_ptr<ChatRoom> getChatRoom ();
std::string getText () const;
void setText (const std::string &text);
std::string getMessageId () const;
void send () const;
std::string getAppdata () const;
void setAppdata (const std::string &data);
bool containsReadableText () const;
std::shared_ptr<const Address> getPeerAddress () const;
bool isSecured () const;
std::shared_ptr<const Address> getFromAddress () const;
void setFromAddress (const std::shared_ptr<const Address> &address);
time_t getTime () const;
std::shared_ptr<const Address> getToAddress () const;
void setToAddress (const std::shared_ptr<const Address> &addr);
std::string getId () const;
std::shared_ptr<const Address> getLocalAddress () const;
std::string getAppdata () const;
void setAppdata (const std::string &data);
std::string getCustomHeaderValue (const std::string &headerName);
std::list<const std::shared_ptr<Content> > getContents () const;
void addContent (std::shared_ptr<Content> &content);
void removeContent (std::shared_ptr<Content> &content);
std::string getCustomHeaderValue (const std::string &headerName);
void addCustomHeader (const std::string &headerName, const std::string &headerValue);
void removeCustomHeader (const std::string &headerName);
std::shared_ptr<const ErrorInfo> getErrorInfo () const;
protected:
Message ();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment