mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
Added chat message modifiers skeletons
This commit is contained in:
parent
68bb508cb5
commit
8fce516b8f
8 changed files with 193 additions and 0 deletions
|
|
@ -47,6 +47,9 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
|
|||
chat/is-composing.h
|
||||
chat/real-time-text-chat-room-p.h
|
||||
chat/real-time-text-chat-room.h
|
||||
chat/modifier/chat-message-modifier.h
|
||||
chat/modifier/multipart-chat-message-modifier.h
|
||||
chat/modifier/cpim-chat-message-modifier.h
|
||||
conference/conference-listener.h
|
||||
conference/conference-p.h
|
||||
conference/conference.h
|
||||
|
|
@ -111,6 +114,8 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES
|
|||
chat/imdn.cpp
|
||||
chat/is-composing.cpp
|
||||
chat/real-time-text-chat-room.cpp
|
||||
chat/modifier/multipart-chat-message-modifier.cpp
|
||||
chat/modifier/cpim-chat-message-modifier.cpp
|
||||
conference/conference.cpp
|
||||
conference/local-conference.cpp
|
||||
conference/params/call-session-params.cpp
|
||||
|
|
|
|||
|
|
@ -39,10 +39,12 @@ private:
|
|||
string contentType;
|
||||
string text;
|
||||
bool isSecured = false;
|
||||
bool isReadOnly = false;
|
||||
time_t time = 0;
|
||||
string id;
|
||||
string appData;
|
||||
list<shared_ptr<Content> > contents;
|
||||
shared_ptr<Content> private_content;
|
||||
unordered_map<string, string> customHeaders;
|
||||
ChatMessage::State state = ChatMessage::Idle;
|
||||
shared_ptr<EventsDb> eventsDb;
|
||||
|
|
@ -127,6 +129,11 @@ bool ChatMessage::isSecured () const {
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ public:
|
|||
bool containsReadableText () const;
|
||||
|
||||
bool isSecured () const;
|
||||
bool isReadOnly () const;
|
||||
|
||||
time_t getTime () const;
|
||||
|
||||
|
|
|
|||
38
src/chat/modifier/chat-message-modifier.h
Normal file
38
src/chat/modifier/chat-message-modifier.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* chat-message-modifier.h
|
||||
* Copyright (C) 2017 Belledonne Communications SARL
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _CHAT_MESSAGE_MODIFIER_H_
|
||||
#define _CHAT_MESSAGE_MODIFIER_H_
|
||||
|
||||
#include "chat/chat-message.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
class ChatMessageModifier {
|
||||
public:
|
||||
virtual void encode(std::shared_ptr<ChatMessagePrivate> msg) = 0;
|
||||
virtual void decode(std::shared_ptr<ChatMessagePrivate> msg) = 0;
|
||||
virtual ~ChatMessageModifier () = default;
|
||||
};
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
||||
#endif // ifndef _CHAT_MESSAGE_MODIFIER_H_
|
||||
|
||||
33
src/chat/modifier/cpim-chat-message-modifier.cpp
Normal file
33
src/chat/modifier/cpim-chat-message-modifier.cpp
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* cpim-chat-message-modifier.cpp
|
||||
* Copyright (C) 2017 Belledonne Communications SARL
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "cpim-chat-message-modifier.h"
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
using namespace std;
|
||||
|
||||
void CpimChatMessageModifier::encode(shared_ptr<ChatMessagePrivate> msg) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
void CpimChatMessageModifier::decode(shared_ptr<ChatMessagePrivate> msg) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
38
src/chat/modifier/cpim-chat-message-modifier.h
Normal file
38
src/chat/modifier/cpim-chat-message-modifier.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* cpim-chat-message-modifier.h
|
||||
* Copyright (C) 2017 Belledonne Communications SARL
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _CPIM_CHAT_MESSAGE_MODIFIER_H_
|
||||
#define _CPIM_CHAT_MESSAGE_MODIFIER_H_
|
||||
|
||||
#include "chat-message-modifier.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
class CpimChatMessageModifier : ChatMessageModifier {
|
||||
public:
|
||||
virtual void encode(std::shared_ptr<ChatMessagePrivate> msg) = 0;
|
||||
virtual void decode(std::shared_ptr<ChatMessagePrivate> msg) = 0;
|
||||
virtual ~CpimChatMessageModifier () = default;
|
||||
};
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
||||
#endif // ifndef _CPIM_CHAT_MESSAGE_MODIFIER_H_
|
||||
|
||||
33
src/chat/modifier/multipart-chat-message-modifier.cpp
Normal file
33
src/chat/modifier/multipart-chat-message-modifier.cpp
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* multipart-chat-message-modifier.cpp
|
||||
* Copyright (C) 2017 Belledonne Communications SARL
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "multipart-chat-message-modifier.h"
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
using namespace std;
|
||||
|
||||
void MultipartChatMessageModifier::encode(shared_ptr<ChatMessagePrivate> msg) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
void MultipartChatMessageModifier::decode(shared_ptr<ChatMessagePrivate> msg) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
38
src/chat/modifier/multipart-chat-message-modifier.h
Normal file
38
src/chat/modifier/multipart-chat-message-modifier.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* multipart-chat-message-modifier.h
|
||||
* Copyright (C) 2017 Belledonne Communications SARL
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _MULTIPART_CHAT_MESSAGE_MODIFIER_H_
|
||||
#define _MULTIPART_CHAT_MESSAGE_MODIFIER_H_
|
||||
|
||||
#include "chat-message-modifier.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
class MultipartChatMessageModifier : ChatMessageModifier {
|
||||
public:
|
||||
virtual void encode(std::shared_ptr<ChatMessagePrivate> msg) = 0;
|
||||
virtual void decode(std::shared_ptr<ChatMessagePrivate> msg) = 0;
|
||||
virtual ~MultipartChatMessageModifier () = default;
|
||||
};
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
||||
#endif // ifndef _MULTIPART_CHAT_MESSAGE_MODIFIER_H_
|
||||
|
||||
Loading…
Add table
Reference in a new issue