Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
77cf08e9
Commit
77cf08e9
authored
Jun 06, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(src/components/call/CallModel): add a tooltip on call encryption
parent
4bf63398
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
41 deletions
+67
-41
en.ts
linphone-desktop/assets/languages/en.ts
+4
-0
fr.ts
linphone-desktop/assets/languages/fr.ts
+4
-0
Utils.hpp
linphone-desktop/src/Utils.hpp
+12
-0
CallModel.cpp
linphone-desktop/src/components/call/CallModel.cpp
+22
-16
CallModel.hpp
linphone-desktop/src/components/call/CallModel.hpp
+11
-8
SingleApplication.cpp
...op/src/externals/single-application/SingleApplication.cpp
+7
-15
Incall.qml
linphone-desktop/ui/views/App/Calls/Incall.qml
+5
-0
ZrtpTokenAuthentication.qml
...ne-desktop/ui/views/App/Calls/ZrtpTokenAuthentication.qml
+2
-2
No files found.
linphone-desktop/assets/languages/en.ts
View file @
77cf08e9
...
...
@@ -315,6 +315,10 @@
<
source
>
callErrorNotAcceptable
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
noMediaEncryption
<
/source
>
<
translation
>
None
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
CallSipAddress
<
/name
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
77cf08e9
...
...
@@ -315,6 +315,10 @@
<
source
>
callErrorNotAcceptable
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
noMediaEncryption
<
/source
>
<
translation
>
Aucun
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
CallSipAddress
<
/name
>
...
...
linphone-desktop/src/Utils.hpp
View file @
77cf08e9
...
...
@@ -27,6 +27,18 @@
// =============================================================================
/*
* Define telling G++ that a 'break' statement has been deliberately omitted
* in switch block.
*/
#ifndef UTILS_NO_BREAK
#if defined(__GNUC__) && __GNUC__ >= 7
#define UTILS_NO_BREAK __attribute__((fallthrough))
#else
#define UTILS_NO_BREAK
#endif // if defined(__GNUC__) && __GNUC__ >= 7
#endif // ifndef UTILS_NO_BREAK
namespace
Utils
{
inline
QString
coreStringToAppString
(
const
std
::
string
&
string
)
{
return
QString
::
fromLocal8Bit
(
string
.
c_str
(),
static_cast
<
int
>
(
string
.
size
()));
...
...
linphone-desktop/src/components/call/CallModel.cpp
View file @
77cf08e9
...
...
@@ -504,18 +504,7 @@ void CallModel::verifyAuthenticationToken (bool verify) {
// -----------------------------------------------------------------------------
CallModel
::
CallEncryption
CallModel
::
getEncryption
()
const
{
switch
(
mCall
->
getCurrentParams
()
->
getMediaEncryption
())
{
case
linphone
:
:
MediaEncryptionSRTP
:
return
CallEncryptionSRTP
;
case
linphone
:
:
MediaEncryptionZRTP
:
return
CallEncryptionZRTP
;
case
linphone
:
:
MediaEncryptionDTLS
:
return
CallEncryptionDTLS
;
case
linphone
:
:
MediaEncryptionNone
:
break
;
}
return
CallEncryptionNone
;
return
static_cast
<
CallEncryption
>
(
mCall
->
getCurrentParams
()
->
getMediaEncryption
());
}
bool
CallModel
::
isSecured
()
const
{
...
...
@@ -528,18 +517,35 @@ bool CallModel::isSecured () const {
// -----------------------------------------------------------------------------
QString
CallModel
::
getLocalS
AS
()
const
{
QString
CallModel
::
getLocalS
as
()
const
{
QString
token
=
::
Utils
::
coreStringToAppString
(
mCall
->
getAuthenticationToken
());
return
mCall
->
getDir
()
==
linphone
::
CallDirIncoming
?
token
.
left
(
2
).
toUpper
()
:
token
.
right
(
2
).
toUpper
();
}
QString
CallModel
::
getRemoteS
AS
()
const
{
QString
CallModel
::
getRemoteS
as
()
const
{
QString
token
=
::
Utils
::
coreStringToAppString
(
mCall
->
getAuthenticationToken
());
return
mCall
->
getDir
()
!=
linphone
::
CallDirIncoming
?
token
.
left
(
2
).
toUpper
()
:
token
.
right
(
2
).
toUpper
();
}
// -----------------------------------------------------------------------------
QString
CallModel
::
getSecuredString
()
const
{
switch
(
mCall
->
getCurrentParams
()
->
getMediaEncryption
())
{
case
linphone
:
:
MediaEncryptionSRTP
:
return
QStringLiteral
(
"SRTP"
);
case
linphone
:
:
MediaEncryptionZRTP
:
return
QStringLiteral
(
"ZRTP"
);
case
linphone
:
:
MediaEncryptionDTLS
:
return
QStringLiteral
(
"DTLS"
);
case
linphone
:
:
MediaEncryptionNone
:
break
;
}
return
tr
(
"noMediaEncryption"
);
}
// -----------------------------------------------------------------------------
QVariantList
CallModel
::
getAudioStats
()
const
{
return
mAudioStats
;
}
...
...
@@ -619,8 +625,8 @@ void CallModel::updateStats (const shared_ptr<const linphone::CallStats> &callSt
statsList
<<
createStat
(
tr
(
"callStatsReceivedVideoDefinition"
),
receivedVideoDefinition
==
receivedVideoDefinitionName
?
receivedVideoDefinition
:
QString
(
"%1 (%2)"
).
arg
(
receivedVideoDefinition
).
arg
(
receivedVideoDefinitionName
));
}
break
;
}
break
;
default:
break
;
}
...
...
linphone-desktop/src/components/call/CallModel.hpp
View file @
77cf08e9
...
...
@@ -57,8 +57,9 @@ class CallModel : public QObject {
Q_PROPERTY
(
CallEncryption
encryption
READ
getEncryption
NOTIFY
securityUpdated
);
Q_PROPERTY
(
bool
isSecured
READ
isSecured
NOTIFY
securityUpdated
);
Q_PROPERTY
(
QString
localSAS
READ
getLocalSAS
NOTIFY
securityUpdated
);
Q_PROPERTY
(
QString
remoteSAS
READ
getRemoteSAS
NOTIFY
securityUpdated
);
Q_PROPERTY
(
QString
localSas
READ
getLocalSas
NOTIFY
securityUpdated
);
Q_PROPERTY
(
QString
remoteSas
READ
getRemoteSas
NOTIFY
securityUpdated
);
Q_PROPERTY
(
QString
securedString
READ
getSecuredString
NOTIFY
securityUpdated
);
public:
enum
CallStatus
{
...
...
@@ -73,10 +74,10 @@ public:
Q_ENUM
(
CallStatus
);
enum
CallEncryption
{
CallEncryptionNone
,
CallEncryption
SRTP
,
CallEncryption
Z
RTP
,
CallEncryption
DTLS
CallEncryptionNone
=
linphone
::
MediaEncryptionNone
,
CallEncryption
Dtls
=
linphone
::
MediaEncryptionDTLS
,
CallEncryption
Srtp
=
linphone
::
MediaEncryptionS
RTP
,
CallEncryption
Zrtp
=
linphone
::
MediaEncryptionZRTP
};
Q_ENUM
(
CallEncryption
);
...
...
@@ -165,8 +166,10 @@ private:
CallEncryption
getEncryption
()
const
;
bool
isSecured
()
const
;
QString
getLocalSAS
()
const
;
QString
getRemoteSAS
()
const
;
QString
getLocalSas
()
const
;
QString
getRemoteSas
()
const
;
QString
getSecuredString
()
const
;
QVariantList
getAudioStats
()
const
;
QVariantList
getVideoStats
()
const
;
...
...
linphone-desktop/src/externals/single-application/SingleApplication.cpp
View file @
77cf08e9
...
...
@@ -43,6 +43,8 @@
#include <lmcons.h>
#endif // ifdef Q_OS_WIN
#include "../../Utils.hpp"
#include "SingleApplication.hpp"
#include "SingleApplicationPrivate.hpp"
...
...
@@ -302,7 +304,7 @@ void SingleApplicationPrivate::slotConnectionEstablished () {
tmp
=
nextConnSocket
->
read
(
checksum
.
length
());
if
(
checksum
==
tmp
)
break
;
// Otherwise set to invalid connection (next line)
}
}
UTILS_NO_BREAK
;
default:
connectionType
=
InvalidConnection
;
}
...
...
@@ -315,23 +317,13 @@ void SingleApplicationPrivate::slotConnectionEstablished () {
return
;
}
QObject
::
connect
(
nextConnSocket
,
&
QLocalSocket
::
aboutToClose
,
this
,
[
nextConnSocket
,
instanceId
,
this
]()
{
QObject
::
connect
(
nextConnSocket
,
&
QLocalSocket
::
aboutToClose
,
this
,
[
nextConnSocket
,
instanceId
,
this
]()
{
Q_EMIT
this
->
slotClientConnectionClosed
(
nextConnSocket
,
instanceId
);
}
);
});
QObject
::
connect
(
nextConnSocket
,
&
QLocalSocket
::
readyRead
,
this
,
[
nextConnSocket
,
instanceId
,
this
]()
{
QObject
::
connect
(
nextConnSocket
,
&
QLocalSocket
::
readyRead
,
this
,
[
nextConnSocket
,
instanceId
,
this
]()
{
Q_EMIT
this
->
slotDataAvailable
(
nextConnSocket
,
instanceId
);
}
);
});
if
(
connectionType
==
NewInstance
||
(
connectionType
==
SecondaryInstance
&&
...
...
linphone-desktop/ui/views/App/Calls/Incall.qml
View file @
77cf08e9
...
...
@@ -107,7 +107,12 @@ Rectangle {
id
:
callSecure
icon
:
incall
.
call
.
isSecured
?
'
call_chat_secure
'
:
'
call_chat_unsecure
'
onClicked
:
zrtp
.
visible
=
(
incall
.
call
.
encryption
===
CallModel
.
CallEncryptionZRTP
)
TooltipArea
{
text
:
incall
.
call
.
securedString
}
}
}
...
...
linphone-desktop/ui/views/App/Calls/ZrtpTokenAuthentication.qml
View file @
77cf08e9
...
...
@@ -62,7 +62,7 @@ ColumnLayout {
pointSize
:
CallStyle
.
zrtpArea
.
text
.
fontSize
}
text
:
zrtp
.
call
.
localS
AS
text
:
zrtp
.
call
.
localS
as
}
Text
{
...
...
@@ -85,7 +85,7 @@ ColumnLayout {
pointSize
:
CallStyle
.
zrtpArea
.
text
.
fontSize
}
text
:
zrtp
.
call
.
remoteS
AS
text
:
zrtp
.
call
.
remoteS
as
}
}
...
...
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