Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
8fce516b
Commit
8fce516b
authored
Sep 12, 2017
by
Sylvain Berfini
🐮
Browse files
Added chat message modifiers skeletons
parent
68bb508c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
193 additions
and
0 deletions
+193
-0
src/CMakeLists.txt
src/CMakeLists.txt
+5
-0
src/chat/chat-message.cpp
src/chat/chat-message.cpp
+7
-0
src/chat/chat-message.h
src/chat/chat-message.h
+1
-0
src/chat/modifier/chat-message-modifier.h
src/chat/modifier/chat-message-modifier.h
+38
-0
src/chat/modifier/cpim-chat-message-modifier.cpp
src/chat/modifier/cpim-chat-message-modifier.cpp
+33
-0
src/chat/modifier/cpim-chat-message-modifier.h
src/chat/modifier/cpim-chat-message-modifier.h
+38
-0
src/chat/modifier/multipart-chat-message-modifier.cpp
src/chat/modifier/multipart-chat-message-modifier.cpp
+33
-0
src/chat/modifier/multipart-chat-message-modifier.h
src/chat/modifier/multipart-chat-message-modifier.h
+38
-0
No files found.
src/CMakeLists.txt
View file @
8fce516b
...
...
@@ -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
...
...
src/chat/chat-message.cpp
View file @
8fce516b
...
...
@@ -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
;
...
...
src/chat/chat-message.h
View file @
8fce516b
...
...
@@ -77,6 +77,7 @@ public:
bool
containsReadableText
()
const
;
bool
isSecured
()
const
;
bool
isReadOnly
()
const
;
time_t
getTime
()
const
;
...
...
src/chat/modifier/chat-message-modifier.h
0 → 100644
View file @
8fce516b
/*
* 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_
\ No newline at end of file
src/chat/modifier/cpim-chat-message-modifier.cpp
0 → 100644
View file @
8fce516b
/*
* 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
\ No newline at end of file
src/chat/modifier/cpim-chat-message-modifier.h
0 → 100644
View file @
8fce516b
/*
* 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_
\ No newline at end of file
src/chat/modifier/multipart-chat-message-modifier.cpp
0 → 100644
View file @
8fce516b
/*
* 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
\ No newline at end of file
src/chat/modifier/multipart-chat-message-modifier.h
0 → 100644
View file @
8fce516b
/*
* 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_
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment