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
a064407f
Commit
a064407f
authored
May 29, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(src/components/calls/CallsListModel): call transfer in progress
parent
74e52ac6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
9 deletions
+33
-9
CallModel.cpp
linphone-desktop/src/components/call/CallModel.cpp
+2
-2
CallModel.hpp
linphone-desktop/src/components/call/CallModel.hpp
+1
-1
CallsListModel.cpp
linphone-desktop/src/components/calls/CallsListModel.cpp
+6
-0
CallsListModel.hpp
linphone-desktop/src/components/calls/CallsListModel.hpp
+3
-0
Calls.js
linphone-desktop/ui/modules/Linphone/Calls/Calls.js
+6
-6
CallsWindow.js
linphone-desktop/ui/views/App/Calls/CallsWindow.js
+6
-0
CallsWindow.qml
linphone-desktop/ui/views/App/Calls/CallsWindow.qml
+9
-0
No files found.
linphone-desktop/src/components/call/CallModel.cpp
View file @
a064407f
...
...
@@ -135,8 +135,8 @@ void CallModel::terminate () {
core
->
unlockVideoRender
();
}
void
CallModel
::
t
ransfer
()
{
// TODO
void
CallModel
::
askForT
ransfer
()
{
CoreManager
::
getInstance
()
->
getCallsListModel
()
->
askForTransfer
(
this
);
}
void
CallModel
::
acceptVideoRequest
()
{
...
...
linphone-desktop/src/components/call/CallModel.hpp
View file @
a064407f
...
...
@@ -86,7 +86,7 @@ public:
Q_INVOKABLE
void
accept
();
Q_INVOKABLE
void
acceptWithVideo
();
Q_INVOKABLE
void
terminate
();
Q_INVOKABLE
void
t
ransfer
();
Q_INVOKABLE
void
askForT
ransfer
();
Q_INVOKABLE
void
acceptVideoRequest
();
Q_INVOKABLE
void
rejectVideoRequest
();
...
...
linphone-desktop/src/components/calls/CallsListModel.cpp
View file @
a064407f
...
...
@@ -85,6 +85,12 @@ QVariant CallsListModel::data (const QModelIndex &index, int role) const {
// -----------------------------------------------------------------------------
void
CallsListModel
::
askForTransfer
(
CallModel
*
callModel
)
{
emit
callTransferAsked
(
callModel
);
}
// -----------------------------------------------------------------------------
void
CallsListModel
::
launchAudioCall
(
const
QString
&
sipUri
)
const
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpretUrl
(
::
Utils
::
qStringToLinphoneString
(
sipUri
));
...
...
linphone-desktop/src/components/calls/CallsListModel.hpp
View file @
a064407f
...
...
@@ -43,6 +43,8 @@ public:
QHash
<
int
,
QByteArray
>
roleNames
()
const
override
;
QVariant
data
(
const
QModelIndex
&
index
,
int
role
=
Qt
::
DisplayRole
)
const
override
;
void
askForTransfer
(
CallModel
*
callModel
);
Q_INVOKABLE
void
launchAudioCall
(
const
QString
&
sipUri
)
const
;
Q_INVOKABLE
void
launchVideoCall
(
const
QString
&
sipUri
)
const
;
...
...
@@ -52,6 +54,7 @@ public:
signals:
void
callRunning
(
int
index
,
CallModel
*
callModel
);
void
callTransferAsked
(
CallModel
*
callModel
);
private:
bool
removeRow
(
int
row
,
const
QModelIndex
&
parent
=
QModelIndex
());
...
...
linphone-desktop/ui/modules/Linphone/Calls/Calls.js
View file @
a064407f
...
...
@@ -16,7 +16,7 @@ var MAP_STATUS_TO_PARAMS = (function () {
handler
:
(
function
()
{
call
.
pausedByUser
=
true
}),
name
:
qsTr
(
'
pauseCall
'
)
},
{
handler
:
call
.
t
ransfer
,
handler
:
call
.
askForT
ransfer
,
name
:
qsTr
(
'
transferCall
'
)
},
{
handler
:
call
.
terminate
,
...
...
@@ -40,10 +40,10 @@ var MAP_STATUS_TO_PARAMS = (function () {
handler
:
(
function
()
{
call
.
accept
()
})
},
{
name
:
qsTr
(
'
acceptVideoCall
'
),
handler
:
(
function
()
{
call
.
acceptWithVideo
()
})
handler
:
call
.
acceptWithVideo
},
{
name
:
qsTr
(
'
terminateCall
'
),
handler
:
(
function
()
{
call
.
terminate
()
})
handler
:
call
.
terminate
}],
component
:
callActions
,
string
:
'
incoming
'
...
...
@@ -53,7 +53,7 @@ var MAP_STATUS_TO_PARAMS = (function () {
map
[
CallModel
.
CallStatusOutgoing
]
=
(
function
(
call
)
{
return
{
component
:
callAction
,
handler
:
(
function
()
{
call
.
terminate
()
})
,
handler
:
call
.
terminate
,
icon
:
'
hangup
'
,
string
:
'
outgoing
'
}
...
...
@@ -68,10 +68,10 @@ var MAP_STATUS_TO_PARAMS = (function () {
handler
:
(
function
()
{
call
.
pausedByUser
=
true
}),
name
:
qsTr
(
'
pauseCall
'
)
}),
{
handler
:
(
function
()
{
call
.
transfer
()
})
,
handler
:
call
.
askForTransfer
,
name
:
qsTr
(
'
transferCall
'
)
},
{
handler
:
(
function
()
{
call
.
terminate
()
})
,
handler
:
call
.
terminate
,
name
:
qsTr
(
'
terminateCall
'
)
}],
component
:
callActions
,
...
...
linphone-desktop/ui/views/App/Calls/CallsWindow.js
View file @
a064407f
...
...
@@ -67,3 +67,9 @@ function getContent () {
return
incall
}
// -----------------------------------------------------------------------------
function
handleCallTransferAsked
(
call
)
{
console
.
log
(
'
TODO: handle call transfer
'
)
}
linphone-desktop/ui/views/App/Calls/CallsWindow.qml
View file @
a064407f
...
...
@@ -205,4 +205,13 @@ Window {
}
}
}
// ---------------------------------------------------------------------------
// Handle transfer.
// ---------------------------------------------------------------------------
Connections
{
target
:
CallsListModel
onCallTransferAsked
:
Logic
.
handleCallTransferAsked
(
callModel
)
}
}
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