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
53731a91
Commit
53731a91
authored
Feb 28, 2018
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(CallModel): emit securtyChanged when call encryption changed in core listener
parent
986f5d99
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
4 deletions
+33
-4
CallModel.cpp
src/components/call/CallModel.cpp
+14
-3
CallModel.hpp
src/components/call/CallModel.hpp
+2
-1
CoreHandlers.cpp
src/components/core/CoreHandlers.cpp
+9
-0
CoreHandlers.hpp
src/components/core/CoreHandlers.hpp
+8
-0
No files found.
src/components/call/CallModel.cpp
View file @
53731a91
...
@@ -44,9 +44,11 @@ CallModel::CallModel (shared_ptr<linphone::Call> call) {
...
@@ -44,9 +44,11 @@ CallModel::CallModel (shared_ptr<linphone::Call> call) {
updateIsInConference
();
updateIsInConference
();
CoreManager
*
coreManager
=
CoreManager
::
getInstance
();
// Deal with auto-answer.
// Deal with auto-answer.
if
(
!
isOutgoing
())
{
if
(
!
isOutgoing
())
{
SettingsModel
*
settings
=
CoreManager
::
getInstance
()
->
getSettingsModel
();
SettingsModel
*
settings
=
coreManager
->
getSettingsModel
();
if
(
settings
->
getAutoAnswerStatus
())
{
if
(
settings
->
getAutoAnswerStatus
())
{
QTimer
*
timer
=
new
QTimer
(
this
);
QTimer
*
timer
=
new
QTimer
(
this
);
...
@@ -59,10 +61,15 @@ CallModel::CallModel (shared_ptr<linphone::Call> call) {
...
@@ -59,10 +61,15 @@ CallModel::CallModel (shared_ptr<linphone::Call> call) {
}
}
}
}
CoreHandlers
*
coreHandlers
=
coreManager
->
getHandlers
().
get
();
QObject
::
connect
(
QObject
::
connect
(
CoreManager
::
getInstance
()
->
getHandlers
().
get
()
,
&
CoreHandlers
::
callStateChanged
,
coreHandlers
,
&
CoreHandlers
::
callStateChanged
,
this
,
&
CallModel
::
handleCallStateChanged
this
,
&
CallModel
::
handleCallStateChanged
);
);
QObject
::
connect
(
coreHandlers
,
&
CoreHandlers
::
callEncryptionChanged
,
this
,
&
CallModel
::
handleCallEncryptionChanged
);
}
}
CallModel
::~
CallModel
()
{
CallModel
::~
CallModel
()
{
...
@@ -244,6 +251,11 @@ void CallModel::stopRecording () {
...
@@ -244,6 +251,11 @@ void CallModel::stopRecording () {
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void
CallModel
::
handleCallEncryptionChanged
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
)
{
if
(
call
==
mCall
)
emit
securityUpdated
();
}
void
CallModel
::
handleCallStateChanged
(
const
shared_ptr
<
linphone
::
Call
>
&
call
,
linphone
::
CallState
state
)
{
void
CallModel
::
handleCallStateChanged
(
const
shared_ptr
<
linphone
::
Call
>
&
call
,
linphone
::
CallState
state
)
{
if
(
call
!=
mCall
)
if
(
call
!=
mCall
)
return
;
return
;
...
@@ -301,7 +313,6 @@ void CallModel::handleCallStateChanged (const shared_ptr<linphone::Call> &call,
...
@@ -301,7 +313,6 @@ void CallModel::handleCallStateChanged (const shared_ptr<linphone::Call> &call,
break
;
break
;
}
}
emit
securityUpdated
();
emit
statusChanged
(
getStatus
());
emit
statusChanged
(
getStatus
());
}
}
...
...
src/components/call/CallModel.hpp
View file @
53731a91
...
@@ -139,6 +139,7 @@ signals:
...
@@ -139,6 +139,7 @@ signals:
void
cameraFirstFrameReceived
(
unsigned
int
width
,
unsigned
int
height
);
void
cameraFirstFrameReceived
(
unsigned
int
width
,
unsigned
int
height
);
private:
private:
void
handleCallEncryptionChanged
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
);
void
handleCallStateChanged
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
,
linphone
::
CallState
state
);
void
handleCallStateChanged
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
,
linphone
::
CallState
state
);
void
stopAutoAnswerTimer
()
const
;
void
stopAutoAnswerTimer
()
const
;
...
@@ -163,7 +164,7 @@ private:
...
@@ -163,7 +164,7 @@ private:
bool
getMicroMuted
()
const
;
bool
getMicroMuted
()
const
;
void
setMicroMuted
(
bool
status
);
void
setMicroMuted
(
bool
status
);
bool
getAudioMuted
()
const
;
bool
getAudioMuted
()
const
;
void
setAudioMuted
(
bool
status
);
void
setAudioMuted
(
bool
status
);
...
...
src/components/core/CoreHandlers.cpp
View file @
53731a91
...
@@ -85,6 +85,15 @@ void CoreHandlers::onAuthenticationRequested (
...
@@ -85,6 +85,15 @@ void CoreHandlers::onAuthenticationRequested (
emit
authenticationRequested
(
authInfo
);
emit
authenticationRequested
(
authInfo
);
}
}
void
CoreHandlers
::
onCallEncryptionChanged
(
const
shared_ptr
<
linphone
::
Core
>
&
,
const
shared_ptr
<
linphone
::
Call
>
&
call
,
bool
,
const
string
&
)
{
emit
callEncryptionChanged
(
call
);
}
void
CoreHandlers
::
onCallStateChanged
(
void
CoreHandlers
::
onCallStateChanged
(
const
shared_ptr
<
linphone
::
Core
>
&
,
const
shared_ptr
<
linphone
::
Core
>
&
,
const
shared_ptr
<
linphone
::
Call
>
&
call
,
const
shared_ptr
<
linphone
::
Call
>
&
call
,
...
...
src/components/core/CoreHandlers.hpp
View file @
53731a91
...
@@ -42,6 +42,7 @@ public:
...
@@ -42,6 +42,7 @@ public:
signals:
signals:
void
authenticationRequested
(
const
std
::
shared_ptr
<
linphone
::
AuthInfo
>
&
authInfo
);
void
authenticationRequested
(
const
std
::
shared_ptr
<
linphone
::
AuthInfo
>
&
authInfo
);
void
callEncryptionChanged
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
);
void
callStateChanged
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
,
linphone
::
CallState
state
);
void
callStateChanged
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
,
linphone
::
CallState
state
);
void
callTransferFailed
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
);
void
callTransferFailed
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
);
void
callTransferSucceeded
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
);
void
callTransferSucceeded
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
);
...
@@ -66,6 +67,13 @@ private:
...
@@ -66,6 +67,13 @@ private:
linphone
::
AuthMethod
method
linphone
::
AuthMethod
method
)
override
;
)
override
;
void
onCallEncryptionChanged
(
const
std
::
shared_ptr
<
linphone
::
Core
>
&
core
,
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
,
bool
on
,
const
std
::
string
&
authenticationToken
)
override
;
void
onCallStateChanged
(
void
onCallStateChanged
(
const
std
::
shared_ptr
<
linphone
::
Core
>
&
core
,
const
std
::
shared_ptr
<
linphone
::
Core
>
&
core
,
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
,
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
,
...
...
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