mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 09:49:26 +00:00
Add isMe() method to the conference.
This commit is contained in:
parent
b499578df6
commit
15c417b86c
2 changed files with 9 additions and 2 deletions
|
|
@ -149,7 +149,7 @@ void Conference::onResetFirstVideoFrameDecoded (const CallSession &session) {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
shared_ptr<Participant> Conference::findParticipant (const Address &addr) {
|
||||
shared_ptr<Participant> Conference::findParticipant (const Address &addr) const {
|
||||
for (const auto &participant : participants) {
|
||||
if (addr.equal(participant->getAddress()))
|
||||
return participant;
|
||||
|
|
@ -157,4 +157,10 @@ shared_ptr<Participant> Conference::findParticipant (const Address &addr) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
bool Conference::isMe (const Address &addr) const {
|
||||
Address cleanedAddress = me->getAddress();
|
||||
cleanedAddress.setPort(0);
|
||||
return addr.equal(cleanedAddress);
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -76,7 +76,8 @@ private:
|
|||
protected:
|
||||
explicit Conference (LinphoneCore *core, const Address &myAddress, CallListener *listener = nullptr);
|
||||
|
||||
std::shared_ptr<Participant> findParticipant (const Address &addr);
|
||||
std::shared_ptr<Participant> findParticipant (const Address &addr) const;
|
||||
bool isMe (const Address &addr) const ;
|
||||
|
||||
protected:
|
||||
LinphoneCore *core = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue