Commit 8ae87e2f authored by Ronan's avatar Ronan
Browse files

feat(Core): deal with more warning options!

parent e5444986
...@@ -90,6 +90,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") ...@@ -90,6 +90,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(CheckSymbolExists) include(CheckSymbolExists)
include(CMakePushCheckState) include(CMakePushCheckState)
include(GNUInstallDirs) include(GNUInstallDirs)
include(CheckCXXCompilerFlag)
if(NOT CMAKE_INSTALL_RPATH AND CMAKE_INSTALL_PREFIX) if(NOT CMAKE_INSTALL_RPATH AND CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}) set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
...@@ -205,7 +206,7 @@ endif() ...@@ -205,7 +206,7 @@ endif()
set(LINPHONE_LDFLAGS "${BELLESIP_LDFLAGS} ${MEDIASTREAMER2_LDFLAGS}") set(LINPHONE_LDFLAGS "${BELLESIP_LDFLAGS} ${MEDIASTREAMER2_LDFLAGS}")
if(BELCARD_FOUND AND APPLE) if(BELCARD_FOUND AND APPLE)
set(LINPHONE_LDFLAGS "${LINPHONE_LDFLAGS} -stdlib=libc++") set(LINPHONE_LDFLAGS "${LINPHONE_LDFLAGS} -stdlib=libc++")
endif() endif()
# include_directories must be called only UNDER THIS LINE in order to use our # include_directories must be called only UNDER THIS LINE in order to use our
...@@ -281,7 +282,22 @@ if(MSVC) ...@@ -281,7 +282,22 @@ if(MSVC)
list(APPEND STRICT_OPTIONS_CPP "/WX") list(APPEND STRICT_OPTIONS_CPP "/WX")
endif() endif()
else() else()
list(APPEND STRICT_OPTIONS_CPP "-Wall" "-Wuninitialized" "-Wno-error=deprecated-declarations") list(APPEND STRICT_OPTIONS_CPP "\
-Wall \
-Wcast-align \
-Wconversion \
-Werror=return-type \
-Wfloat-equal \
-Winit-self \
-Wno-error=deprecated-declarations \
-Woverloaded-virtual \
-Wpointer-arith \
-Wuninitialized \
-Wunused")
CHECK_CXX_COMPILER_FLAG("-Wsuggest-override" SUGGEST_OVERRIDE)
if (SUGGEST_OVERRIDE)
list(APPEND STRICT_OPTIONS_CPP "-Wsuggest-override -Werror=suggest-override")
endif ()
list(APPEND STRICT_OPTIONS_C "-Wstrict-prototypes" "-Werror=strict-prototypes") list(APPEND STRICT_OPTIONS_C "-Wstrict-prototypes" "-Werror=strict-prototypes")
if(CMAKE_C_COMPILER_ID STREQUAL "GNU") if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
list(APPEND STRICT_OPTIONS_C "-fno-inline-small-functions") list(APPEND STRICT_OPTIONS_C "-fno-inline-small-functions")
...@@ -307,7 +323,6 @@ if(STRICT_OPTIONS_C) ...@@ -307,7 +323,6 @@ if(STRICT_OPTIONS_C)
list(REMOVE_DUPLICATES STRICT_OPTIONS_C) list(REMOVE_DUPLICATES STRICT_OPTIONS_C)
endif() endif()
set(GETTEXT_PACKAGE "linphone") set(GETTEXT_PACKAGE "linphone")
if(ENABLE_RELATIVE_PREFIX) if(ENABLE_RELATIVE_PREFIX)
set(LINPHONE_DATA_DIR ".") set(LINPHONE_DATA_DIR ".")
......
...@@ -407,7 +407,7 @@ static MS2_INLINE void set_string(char **dest, const char *src, bool_t lowercase ...@@ -407,7 +407,7 @@ static MS2_INLINE void set_string(char **dest, const char *src, bool_t lowercase
*dest=ms_strdup(src); *dest=ms_strdup(src);
if (lowercase) { if (lowercase) {
char *cur = *dest; char *cur = *dest;
for (; *cur; cur++) *cur = tolower(*cur); for (; *cur; cur++) *cur = (char)tolower(*cur);
} }
} }
} }
......
...@@ -178,13 +178,19 @@ set(LINPHONE_PRIVATE_HEADER_FILES ${LINPHONE_PRIVATE_HEADER_FILES} PARENT_SCOPE) ...@@ -178,13 +178,19 @@ set(LINPHONE_PRIVATE_HEADER_FILES ${LINPHONE_PRIVATE_HEADER_FILES} PARENT_SCOPE)
bc_apply_compile_flags(LINPHONE_CXX_OBJECTS_SOURCE_FILES STRICT_OPTIONS_CPP STRICT_OPTIONS_CXX) bc_apply_compile_flags(LINPHONE_CXX_OBJECTS_SOURCE_FILES STRICT_OPTIONS_CPP STRICT_OPTIONS_CXX)
if(ENABLE_STATIC) if(ENABLE_STATIC)
add_library(linphone-cxx-objects-static OBJECT ${LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES} ${LINPHONE_CXX_OBJECTS_SOURCE_FILES}) add_library(
linphone-cxx-objects-static OBJECT
${LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES} ${LINPHONE_CXX_OBJECTS_SOURCE_FILES}
)
target_compile_definitions(linphone-cxx-objects-static PRIVATE ${LINPHONE_CXX_OBJECTS_DEFINITIONS}) target_compile_definitions(linphone-cxx-objects-static PRIVATE ${LINPHONE_CXX_OBJECTS_DEFINITIONS})
target_include_directories(linphone-cxx-objects-static SYSTEM PRIVATE ${LINPHONE_CXX_OBJECTS_INCLUDE_DIRS} ${LINPHONE_INCLUDE_DIRS}) target_include_directories(linphone-cxx-objects-static SYSTEM PRIVATE ${LINPHONE_CXX_OBJECTS_INCLUDE_DIRS} ${LINPHONE_INCLUDE_DIRS})
endif() endif()
if(ENABLE_SHARED) if(ENABLE_SHARED)
add_library(linphone-cxx-objects OBJECT ${LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES} ${LINPHONE_CXX_OBJECTS_SOURCE_FILES}) add_library(
linphone-cxx-objects OBJECT
${LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES} ${LINPHONE_CXX_OBJECTS_SOURCE_FILES}
)
target_compile_definitions(linphone-cxx-objects PRIVATE ${LINPHONE_CXX_OBJECTS_DEFINITIONS}) target_compile_definitions(linphone-cxx-objects PRIVATE ${LINPHONE_CXX_OBJECTS_DEFINITIONS})
target_include_directories(linphone-cxx-objects SYSTEM PRIVATE ${LINPHONE_CXX_OBJECTS_INCLUDE_DIRS} ${LINPHONE_INCLUDE_DIRS}) target_include_directories(linphone-cxx-objects SYSTEM PRIVATE ${LINPHONE_CXX_OBJECTS_INCLUDE_DIRS} ${LINPHONE_INCLUDE_DIRS})
target_compile_options(linphone-cxx-objects PRIVATE "-fPIC") target_compile_options(linphone-cxx-objects PRIVATE "-fPIC")
......
...@@ -42,7 +42,7 @@ LinphoneAddress *linphone_address_new (const char *address) { ...@@ -42,7 +42,7 @@ LinphoneAddress *linphone_address_new (const char *address) {
} }
LinphoneAddress *linphone_address_clone (const LinphoneAddress *address) { LinphoneAddress *linphone_address_clone (const LinphoneAddress *address) {
return (LinphoneAddress *)belle_sip_object_clone(BELLE_SIP_OBJECT(address)); return reinterpret_cast<LinphoneAddress *>(belle_sip_object_clone(BELLE_SIP_OBJECT(address)));
} }
LinphoneAddress *linphone_address_ref (LinphoneAddress *address) { LinphoneAddress *linphone_address_ref (LinphoneAddress *address) {
......
...@@ -59,19 +59,19 @@ public: ...@@ -59,19 +59,19 @@ public:
private: private:
/* CallListener */ /* CallListener */
void onAckBeingSent (LinphoneHeaders *headers); void onAckBeingSent (LinphoneHeaders *headers) override;
void onAckReceived (LinphoneHeaders *headers); void onAckReceived (LinphoneHeaders *headers) override;
void onCallSetReleased (); void onCallSetReleased () override;
void onCallSetTerminated (); void onCallSetTerminated () override;
void onCallStateChanged (LinphoneCallState state, const std::string &message); void onCallStateChanged (LinphoneCallState state, const std::string &message) override;
void onIncomingCallStarted (); void onIncomingCallStarted () override;
void onIncomingCallToBeAdded (); void onIncomingCallToBeAdded () override;
void onEncryptionChanged (bool activated, const std::string &authToken); void onEncryptionChanged (bool activated, const std::string &authToken) override;
void onStatsUpdated (const LinphoneCallStats *stats); void onStatsUpdated (const LinphoneCallStats *stats) override;
void onResetCurrentCall (); void onResetCurrentCall () override;
void onSetCurrentCall (); void onSetCurrentCall () override;
void onFirstVideoFrameDecoded (); void onFirstVideoFrameDecoded () override;
void onResetFirstVideoFrameDecoded (); void onResetFirstVideoFrameDecoded () override;
private: private:
LinphoneCall *lcall = nullptr; LinphoneCall *lcall = nullptr;
......
...@@ -39,14 +39,14 @@ public: ...@@ -39,14 +39,14 @@ public:
virtual ~BasicChatRoom () = default; virtual ~BasicChatRoom () = default;
/* ConferenceInterface */ /* ConferenceInterface */
std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia); std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) override;
void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia); void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia) override;
bool canHandleParticipants () const; bool canHandleParticipants () const override;
const std::string& getId () const; const std::string& getId () const override;
int getNbParticipants () const; int getNbParticipants () const override;
std::list<std::shared_ptr<Participant>> getParticipants () const; std::list<std::shared_ptr<Participant>> getParticipants () const override;
void removeParticipant (const std::shared_ptr<const Participant> &participant); void removeParticipant (const std::shared_ptr<const Participant> &participant) override;
void removeParticipants (const std::list<std::shared_ptr<Participant>> &participants); void removeParticipants (const std::list<std::shared_ptr<Participant>> &participants) override;
private: private:
L_DECLARE_PRIVATE(BasicChatRoom); L_DECLARE_PRIVATE(BasicChatRoom);
......
...@@ -19,15 +19,15 @@ ...@@ -19,15 +19,15 @@
#ifndef _CHAT_ROOM_P_H_ #ifndef _CHAT_ROOM_P_H_
#define _CHAT_ROOM_P_H_ #define _CHAT_ROOM_P_H_
// From coreapi.
#include "private.h"
#include "linphone/enums/chat-room-enums.h" #include "linphone/enums/chat-room-enums.h"
#include "linphone/utils/enum-generator.h" #include "linphone/utils/enum-generator.h"
// From coreapi.
#include "private.h"
#include "chat-room.h" #include "chat-room.h"
#include "is-composing.h"
#include "is-composing-listener.h" #include "is-composing-listener.h"
#include "is-composing.h"
#include "object/object-p.h" #include "object/object-p.h"
// ============================================================================= // =============================================================================
...@@ -86,9 +86,9 @@ private: ...@@ -86,9 +86,9 @@ private:
private: private:
/* IsComposingListener */ /* IsComposingListener */
void onIsComposingStateChanged (bool isComposing); void onIsComposingStateChanged (bool isComposing) override;
void onIsRemoteComposingStateChanged (bool isComposing); void onIsRemoteComposingStateChanged (bool isComposing) override;
void onIsComposingRefreshNeeded (); void onIsComposingRefreshNeeded () override;
public: public:
LinphoneCore *core = nullptr; LinphoneCore *core = nullptr;
......
...@@ -120,7 +120,7 @@ void ChatRoomPrivate::sendImdn (const string &content, LinphoneReason reason) { ...@@ -120,7 +120,7 @@ void ChatRoomPrivate::sendImdn (const string &content, LinphoneReason reason) {
/* Sending out of call */ /* Sending out of call */
SalOp *op = sal_op_new(core->sal); SalOp *op = sal_op_new(core->sal);
linphone_configure_op(core, op, peer, nullptr, lp_config_get_int(core->config, "sip", "chat_msg_with_contact", 0)); linphone_configure_op(core, op, peer, nullptr, !!lp_config_get_int(core->config, "sip", "chat_msg_with_contact", 0));
LinphoneChatMessage *msg = q->createMessage(content); LinphoneChatMessage *msg = q->createMessage(content);
LinphoneAddress *fromAddr = linphone_address_new(identity); LinphoneAddress *fromAddr = linphone_address_new(identity);
linphone_chat_message_set_from_address(msg, fromAddr); linphone_chat_message_set_from_address(msg, fromAddr);
...@@ -206,7 +206,7 @@ void ChatRoomPrivate::sendIsComposingNotification () { ...@@ -206,7 +206,7 @@ void ChatRoomPrivate::sendIsComposingNotification () {
/* Sending out of call */ /* Sending out of call */
SalOp *op = sal_op_new(core->sal); SalOp *op = sal_op_new(core->sal);
linphone_configure_op(core, op, peer, nullptr, lp_config_get_int(core->config, "sip", "chat_msg_with_contact", 0)); linphone_configure_op(core, op, peer, nullptr, !!lp_config_get_int(core->config, "sip", "chat_msg_with_contact", 0));
string content = isComposingHandler.marshal(isComposing); string content = isComposingHandler.marshal(isComposing);
if (!content.empty()) { if (!content.empty()) {
int retval = -1; int retval = -1;
...@@ -284,7 +284,7 @@ int ChatRoomPrivate::createChatMessageFromDb (int argc, char **argv, char **colN ...@@ -284,7 +284,7 @@ int ChatRoomPrivate::createChatMessageFromDb (int argc, char **argv, char **colN
linphone_address_unref(peer); linphone_address_unref(peer);
newMessage->time = (time_t)atol(argv[9]); newMessage->time = (time_t)atol(argv[9]);
newMessage->is_read = atoi(argv[6]); newMessage->is_read = !!atoi(argv[6]);
newMessage->state = static_cast<LinphoneChatMessageState>(atoi(argv[7])); newMessage->state = static_cast<LinphoneChatMessageState>(atoi(argv[7]));
newMessage->storage_id = storageId; newMessage->storage_id = storageId;
newMessage->external_body_url = ms_strdup(argv[8]); newMessage->external_body_url = ms_strdup(argv[8]);
...@@ -859,8 +859,10 @@ void ChatRoom::sendMessage (LinphoneChatMessage *msg) { ...@@ -859,8 +859,10 @@ void ChatRoom::sendMessage (LinphoneChatMessage *msg) {
if (!op) { if (!op) {
/* Sending out of call */ /* Sending out of call */
msg->op = op = sal_op_new(d->core->sal); msg->op = op = sal_op_new(d->core->sal);
linphone_configure_op(d->core, op, peer, msg->custom_headers, linphone_configure_op(
lp_config_get_int(d->core->config, "sip", "chat_msg_with_contact", 0)); d->core, op, peer, msg->custom_headers,
!!lp_config_get_int(d->core->config, "sip", "chat_msg_with_contact", 0)
);
sal_op_set_user_pointer(op, msg); /* If out of call, directly store msg */ sal_op_set_user_pointer(op, msg); /* If out of call, directly store msg */
} }
......
...@@ -40,14 +40,14 @@ public: ...@@ -40,14 +40,14 @@ public:
public: public:
/* ConferenceInterface */ /* ConferenceInterface */
std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia); std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) override;
void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia); void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia) override;
bool canHandleParticipants () const; bool canHandleParticipants () const override;
const std::string& getId () const; const std::string& getId () const override;
int getNbParticipants () const; int getNbParticipants () const override;
std::list<std::shared_ptr<Participant>> getParticipants () const; std::list<std::shared_ptr<Participant>> getParticipants () const override;
void removeParticipant (const std::shared_ptr<const Participant> &participant); void removeParticipant (const std::shared_ptr<const Participant> &participant) override;
void removeParticipants (const std::list<std::shared_ptr<Participant>> &participants); void removeParticipants (const std::list<std::shared_ptr<Participant>> &participants) override;
private: private:
/* ConferenceListener */ /* ConferenceListener */
......
...@@ -16,23 +16,25 @@ ...@@ -16,23 +16,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _CHAT_MESSAGE_MODIFIER_H_ #ifndef _CHAT_MESSAGE_MODIFIER_H_
#define _CHAT_MESSAGE_MODIFIER_H_ #define _CHAT_MESSAGE_MODIFIER_H_
#include "chat/chat-message.h" #include "linphone/utils/general.h"
// ============================================================================= // =============================================================================
LINPHONE_BEGIN_NAMESPACE LINPHONE_BEGIN_NAMESPACE
class ChatMessageModifier { class ChatMessagePrivate;
public:
virtual void encode(LinphonePrivate::ChatMessagePrivate* msg) = 0; class ChatMessageModifier {
virtual void decode(LinphonePrivate::ChatMessagePrivate* msg) = 0; public:
virtual ~ChatMessageModifier () = default; virtual ~ChatMessageModifier () = default;
};
virtual void encode (ChatMessagePrivate *messagePrivate) = 0;
LINPHONE_END_NAMESPACE virtual void decode (ChatMessagePrivate *messagePrivate) = 0;
};
#endif // ifndef _CHAT_MESSAGE_MODIFIER_H_
LINPHONE_END_NAMESPACE
\ No newline at end of file
#endif // ifndef _CPIM_CHAT_MESSAGE_MODIFIER_H_
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <vector>
#include "chat/chat-message-p.h" #include "chat/chat-message-p.h"
#include "chat/cpim/cpim.h" #include "chat/cpim/cpim.h"
#include "content/content-type.h" #include "content/content-type.h"
...@@ -31,7 +29,7 @@ using namespace std; ...@@ -31,7 +29,7 @@ using namespace std;
LINPHONE_BEGIN_NAMESPACE LINPHONE_BEGIN_NAMESPACE
void CpimChatMessageModifier::encode(LinphonePrivate::ChatMessagePrivate* msg) { void CpimChatMessageModifier::encode (ChatMessagePrivate *messagePrivate) {
Cpim::Message message; Cpim::Message message;
Cpim::GenericHeader cpimContentTypeHeader; Cpim::GenericHeader cpimContentTypeHeader;
cpimContentTypeHeader.setName("Content-Type"); cpimContentTypeHeader.setName("Content-Type");
...@@ -39,14 +37,14 @@ void CpimChatMessageModifier::encode(LinphonePrivate::ChatMessagePrivate* msg) { ...@@ -39,14 +37,14 @@ void CpimChatMessageModifier::encode(LinphonePrivate::ChatMessagePrivate* msg) {
message.addCpimHeader(cpimContentTypeHeader); message.addCpimHeader(cpimContentTypeHeader);
shared_ptr<Content> content; shared_ptr<Content> content;
if (msg->internalContent) { if (messagePrivate->internalContent) {
// Another ChatMessageModifier was called before this one, we apply our changes on the private content // Another ChatMessageModifier was called before this one, we apply our changes on the private content
content = msg->internalContent; content = messagePrivate->internalContent;
} else { } else {
// We're the first ChatMessageModifier to be called, we'll create the private content from the public one // We're the first ChatMessageModifier to be called, we'll create the private content from the public one
// We take the first one because if there is more of them, the multipart modifier should have been called first // We take the first one because if there is more of them, the multipart modifier should have been called first
// So we should not be in this block // So we should not be in this block
content = msg->contents.front(); content = messagePrivate->contents.front();
} }
string contentType = content->getContentType().asString(); string contentType = content->getContentType().asString();
...@@ -67,16 +65,16 @@ void CpimChatMessageModifier::encode(LinphonePrivate::ChatMessagePrivate* msg) { ...@@ -67,16 +65,16 @@ void CpimChatMessageModifier::encode(LinphonePrivate::ChatMessagePrivate* msg) {
ContentType newContentType("Message/CPIM"); ContentType newContentType("Message/CPIM");
newContent->setContentType(newContentType); newContent->setContentType(newContentType);
newContent->setBody(message.asString()); newContent->setBody(message.asString());
msg->internalContent = newContent; messagePrivate->internalContent = newContent;
} }
} }
void CpimChatMessageModifier::decode(LinphonePrivate::ChatMessagePrivate* msg) { void CpimChatMessageModifier::decode (ChatMessagePrivate *messagePrivate) {
shared_ptr<Content> content; shared_ptr<Content> content;
if (msg->internalContent) { if (messagePrivate->internalContent) {
content = msg->internalContent; content = messagePrivate->internalContent;
} else { } else {
content = msg->contents.front(); content = messagePrivate->contents.front();
} }
ContentType contentType = content->getContentType(); ContentType contentType = content->getContentType();
......
...@@ -16,24 +16,23 @@ ...@@ -16,24 +16,23 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _CPIM_CHAT_MESSAGE_MODIFIER_H_ #ifndef _CPIM_CHAT_MESSAGE_MODIFIER_H_
#define _CPIM_CHAT_MESSAGE_MODIFIER_H_ #define _CPIM_CHAT_MESSAGE_MODIFIER_H_
#include "chat-message-modifier.h" #include "chat-message-modifier.h"
// ============================================================================= // =============================================================================
LINPHONE_BEGIN_NAMESPACE LINPHONE_BEGIN_NAMESPACE
class CpimChatMessageModifier : ChatMessageModifier { class CpimChatMessageModifier : public ChatMessageModifier {
public: public:
CpimChatMessageModifier() {}; CpimChatMessageModifier () = default;
virtual void encode(LinphonePrivate::ChatMessagePrivate* msg);
virtual void decode(LinphonePrivate::ChatMessagePrivate* msg); void encode (ChatMessagePrivate *messagePrivate) override;
virtual ~CpimChatMessageModifier () = default; void decode (ChatMessagePrivate *messagePrivate) override;
}; };
LINPHONE_END_NAMESPACE LINPHONE_END_NAMESPACE
#endif // ifndef _CPIM_CHAT_MESSAGE_MODIFIER_H_ #endif // ifndef _CPIM_CHAT_MESSAGE_MODIFIER_H_
\ No newline at end of file
...@@ -16,21 +16,23 @@ ...@@ -16,21 +16,23 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "chat/chat-message-p.h" #include "chat/chat-message-p.h"
#include "multipart-chat-message-modifier.h" #include "multipart-chat-message-modifier.h"
LINPHONE_BEGIN_NAMESPACE // =============================================================================
using namespace std;
void MultipartChatMessageModifier::encode(LinphonePrivate::ChatMessagePrivate* msg) { using namespace std;
if (msg->contents.size() > 1) {
//TODO
}
}
void MultipartChatMessageModifier::decode(LinphonePrivate::ChatMessagePrivate* msg) { LINPHONE_BEGIN_NAMESPACE
//TODO
} void MultipartChatMessageModifier::encode (ChatMessagePrivate *messagePrivate) {
if (messagePrivate->contents.size() > 1) {
LINPHONE_END_NAMESPACE //TODO
\ No newline at end of file }
}
void MultipartChatMessageModifier::decode (ChatMessagePrivate *messagePrivate) {
//TODO
}
LINPHONE_END_NAMESPACE
...@@ -16,24 +16,23 @@ ...@@ -16,24 +16,23 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _MULTIPART_CHAT_MESSAGE_MODIFIER_H_ #ifndef _MULTIPART_CHAT_MESSAGE_MODIFIER_H_
#define _MULTIPART_CHAT_MESSAGE_MODIFIER_H_ #define _MULTIPART_CHAT_MESSAGE_MODIFIER_H_
#include "chat-message-modifier.h" #include "chat-message-modifier.h"
// ============================================================================= // =============================================================================
LINPHONE_BEGIN_NAMESPACE LINPHONE_BEGIN_NAMESPACE
class MultipartChatMessageModifier : ChatMessageModifier { class MultipartChatMessageModifier : public ChatMessageModifier {
public: public:
MultipartChatMessageModifier() {}; MultipartChatMessageModifier () = default;
virtual void encode(LinphonePrivate::ChatMessagePrivate* msg);
virtual void decode(LinphonePrivate::ChatMessagePrivate* msg); void encode (ChatMessagePrivate *message) override;
virtual ~MultipartChatMessageModifier () = default; void decode (ChatMessagePrivate *message) override;
}; };
LINPHONE_END_NAMESPACE LINPHONE_END_NAMESPACE
#endif // ifndef _MULTIPART_CHAT_MESSAGE_MODIFIER_H_ #endif // ifndef _MULTIPART_CHAT_MESSAGE_MODIFIER_H_
\ No newline at end of file
...@@ -37,20 +37,20 @@ public: ...@@ -37,20 +37,20 @@ public:
RealTimeTextChatRoom (LinphoneCore *core, const Address &peerAddress); RealTimeTextChatRoom (LinphoneCore *core, const Address &peerAddress);
virtual ~RealTimeTextChatRoom () = default; virtual ~RealTimeTextChatRoom () = default;
void sendMessage (LinphoneChatMessage *msg); void sendMessage (LinphoneChatMessage *msg) override;
uint32_t getChar () const; uint32_t getChar () const;
LinphoneCall *getCall () const; LinphoneCall *getCall () const;
/* ConferenceInterface */ /* ConferenceInterface */