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
f04c4a40
Commit
f04c4a40
authored
Dec 05, 2017
by
Sylvain Berfini
🎩
Browse files
Fix old chat_message_set_app_data api
parent
e045ac01
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
src/chat/chat-message/chat-message.cpp
src/chat/chat-message/chat-message.cpp
+3
-2
src/object/app-data-container.cpp
src/object/app-data-container.cpp
+3
-2
src/object/app-data-container.h
src/object/app-data-container.h
+1
-1
No files found.
src/chat/chat-message/chat-message.cpp
View file @
f04c4a40
...
...
@@ -188,7 +188,7 @@ const string &ChatMessagePrivate::getAppdata () const {
for
(
const
Content
*
c
:
contents
)
{
if
(
c
->
getContentType
().
isFile
())
{
FileContent
*
fileContent
=
(
FileContent
*
)
c
;
return
fileContent
->
get
FilePath
(
);
return
fileContent
->
get
AppData
(
"app"
);
}
}
return
Utils
::
getEmptyConstRefObject
<
string
>
();
...
...
@@ -198,7 +198,8 @@ void ChatMessagePrivate::setAppdata (const string &data) {
for
(
const
Content
*
c
:
contents
)
{
if
(
c
->
getContentType
().
isFile
())
{
FileContent
*
fileContent
=
(
FileContent
*
)
c
;
return
fileContent
->
setFilePath
(
data
);
fileContent
->
setAppData
(
"app"
,
data
);
break
;
}
}
}
...
...
src/object/app-data-container.cpp
View file @
f04c4a40
...
...
@@ -19,6 +19,7 @@
#include <memory>
#include "linphone/utils/utils.h"
#include "app-data-container.h"
// =============================================================================
...
...
@@ -62,10 +63,10 @@ const unordered_map<string, string> &AppDataContainer::getAppDataMap () const {
return
*
d
->
appData
.
get
();
}
string
AppDataContainer
::
getAppData
(
const
string
&
name
)
const
{
const
string
&
AppDataContainer
::
getAppData
(
const
string
&
name
)
const
{
L_D
();
auto
it
=
d
->
appData
->
find
(
name
);
return
it
==
d
->
appData
->
cend
()
?
string
()
:
it
->
second
;
return
it
==
d
->
appData
->
cend
()
?
Utils
::
getEmptyConstRefObject
<
string
>
()
:
d
->
appData
->
at
(
name
)
;
}
void
AppDataContainer
::
setAppData
(
const
string
&
name
,
const
string
&
appData
)
{
...
...
src/object/app-data-container.h
View file @
f04c4a40
...
...
@@ -41,7 +41,7 @@ public:
const
std
::
unordered_map
<
std
::
string
,
std
::
string
>
&
getAppDataMap
()
const
;
std
::
string
getAppData
(
const
std
::
string
&
name
)
const
;
const
std
::
string
&
getAppData
(
const
std
::
string
&
name
)
const
;
void
setAppData
(
const
std
::
string
&
name
,
const
std
::
string
&
appData
);
void
setAppData
(
const
std
::
string
&
name
,
std
::
string
&&
appData
);
...
...
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