Commit 15c417b8 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Add isMe() method to the conference.

parent b499578d
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment