Add the canHandleParticipants() method to the conference interface.

This commit is contained in:
Ghislain MARY 2017-09-14 11:17:04 +02:00
parent 7c4de39e80
commit bef0f90bf5
9 changed files with 21 additions and 0 deletions

View file

@ -44,6 +44,10 @@ void BasicChatRoom::addParticipants (const list<Address> &addresses, const CallS
lError() << "addParticipants() is not allowed on a BasicChatRoom";
}
bool BasicChatRoom::canHandleParticipants () const {
return false;
}
const string& BasicChatRoom::getId () const {
L_D(const BasicChatRoom);
lError() << "a BasicChatRoom does not have a conference id";

View file

@ -41,6 +41,7 @@ public:
/* ConferenceInterface */
std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia);
void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia);
bool canHandleParticipants () const;
const std::string& getId () const;
int getNbParticipants () const;
std::list<std::shared_ptr<Participant>> getParticipants () const;

View file

@ -54,6 +54,10 @@ void ClientGroupChatRoom::addParticipants (const list<Address> &addresses, const
// TODO
}
bool ClientGroupChatRoom::canHandleParticipants () const {
return true;
}
const string& ClientGroupChatRoom::getId () const {
return id;
}

View file

@ -42,6 +42,7 @@ public:
/* ConferenceInterface */
std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia);
void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia);
bool canHandleParticipants () const;
const std::string& getId () const;
int getNbParticipants () const;
std::list<std::shared_ptr<Participant>> getParticipants () const;

View file

@ -149,6 +149,10 @@ void RealTimeTextChatRoom::addParticipants (const list<Address> &addresses, cons
lError() << "addParticipants() is not allowed on a RealTimeTextChatRoom";
}
bool RealTimeTextChatRoom::canHandleParticipants () const {
return false;
}
const string& RealTimeTextChatRoom::getId () const {
L_D(const RealTimeTextChatRoom);
lError() << "a RealTimeTextChatRoom does not have a conference id";

View file

@ -45,6 +45,7 @@ public:
/* ConferenceInterface */
std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia);
void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia);
bool canHandleParticipants () const;
const std::string& getId () const;
int getNbParticipants () const;
std::list<std::shared_ptr<Participant>> getParticipants () const;

View file

@ -36,6 +36,7 @@ public:
virtual std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) = 0;
virtual void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia) = 0;
virtual bool canHandleParticipants () const = 0;
virtual const std::string& getId () const = 0;
virtual int getNbParticipants () const = 0;
virtual std::list<std::shared_ptr<Participant>> getParticipants () const = 0;

View file

@ -49,6 +49,10 @@ void Conference::addParticipants (const list<Address> &addresses, const CallSess
// TODO
}
bool Conference::canHandleParticipants () const {
return true;
}
const string& Conference::getId () const {
return id;
}

View file

@ -52,6 +52,7 @@ public:
/* ConferenceInterface */
virtual std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia);
virtual void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia);
virtual bool canHandleParticipants () const;
virtual const std::string& getId () const;
virtual int getNbParticipants () const;
virtual std::list<std::shared_ptr<Participant>> getParticipants () const;