Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
790b9486
Commit
790b9486
authored
Feb 12, 2018
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add back pointer to the Participant in a ParticipantDevice.
parent
2ad51e7a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
src/conference/participant-device.cpp
src/conference/participant-device.cpp
+2
-3
src/conference/participant-device.h
src/conference/participant-device.h
+5
-1
src/conference/participant.cpp
src/conference/participant.cpp
+2
-1
No files found.
src/conference/participant-device.cpp
View file @
790b9486
...
...
@@ -29,9 +29,8 @@ LINPHONE_BEGIN_NAMESPACE
ParticipantDevice
::
ParticipantDevice
()
{}
ParticipantDevice
::
ParticipantDevice
(
const
IdentityAddress
&
gruu
)
{
mGruu
=
gruu
;
}
ParticipantDevice
::
ParticipantDevice
(
const
Participant
*
participant
,
const
IdentityAddress
&
gruu
)
:
mParticipant
(
participant
),
mGruu
(
gruu
)
{}
ParticipantDevice
::~
ParticipantDevice
()
{
if
(
mConferenceSubscribeEvent
)
...
...
src/conference/participant-device.h
View file @
790b9486
...
...
@@ -23,6 +23,7 @@
#include <string>
#include "address/identity-address.h"
#include "linphone/types.h"
#include "linphone/utils/general.h"
...
...
@@ -31,6 +32,7 @@
LINPHONE_BEGIN_NAMESPACE
class
CallSession
;
class
Participant
;
class
ParticipantDevice
{
public:
...
...
@@ -42,12 +44,13 @@ public:
};
ParticipantDevice
();
explicit
ParticipantDevice
(
const
IdentityAddress
&
gruu
);
explicit
ParticipantDevice
(
const
Participant
*
participant
,
const
IdentityAddress
&
gruu
);
virtual
~
ParticipantDevice
();
bool
operator
==
(
const
ParticipantDevice
&
device
)
const
;
inline
const
IdentityAddress
&
getAddress
()
const
{
return
mGruu
;
}
const
Participant
*
getParticipant
()
const
{
return
mParticipant
;
}
inline
std
::
shared_ptr
<
CallSession
>
getSession
()
const
{
return
mSession
;
}
inline
void
setSession
(
std
::
shared_ptr
<
CallSession
>
session
)
{
mSession
=
session
;
}
inline
State
getState
()
const
{
return
mState
;
}
...
...
@@ -60,6 +63,7 @@ public:
bool
isValid
()
const
{
return
mGruu
.
isValid
();
}
private:
const
Participant
*
mParticipant
=
nullptr
;
IdentityAddress
mGruu
;
std
::
shared_ptr
<
CallSession
>
mSession
;
LinphoneEvent
*
mConferenceSubscribeEvent
=
nullptr
;
...
...
src/conference/participant.cpp
View file @
790b9486
...
...
@@ -47,10 +47,11 @@ shared_ptr<CallSession> ParticipantPrivate::createSession (
// -----------------------------------------------------------------------------
shared_ptr
<
ParticipantDevice
>
ParticipantPrivate
::
addDevice
(
const
IdentityAddress
&
gruu
)
{
L_Q
();
shared_ptr
<
ParticipantDevice
>
device
=
findDevice
(
gruu
);
if
(
device
)
return
device
;
device
=
make_shared
<
ParticipantDevice
>
(
gruu
);
device
=
make_shared
<
ParticipantDevice
>
(
q
,
gruu
);
devices
.
push_back
(
device
);
return
device
;
}
...
...
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