forked from mirrors/linphone-iphone
Started to move code from C to CPP for ChatMessage
This commit is contained in:
parent
b445462794
commit
0cee5a91a4
6 changed files with 262 additions and 126 deletions
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "c-wrapper/c-wrapper.h"
|
||||
#include "chat/chat-message-p.h"
|
||||
#include "chat/chat-message.h"
|
||||
#include "chat/chat-room-p.h"
|
||||
#include "chat/real-time-text-chat-room-p.h"
|
||||
#include "content/content-type.h"
|
||||
|
|
@ -102,44 +103,89 @@ void linphone_chat_message_set_user_data (LinphoneChatMessage *msg, void *ud) {
|
|||
// =============================================================================
|
||||
|
||||
const char *linphone_chat_message_get_external_body_url(const LinphoneChatMessage *msg) {
|
||||
return msg->external_body_url;
|
||||
return L_GET_CPP_PTR_FROM_C_OBJECT(msg)->getExternalBodyUrl().c_str();
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_external_body_url(LinphoneChatMessage *msg, const char *url) {
|
||||
if (msg->external_body_url) {
|
||||
ms_free(msg->external_body_url);
|
||||
}
|
||||
msg->external_body_url = url ? ms_strdup(url) : NULL;
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(msg)->setExternalBodyUrl(string(url));
|
||||
}
|
||||
|
||||
time_t linphone_chat_message_get_time(const LinphoneChatMessage *msg) {
|
||||
return msg->time;
|
||||
return L_GET_CPP_PTR_FROM_C_OBJECT(msg)->getTime();
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_time(LinphoneChatMessage *msg, time_t time) {
|
||||
msg->time = time;
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_is_secured(LinphoneChatMessage *msg, bool_t secured) {
|
||||
msg->is_secured = secured;
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(msg)->setTime(time);
|
||||
}
|
||||
|
||||
bool_t linphone_chat_message_is_secured(LinphoneChatMessage *msg) {
|
||||
return msg->is_secured;
|
||||
return L_GET_CPP_PTR_FROM_C_OBJECT(msg)->isSecured();
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_is_secured(LinphoneChatMessage *msg, bool_t secured) {
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(msg)->setIsSecured(secured);
|
||||
}
|
||||
|
||||
bool_t linphone_chat_message_is_outgoing(LinphoneChatMessage *msg) {
|
||||
return msg->dir == LinphoneChatMessageOutgoing;
|
||||
return L_GET_CPP_PTR_FROM_C_OBJECT(msg)->isOutgoing();
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_incoming(LinphoneChatMessage *msg) {
|
||||
msg->dir = LinphoneChatMessageIncoming;
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(msg)->setDirection(LinphonePrivate::ChatMessage::Direction::Incoming);
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_outgoing(LinphoneChatMessage *msg) {
|
||||
msg->dir = LinphoneChatMessageOutgoing;
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(msg)->setDirection(LinphonePrivate::ChatMessage::Direction::Outgoing);
|
||||
}
|
||||
|
||||
const char * linphone_chat_message_get_content_type(const LinphoneChatMessage *msg) {
|
||||
return L_GET_CPP_PTR_FROM_C_OBJECT(msg)->getContentType().c_str();
|
||||
}
|
||||
|
||||
const char *linphone_chat_message_get_text(const LinphoneChatMessage *msg) {
|
||||
return L_GET_CPP_PTR_FROM_C_OBJECT(msg)->getText().c_str();
|
||||
}
|
||||
|
||||
unsigned int linphone_chat_message_get_storage_id(LinphoneChatMessage *msg) {
|
||||
return L_GET_CPP_PTR_FROM_C_OBJECT(msg)->getStorageId();
|
||||
}
|
||||
|
||||
LinphoneChatMessageState linphone_chat_message_get_state(const LinphoneChatMessage *msg) {
|
||||
return ((LinphoneChatMessageState)L_GET_CPP_PTR_FROM_C_OBJECT(msg)->getState());
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_state(LinphoneChatMessage *msg, LinphoneChatMessageState state) {
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(msg)->setState((LinphonePrivate::ChatMessage::State)state);
|
||||
}
|
||||
|
||||
const char* linphone_chat_message_get_message_id(const LinphoneChatMessage *msg) {
|
||||
return L_GET_CPP_PTR_FROM_C_OBJECT(msg)->getId().c_str();
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_message_id(LinphoneChatMessage *msg, char *id) {
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(msg)->setId(id);
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_storage_id(LinphoneChatMessage *msg, unsigned int id) {
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(msg)->setStorageId(id);
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_is_read(LinphoneChatMessage *msg, bool_t is_read) {
|
||||
if (is_read) {
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(msg)->markAsRead();
|
||||
}
|
||||
}
|
||||
|
||||
const char *linphone_chat_message_get_appdata(const LinphoneChatMessage *msg) {
|
||||
return L_GET_CPP_PTR_FROM_C_OBJECT(msg)->getAppdata().c_str();
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_appdata(LinphoneChatMessage *msg, const char *data) {
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(msg)->setAppdata(data);
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
|
||||
void linphone_chat_message_set_from_address(LinphoneChatMessage *msg, const LinphoneAddress *from) {
|
||||
if (msg->from)
|
||||
linphone_address_unref(msg->from);
|
||||
|
|
@ -165,6 +211,8 @@ const LinphoneAddress *linphone_chat_message_get_to_address(const LinphoneChatMe
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
|
||||
void linphone_chat_message_set_message_state_changed_cb(LinphoneChatMessage* msg, LinphoneChatMessageStateChangedCb cb) {
|
||||
msg->message_state_changed_cb = cb;
|
||||
}
|
||||
|
|
@ -177,10 +225,6 @@ void * linphone_chat_message_get_message_state_changed_cb_user_data(LinphoneChat
|
|||
return msg->message_state_changed_user_data;
|
||||
}
|
||||
|
||||
const char * linphone_chat_message_get_content_type(const LinphoneChatMessage *msg) {
|
||||
return msg->content_type;
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_content_type(LinphoneChatMessage *msg, const char *content_type) {
|
||||
if (msg->content_type) {
|
||||
ms_free(msg->content_type);
|
||||
|
|
@ -188,10 +232,6 @@ void linphone_chat_message_set_content_type(LinphoneChatMessage *msg, const char
|
|||
msg->content_type = content_type ? ms_strdup(content_type) : NULL;
|
||||
}
|
||||
|
||||
const char *linphone_chat_message_get_text(const LinphoneChatMessage *msg) {
|
||||
return msg->message;
|
||||
}
|
||||
|
||||
int linphone_chat_message_set_text(LinphoneChatMessage *msg, const char* text) {
|
||||
if (msg->message)
|
||||
ms_free(msg->message);
|
||||
|
|
@ -203,58 +243,6 @@ int linphone_chat_message_set_text(LinphoneChatMessage *msg, const char* text) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
unsigned int linphone_chat_message_get_storage_id(LinphoneChatMessage *msg) {
|
||||
return msg->storage_id;
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_state(LinphoneChatMessage *msg, LinphoneChatMessageState state) {
|
||||
/* do not invoke callbacks on orphan messages */
|
||||
if (state != msg->state && msg->chat_room != NULL) {
|
||||
if (((msg->state == LinphoneChatMessageStateDisplayed) || (msg->state == LinphoneChatMessageStateDeliveredToUser))
|
||||
&& ((state == LinphoneChatMessageStateDeliveredToUser) || (state == LinphoneChatMessageStateDelivered) || (state == LinphoneChatMessageStateNotDelivered))) {
|
||||
/* If the message has been displayed or delivered to user we must not go back to the delivered or not delivered state. */
|
||||
return;
|
||||
}
|
||||
ms_message("Chat message %p: moving from state %s to %s", msg, linphone_chat_message_state_to_string(msg->state),
|
||||
linphone_chat_message_state_to_string(state));
|
||||
msg->state = state;
|
||||
if (msg->message_state_changed_cb) {
|
||||
msg->message_state_changed_cb(msg, msg->state, msg->message_state_changed_user_data);
|
||||
}
|
||||
if (linphone_chat_message_cbs_get_msg_state_changed(msg->cbs)) {
|
||||
linphone_chat_message_cbs_get_msg_state_changed(msg->cbs)(msg, msg->state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const char* linphone_chat_message_get_message_id(const LinphoneChatMessage *msg) {
|
||||
return msg->message_id;
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_message_id(LinphoneChatMessage *msg, char *id) {
|
||||
msg->message_id = id;
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_is_read(LinphoneChatMessage *msg, bool_t is_read) {
|
||||
msg->is_read = is_read;
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_storage_id(LinphoneChatMessage *msg, unsigned int id) {
|
||||
msg->storage_id = id;
|
||||
}
|
||||
|
||||
const char *linphone_chat_message_get_appdata(const LinphoneChatMessage *msg) {
|
||||
return msg->appdata;
|
||||
}
|
||||
|
||||
void linphone_chat_message_set_appdata(LinphoneChatMessage *msg, const char *data) {
|
||||
if (msg->appdata) {
|
||||
ms_free(msg->appdata);
|
||||
}
|
||||
msg->appdata = data ? ms_strdup(data) : NULL;
|
||||
linphone_chat_message_store_appdata(msg);
|
||||
}
|
||||
|
||||
SalCustomHeader * linphone_chat_message_get_sal_custom_headers(const LinphoneChatMessage *msg) {
|
||||
return msg->sal_custom_headers;
|
||||
}
|
||||
|
|
@ -544,10 +532,6 @@ LinphoneAddress *linphone_chat_message_get_local_address(const LinphoneChatMessa
|
|||
return msg->dir == LinphoneChatMessageOutgoing ? msg->from : msg->to;
|
||||
}
|
||||
|
||||
LinphoneChatMessageState linphone_chat_message_get_state(const LinphoneChatMessage *msg) {
|
||||
return msg->state;
|
||||
}
|
||||
|
||||
void linphone_chat_message_add_custom_header(LinphoneChatMessage *msg, const char *header_name,
|
||||
const char *header_value) {
|
||||
msg->sal_custom_headers = sal_custom_header_append(msg->sal_custom_headers, header_name, header_value);
|
||||
|
|
|
|||
|
|
@ -37,22 +37,23 @@ public:
|
|||
|
||||
private:
|
||||
std::shared_ptr<ChatRoom> chatRoom;
|
||||
std::string externalBodyUrl;
|
||||
ChatMessage::Direction direction = ChatMessage::Incoming;
|
||||
ChatMessage::State state = ChatMessage::Idle;
|
||||
unsigned int storageId;
|
||||
// LinphoneAddress *from;
|
||||
// LinphoneAddress *to;
|
||||
std::shared_ptr<ErrorInfo> errorInfo;
|
||||
std::string text;
|
||||
bool isSecured = false;
|
||||
bool isReadOnly = false;
|
||||
time_t time = 0;
|
||||
std::string id;
|
||||
std::string appData;
|
||||
bool isRead = false;
|
||||
bool isSecured = false;
|
||||
bool isReadOnly = false;
|
||||
std::list<std::shared_ptr<Content> > contents;
|
||||
std::shared_ptr<Content> internalContent;
|
||||
std::unordered_map<std::string, std::string> customHeaders;
|
||||
ChatMessage::State state = ChatMessage::Idle;
|
||||
std::shared_ptr<EventsDb> eventsDb;
|
||||
|
||||
std::shared_ptr<ErrorInfo> errorInfo;
|
||||
L_DECLARE_PUBLIC(ChatMessage);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "chat-message-p.h"
|
||||
#include "chat-message.h"
|
||||
#include "content/content.h"
|
||||
|
||||
#include "modifier/multipart-chat-message-modifier.h"
|
||||
#include "modifier/cpim-chat-message-modifier.h"
|
||||
|
|
@ -59,11 +60,154 @@ shared_ptr<ChatRoom> ChatMessage::getChatRoom () const {
|
|||
return d->chatRoom;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
std::string ChatMessage::getExternalBodyUrl() const {
|
||||
L_D(const ChatMessage);
|
||||
return d->externalBodyUrl;
|
||||
}
|
||||
|
||||
void ChatMessage::setExternalBodyUrl(const string &url) {
|
||||
L_D(ChatMessage);
|
||||
d->externalBodyUrl = url;
|
||||
}
|
||||
|
||||
time_t ChatMessage::getTime () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->time;
|
||||
}
|
||||
void ChatMessage::setTime(time_t time) {
|
||||
L_D(ChatMessage);
|
||||
d->time = time;
|
||||
}
|
||||
|
||||
bool ChatMessage::isSecured () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->isSecured;
|
||||
}
|
||||
|
||||
void ChatMessage::setIsSecured(bool isSecured) {
|
||||
L_D(ChatMessage);
|
||||
d->isSecured = isSecured;
|
||||
}
|
||||
|
||||
ChatMessage::Direction ChatMessage::getDirection () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->direction;
|
||||
}
|
||||
|
||||
void ChatMessage::setDirection (ChatMessage::Direction dir) {
|
||||
L_D(ChatMessage);
|
||||
d->direction = dir;
|
||||
}
|
||||
|
||||
bool ChatMessage::isOutgoing () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->direction == Outgoing;
|
||||
}
|
||||
|
||||
bool ChatMessage::isIncoming () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->direction == Incoming;
|
||||
}
|
||||
|
||||
ChatMessage::State ChatMessage::getState() const {
|
||||
L_D(const ChatMessage);
|
||||
return d->state;
|
||||
}
|
||||
|
||||
void ChatMessage::setState(State state) {
|
||||
L_D(ChatMessage);
|
||||
if (state != d->state && d->chatRoom) {
|
||||
if (((d->state == Displayed) || (d->state == DeliveredToUser))
|
||||
&& ((state == DeliveredToUser) || (state == Delivered) || (state == NotDelivered))) {
|
||||
return;
|
||||
}
|
||||
/* TODO
|
||||
ms_message("Chat message %p: moving from state %s to %s", msg, linphone_chat_message_state_to_string(msg->state), linphone_chat_message_state_to_string(state));
|
||||
*/
|
||||
d->state = state;
|
||||
|
||||
LinphoneChatMessage *msg = L_GET_C_BACK_PTR(this);
|
||||
/* TODO
|
||||
if (msg->message_state_changed_cb) {
|
||||
msg->message_state_changed_cb(msg, msg->state, msg->message_state_changed_user_data);
|
||||
}*/
|
||||
LinphoneChatMessageCbs *cbs = linphone_chat_message_get_callbacks(msg);
|
||||
if (linphone_chat_message_cbs_get_msg_state_changed(cbs)) {
|
||||
linphone_chat_message_cbs_get_msg_state_changed(cbs)(msg, linphone_chat_message_get_state(msg));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string ChatMessage::getId () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->id;
|
||||
}
|
||||
|
||||
void ChatMessage::setId (string id) {
|
||||
L_D(ChatMessage);
|
||||
d->id = id;
|
||||
}
|
||||
|
||||
bool ChatMessage::isRead() const {
|
||||
L_D(const ChatMessage);
|
||||
return d->isRead;
|
||||
}
|
||||
|
||||
void ChatMessage::markAsRead() {
|
||||
L_D(ChatMessage);
|
||||
d->isRead = true;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
string ChatMessage::getContentType() const {
|
||||
L_D(const ChatMessage);
|
||||
if (d->internalContent) {
|
||||
return d->internalContent->getContentType().asString();
|
||||
}
|
||||
if (d->contents.size() > 0) {
|
||||
return d->contents.front()->getContentType().asString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
string ChatMessage::getText() const {
|
||||
L_D(const ChatMessage);
|
||||
if (d->internalContent) {
|
||||
return d->internalContent->getBodyAsString();
|
||||
}
|
||||
if (d->contents.size() > 0) {
|
||||
return d->contents.front()->getBodyAsString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
unsigned int ChatMessage::getStorageId() const {
|
||||
L_D(const ChatMessage);
|
||||
return d->storageId;
|
||||
}
|
||||
|
||||
void ChatMessage::setStorageId(unsigned int id) {
|
||||
L_D(ChatMessage);
|
||||
d->storageId = id;
|
||||
}
|
||||
|
||||
string ChatMessage::getAppdata () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->appData;
|
||||
}
|
||||
|
||||
void ChatMessage::setAppdata (const string &appData) {
|
||||
L_D(ChatMessage);
|
||||
d->appData = appData;
|
||||
// TODO: store app data in db !
|
||||
// linphone_chat_message_store_appdata(msg);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
shared_ptr<const Address> ChatMessage::getFromAddress () const {
|
||||
// TODO.
|
||||
return nullptr;
|
||||
|
|
@ -84,11 +228,6 @@ shared_ptr<const Address> ChatMessage::getRemoteAddress () const {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
ChatMessage::State ChatMessage::getState () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->state;
|
||||
}
|
||||
|
||||
shared_ptr<const ErrorInfo> ChatMessage::getErrorInfo () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->errorInfo;
|
||||
|
|
@ -119,36 +258,11 @@ bool ChatMessage::containsReadableText () const {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatMessage::isSecured () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->isSecured;
|
||||
}
|
||||
|
||||
bool ChatMessage::isReadOnly () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->isReadOnly;
|
||||
}
|
||||
|
||||
time_t ChatMessage::getTime () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->time;
|
||||
}
|
||||
|
||||
string ChatMessage::getId () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->id;
|
||||
}
|
||||
|
||||
string ChatMessage::getAppdata () const {
|
||||
L_D(const ChatMessage);
|
||||
return d->appData;
|
||||
}
|
||||
|
||||
void ChatMessage::setAppdata (const string &appData) {
|
||||
L_D(ChatMessage);
|
||||
d->appData = appData;
|
||||
}
|
||||
|
||||
list<shared_ptr<const Content> > ChatMessage::getContents () const {
|
||||
L_D(const ChatMessage);
|
||||
list<shared_ptr<const Content> > contents;
|
||||
|
|
|
|||
|
|
@ -63,31 +63,61 @@ public:
|
|||
|
||||
std::shared_ptr<ChatRoom> getChatRoom () const;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Direction getDirection () const;
|
||||
void setDirection (Direction dir);
|
||||
bool isOutgoing () const;
|
||||
bool isIncoming () const;
|
||||
|
||||
std::string getExternalBodyUrl() const;
|
||||
void setExternalBodyUrl(const std::string &url);
|
||||
|
||||
time_t getTime () const;
|
||||
|
||||
bool isSecured () const;
|
||||
void setIsSecured(bool isSecured);
|
||||
|
||||
State getState() const;
|
||||
void setState(State state);
|
||||
|
||||
std::string getId () const;
|
||||
void setId (std::string);
|
||||
|
||||
bool isRead() const;
|
||||
void markAsRead();
|
||||
|
||||
std::string getAppdata () const;
|
||||
void setAppdata (const std::string &appData);
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Deprecated methods, only used for C wrapper
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
std::string getContentType() const;
|
||||
|
||||
std::string getText() const;
|
||||
|
||||
unsigned int getStorageId() const;
|
||||
void setStorageId(unsigned int id);
|
||||
|
||||
void setTime(time_t time);
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
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;
|
||||
|
||||
State getState () const;
|
||||
|
||||
std::shared_ptr<const ErrorInfo> getErrorInfo () const;
|
||||
|
||||
void send ();
|
||||
|
||||
bool containsReadableText () const;
|
||||
|
||||
bool isSecured () const;
|
||||
bool isReadOnly () const;
|
||||
|
||||
time_t getTime () const;
|
||||
|
||||
std::string getId () const;
|
||||
|
||||
std::string getAppdata () const;
|
||||
void setAppdata (const std::string &appData);
|
||||
|
||||
std::list<std::shared_ptr<const Content> > getContents () const;
|
||||
void addContent (const std::shared_ptr<Content> &content);
|
||||
void removeContent (const std::shared_ptr<const Content> &content);
|
||||
|
|
|
|||
|
|
@ -81,6 +81,11 @@ const std::vector<char> &Content::getBody () const {
|
|||
return d->body;
|
||||
}
|
||||
|
||||
string Content::getBodyAsString () const {
|
||||
L_D(const Content);
|
||||
return string(d->body.begin(), d->body.end());
|
||||
}
|
||||
|
||||
void Content::setBody (const std::vector<char> &body) {
|
||||
L_D(Content);
|
||||
d->body = body;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "content-type.h"
|
||||
|
||||
#include "object/clonable-object.h"
|
||||
|
||||
// =============================================================================
|
||||
|
|
@ -29,7 +31,6 @@
|
|||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
class ContentPrivate;
|
||||
class ContentType;
|
||||
|
||||
class LINPHONE_PUBLIC Content : public ClonableObject {
|
||||
public:
|
||||
|
|
@ -44,6 +45,7 @@ public:
|
|||
void setContentType (const ContentType &contentType);
|
||||
|
||||
const std::vector<char> &getBody () const;
|
||||
std::string getBodyAsString () const;
|
||||
void setBody (const std::vector<char> &body);
|
||||
void setBody (const std::string &body);
|
||||
void setBody (const void *buffer, size_t size);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue