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
b943d423
Commit
b943d423
authored
May 19, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Calls/ConferenceManager): in progress
parent
f4d2ca9d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
5 deletions
+50
-5
CallModel.cpp
linphone-desktop/src/components/call/CallModel.cpp
+1
-1
ConferenceAddModel.cpp
...-desktop/src/components/conference/ConferenceAddModel.cpp
+34
-3
ConferenceAddModel.hpp
...-desktop/src/components/conference/ConferenceAddModel.hpp
+6
-0
ConferenceHelperModel.hpp
...sktop/src/components/conference/ConferenceHelperModel.hpp
+1
-1
SipAddressesModel.cpp
...esktop/src/components/sip-addresses/SipAddressesModel.cpp
+7
-0
SipAddressesModel.hpp
...esktop/src/components/sip-addresses/SipAddressesModel.hpp
+1
-0
No files found.
linphone-desktop/src/components/call/CallModel.cpp
View file @
b943d423
...
@@ -193,7 +193,7 @@ void CallModel::stopRecording () {
...
@@ -193,7 +193,7 @@ void CallModel::stopRecording () {
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void
CallModel
::
handleCallStateChanged
(
const
s
td
::
s
hared_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
;
...
...
linphone-desktop/src/components/conference/ConferenceAddModel.cpp
View file @
b943d423
...
@@ -33,7 +33,14 @@ ConferenceHelperModel::ConferenceAddModel::ConferenceAddModel (QObject *parent)
...
@@ -33,7 +33,14 @@ ConferenceHelperModel::ConferenceAddModel::ConferenceAddModel (QObject *parent)
mConferenceHelperModel
=
qobject_cast
<
ConferenceHelperModel
*>
(
parent
);
mConferenceHelperModel
=
qobject_cast
<
ConferenceHelperModel
*>
(
parent
);
Q_ASSERT
(
mConferenceHelperModel
!=
nullptr
);
Q_ASSERT
(
mConferenceHelperModel
!=
nullptr
);
for
(
auto
&
participant
:
CoreManager
::
getInstance
()
->
getCore
()
->
getConference
()
->
getParticipants
())
CoreManager
*
coreManager
=
CoreManager
::
getInstance
();
QObject
::
connect
(
coreManager
->
getSipAddressesModel
(),
&
SipAddressesModel
::
dataChanged
,
this
,
&
ConferenceAddModel
::
handleDataChanged
);
for
(
auto
&
participant
:
coreManager
->
getCore
()
->
getConference
()
->
getParticipants
())
addToConference
(
participant
);
addToConference
(
participant
);
}
}
...
@@ -118,9 +125,9 @@ void ConferenceHelperModel::ConferenceAddModel::update () {
...
@@ -118,9 +125,9 @@ void ConferenceHelperModel::ConferenceAddModel::update () {
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void
ConferenceHelperModel
::
ConferenceAddModel
::
addToConference
(
const
s
td
::
s
hared_ptr
<
linphone
::
Address
>
&
linphoneAddress
)
{
void
ConferenceHelperModel
::
ConferenceAddModel
::
addToConference
(
const
shared_ptr
<
linphone
::
Address
>
&
linphoneAddress
)
{
QString
sipAddress
=
::
Utils
::
linphoneStringToQString
(
linphoneAddress
->
asStringUriOnly
());
QString
sipAddress
=
::
Utils
::
linphoneStringToQString
(
linphoneAddress
->
asStringUriOnly
());
QVariantMap
map
;
QVariantMap
map
=
CoreManager
::
getInstance
()
->
getSipAddressesModel
()
->
find
(
sipAddress
)
;
map
[
"sipAddress"
]
=
sipAddress
;
map
[
"sipAddress"
]
=
sipAddress
;
map
[
"__linphoneAddress"
]
=
QVariant
::
fromValue
(
linphoneAddress
);
map
[
"__linphoneAddress"
]
=
QVariant
::
fromValue
(
linphoneAddress
);
...
@@ -128,3 +135,27 @@ void ConferenceHelperModel::ConferenceAddModel::addToConference (const std::shar
...
@@ -128,3 +135,27 @@ void ConferenceHelperModel::ConferenceAddModel::addToConference (const std::shar
mSipAddresses
[
sipAddress
]
=
map
;
mSipAddresses
[
sipAddress
]
=
map
;
mRefs
<<
&
mSipAddresses
[
sipAddress
];
mRefs
<<
&
mSipAddresses
[
sipAddress
];
}
}
// -----------------------------------------------------------------------------
void
ConferenceHelperModel
::
ConferenceAddModel
::
handleDataChanged
(
const
QModelIndex
&
topLeft
,
const
QModelIndex
&
bottomRight
,
const
QVector
<
int
>
&
)
{
SipAddressesModel
*
sipAddressesModel
=
CoreManager
::
getInstance
()
->
getSipAddressesModel
();
int
limit
=
bottomRight
.
row
();
for
(
int
row
=
topLeft
.
row
();
row
<=
limit
;
++
row
)
{
const
QVariantMap
&
map
=
sipAddressesModel
->
data
(
sipAddressesModel
->
index
(
row
,
0
)).
toMap
();
auto
it
=
mSipAddresses
.
find
(
map
[
"sipAddress"
].
toString
());
if
(
it
!=
mSipAddresses
.
end
())
{
(
*
it
)[
"contact"
]
=
map
.
value
(
"contact"
);
int
row
=
mRefs
.
indexOf
(
&
(
*
it
));
Q_ASSERT
(
row
!=
-
1
);
emit
dataChanged
(
index
(
row
,
0
),
index
(
row
,
0
));
}
}
}
linphone-desktop/src/components/conference/ConferenceAddModel.hpp
View file @
b943d423
...
@@ -57,6 +57,12 @@ public:
...
@@ -57,6 +57,12 @@ public:
private:
private:
void
addToConference
(
const
std
::
shared_ptr
<
linphone
::
Address
>
&
linphoneAddress
);
void
addToConference
(
const
std
::
shared_ptr
<
linphone
::
Address
>
&
linphoneAddress
);
void
handleDataChanged
(
const
QModelIndex
&
topLeft
,
const
QModelIndex
&
bottomRight
,
const
QVector
<
int
>
&
roles
=
QVector
<
int
>
()
);
QHash
<
QString
,
QVariantMap
>
mSipAddresses
;
QHash
<
QString
,
QVariantMap
>
mSipAddresses
;
QList
<
const
QVariantMap
*>
mRefs
;
QList
<
const
QVariantMap
*>
mRefs
;
...
...
linphone-desktop/src/components/conference/ConferenceHelperModel.hpp
View file @
b943d423
...
@@ -39,7 +39,7 @@ namespace linphone {
...
@@ -39,7 +39,7 @@ namespace linphone {
class
ConferenceHelperModel
:
public
QSortFilterProxyModel
{
class
ConferenceHelperModel
:
public
QSortFilterProxyModel
{
Q_OBJECT
;
Q_OBJECT
;
Q_PROPERTY
(
ConferenceAddModel
*
toAdd
READ
getConferenceAddModel
CONSTANT
);
Q_PROPERTY
(
Conference
HelperModel
::
Conference
AddModel
*
toAdd
READ
getConferenceAddModel
CONSTANT
);
public:
public:
class
ConferenceAddModel
;
class
ConferenceAddModel
;
...
...
linphone-desktop/src/components/sip-addresses/SipAddressesModel.cpp
View file @
b943d423
...
@@ -93,6 +93,13 @@ void SipAddressesModel::connectToChatModel (ChatModel *chatModel) {
...
@@ -93,6 +93,13 @@ void SipAddressesModel::connectToChatModel (ChatModel *chatModel) {
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
QVariantMap
SipAddressesModel
::
find
(
const
QString
&
sipAddress
)
const
{
auto
it
=
mSipAddresses
.
find
(
sipAddress
);
return
it
==
mSipAddresses
.
end
()
?
QVariantMap
()
:
*
it
;
}
// -----------------------------------------------------------------------------
ContactModel
*
SipAddressesModel
::
mapSipAddressToContact
(
const
QString
&
sipAddress
)
const
{
ContactModel
*
SipAddressesModel
::
mapSipAddressToContact
(
const
QString
&
sipAddress
)
const
{
auto
it
=
mSipAddresses
.
find
(
sipAddress
);
auto
it
=
mSipAddresses
.
find
(
sipAddress
);
if
(
it
==
mSipAddresses
.
end
())
if
(
it
==
mSipAddresses
.
end
())
...
...
linphone-desktop/src/components/sip-addresses/SipAddressesModel.hpp
View file @
b943d423
...
@@ -47,6 +47,7 @@ public:
...
@@ -47,6 +47,7 @@ public:
void
connectToChatModel
(
ChatModel
*
chatModel
);
void
connectToChatModel
(
ChatModel
*
chatModel
);
Q_INVOKABLE
QVariantMap
find
(
const
QString
&
sipAddress
)
const
;
Q_INVOKABLE
ContactModel
*
mapSipAddressToContact
(
const
QString
&
sipAddress
)
const
;
Q_INVOKABLE
ContactModel
*
mapSipAddressToContact
(
const
QString
&
sipAddress
)
const
;
Q_INVOKABLE
SipAddressObserver
*
getSipAddressObserver
(
const
QString
&
sipAddress
);
Q_INVOKABLE
SipAddressObserver
*
getSipAddressObserver
(
const
QString
&
sipAddress
);
...
...
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