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
9f6857ce
Commit
9f6857ce
authored
Jul 21, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(SettingsModel): add a video mode supports for auto answer (close #44)
parent
c103e180
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
3 deletions
+46
-3
en.ts
assets/languages/en.ts
+4
-0
fr.ts
assets/languages/fr.ts
+4
-0
CallModel.cpp
src/components/call/CallModel.cpp
+9
-3
SettingsModel.cpp
src/components/settings/SettingsModel.cpp
+11
-0
SettingsModel.hpp
src/components/settings/SettingsModel.hpp
+5
-0
SettingsCallsChat.qml
ui/views/App/Settings/SettingsCallsChat.qml
+13
-0
No files found.
assets/languages/en.ts
View file @
9f6857ce
...
...
@@ -1110,6 +1110,10 @@ your friend's SIP address or username.</translation>
<
source
>
autoAnswerDelayLabel
<
/source
>
<
translation
>
Delay
(
in
ms
)
<
/translation
>
<
/message
>
<
message
>
<
source
>
autoAnswerWithVideoLabel
<
/source
>
<
translation
>
Auto
answer
(
with
video
)
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SettingsNetwork
<
/name
>
...
...
assets/languages/fr.ts
View file @
9f6857ce
...
...
@@ -1108,6 +1108,10 @@ Cliquez ici : <a href="%1">%1</a>
<
source
>
autoAnswerDelayLabel
<
/source
>
<
translation
>
D
é
lai
(
en
ms
)
<
/translation
>
<
/message
>
<
message
>
<
source
>
autoAnswerWithVideoLabel
<
/source
>
<
translation
>
R
é
pondre
autom
.
(
avec
vid
é
o
)
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SettingsNetwork
<
/name
>
...
...
src/components/call/CallModel.cpp
View file @
9f6857ce
...
...
@@ -343,10 +343,16 @@ CallModel::CallStatus CallModel::getStatus () const {
// -----------------------------------------------------------------------------
void
CallModel
::
acceptWithAutoAnswerDelay
()
{
// Use auto-answer if activated and it's the only call.
CoreManager
*
coreManager
=
CoreManager
::
getInstance
();
if
(
coreManager
->
getSettingsModel
()
->
getAutoAnswerStatus
()
&&
coreManager
->
getCore
()
->
getCallsNb
()
==
1
)
accept
();
SettingsModel
*
settingsModel
=
coreManager
->
getSettingsModel
();
// Use auto-answer if activated and it's the only call.
if
(
settingsModel
->
getAutoAnswerStatus
()
&&
coreManager
->
getCore
()
->
getCallsNb
()
==
1
)
{
if
(
mCall
->
getRemoteParams
()
->
videoEnabled
()
&&
settingsModel
->
getAutoAnswerVideoStatus
())
acceptWithVideo
();
else
accept
();
}
}
// -----------------------------------------------------------------------------
...
...
src/components/settings/SettingsModel.cpp
View file @
9f6857ce
...
...
@@ -261,6 +261,17 @@ void SettingsModel::setAutoAnswerStatus (bool status) {
// -----------------------------------------------------------------------------
bool
SettingsModel
::
getAutoAnswerVideoStatus
()
const
{
return
!!
mConfig
->
getInt
(
UI_SECTION
,
"auto_answer_with_video"
,
0
);
}
void
SettingsModel
::
setAutoAnswerVideoStatus
(
bool
status
)
{
mConfig
->
setInt
(
UI_SECTION
,
"auto_answer_with_video"
,
status
);
emit
autoAnswerVideoStatusChanged
(
status
);
}
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getFileTransferUrl
()
const
{
return
::
Utils
::
coreStringToAppString
(
CoreManager
::
getInstance
()
->
getCore
()
->
getFileTransferServer
()
...
...
src/components/settings/SettingsModel.hpp
View file @
9f6857ce
...
...
@@ -64,6 +64,7 @@ class SettingsModel : public QObject {
// Chat & calls. -------------------------------------------------------------
Q_PROPERTY
(
bool
autoAnswerStatus
READ
getAutoAnswerStatus
WRITE
setAutoAnswerStatus
NOTIFY
autoAnswerStatusChanged
);
Q_PROPERTY
(
bool
autoAnswerVideoStatus
READ
getAutoAnswerVideoStatus
WRITE
setAutoAnswerVideoStatus
NOTIFY
autoAnswerVideoStatusChanged
);
Q_PROPERTY
(
int
autoAnswerDelay
READ
getAutoAnswerDelay
WRITE
setAutoAnswerDelay
NOTIFY
autoAnswerDelayChanged
);
Q_PROPERTY
(
QString
fileTransferUrl
READ
getFileTransferUrl
WRITE
setFileTransferUrl
NOTIFY
fileTransferUrlChanged
);
...
...
@@ -194,6 +195,9 @@ public:
bool
getAutoAnswerStatus
()
const
;
void
setAutoAnswerStatus
(
bool
status
);
bool
getAutoAnswerVideoStatus
()
const
;
void
setAutoAnswerVideoStatus
(
bool
status
);
int
getAutoAnswerDelay
()
const
;
void
setAutoAnswerDelay
(
int
delay
);
...
...
@@ -333,6 +337,7 @@ signals:
// Chat & calls. -------------------------------------------------------------
void
autoAnswerStatusChanged
(
bool
status
);
void
autoAnswerVideoStatusChanged
(
bool
status
);
void
autoAnswerDelayChanged
(
int
delay
);
void
fileTransferUrlChanged
(
const
QString
&
url
);
...
...
ui/views/App/Settings/SettingsCallsChat.qml
View file @
9f6857ce
...
...
@@ -86,6 +86,19 @@ TabContainer {
}
}
}
FormLine
{
FormGroup
{
label
:
qsTr
(
'
autoAnswerWithVideoLabel
'
)
Switch
{
checked
:
SettingsModel
.
autoAnswerVideoStatus
enabled
:
autoAnswer
.
checked
onClicked
:
SettingsModel
.
autoAnswerVideoStatus
=
!
checked
}
}
}
}
Form
{
...
...
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