Commit f0d1446f authored by François Grisez's avatar François Grisez

Renames LinphoneConference.getParticipantsCount() into getSize()

parent 2e52ca9e
......@@ -66,7 +66,7 @@ public:
bool microphoneIsMuted() const {return m_isMuted;}
float getInputVolume() const;
virtual int getParticipantCount() const {return m_participants.size() + (isIn()?1:0);}
virtual int getSize() const {return m_participants.size() + (isIn()?1:0);}
const std::list<Participant> &getParticipants() const {return m_participants;}
virtual int startRecording(const char *path) = 0;
......@@ -98,7 +98,7 @@ public:
virtual int enter();
virtual int leave();
virtual bool isIn() const {return m_localParticipantStream!=NULL;}
virtual int getParticipantCount() const;
virtual int getSize() const;
virtual int startRecording(const char *path);
virtual int stopRecording();
......@@ -380,7 +380,7 @@ int LocalConference::removeFromConference(LinphoneCall *call, bool_t active){
}
int LocalConference::remoteParticipantsCount() {
int count=getParticipantCount();
int count=getSize();
if (count==0) return 0;
if (!m_localParticipantStream) return count;
return count -1;
......@@ -477,7 +477,7 @@ int LocalConference::leave() {
return 0;
}
int LocalConference::getParticipantCount() const {
int LocalConference::getSize() const {
if (m_conf == NULL) {
return 0;
}
......@@ -527,7 +527,7 @@ void LocalConference::onCallStreamStopping(LinphoneCall *call) {
void LocalConference::onCallTerminating(LinphoneCall *call) {
int remote_count=remoteParticipantsCount();
ms_message("conference_check_uninit(): size=%i", getParticipantCount());
ms_message("conference_check_uninit(): size=%i", getSize());
if (remote_count==1 && !m_terminated){
convertConferenceToCall();
}
......@@ -840,8 +840,8 @@ float linphone_conference_get_input_volume(const LinphoneConference *obj) {
return ((Conference *)obj)->getInputVolume();
}
int linphone_conference_get_participant_count(const LinphoneConference *obj) {
return ((Conference *)obj)->getParticipantCount();
int linphone_conference_get_size(const LinphoneConference *obj) {
return ((Conference *)obj)->getSize();
}
MSList *linphone_conference_get_participants(const LinphoneConference *obj) {
......
......@@ -57,7 +57,7 @@ int linphone_conference_mute_microphone(LinphoneConference *obj, bool_t val);
bool_t linphone_conference_microphone_is_muted(const LinphoneConference *obj);
float linphone_conference_get_input_volume(const LinphoneConference *obj);
LINPHONE_PUBLIC int linphone_conference_get_participant_count(const LinphoneConference *obj);
LINPHONE_PUBLIC int linphone_conference_get_size(const LinphoneConference *obj);
LINPHONE_PUBLIC MSList *linphone_conference_get_participants(const LinphoneConference *obj);
int linphone_conference_start_recording(LinphoneConference *obj, const char *path);
......
......@@ -7491,7 +7491,7 @@ bool_t linphone_core_is_in_conference(const LinphoneCore *lc) {
}
int linphone_core_get_conference_size(LinphoneCore *lc) {
if(lc->conf_ctx) return linphone_conference_get_participant_count(lc->conf_ctx);
if(lc->conf_ctx) return linphone_conference_get_size(lc->conf_ctx);
return 0;
}
......
......@@ -3898,9 +3898,10 @@ LINPHONE_PUBLIC float linphone_core_get_conference_local_input_volume(LinphoneCo
*/
LINPHONE_PUBLIC int linphone_core_terminate_conference(LinphoneCore *lc);
/**
* Get the number of remote participant in the running conference
* Get the number of participant in the running conference. The local
* participant is included in the count only if it is in the conference.
* @param lc #LinphoneCore
* @return The number of remote participant
* @return The number of participant
*/
LINPHONE_PUBLIC int linphone_core_get_conference_size(LinphoneCore *lc);
/**
......
......@@ -262,8 +262,8 @@ static void simple_conference_base(LinphoneCoreManager* marie, LinphoneCoreManag
BC_ASSERT_PTR_NOT_NULL(conference = linphone_core_get_conference(marie->lc));
if(conference) {
MSList *participants = linphone_conference_get_participants(conference);
BC_ASSERT_EQUAL(linphone_conference_get_participant_count(conference), linphone_core_get_conference_size(marie->lc), int, "%d");
BC_ASSERT_EQUAL(linphone_conference_get_participant_count(conference), ms_list_size(participants)+(linphone_conference_is_in(conference)?1:0), int, "%d");
BC_ASSERT_EQUAL(linphone_conference_get_size(conference), linphone_core_get_conference_size(marie->lc), int, "%d");
BC_ASSERT_EQUAL(linphone_conference_get_size(conference), ms_list_size(participants)+(linphone_conference_is_in(conference)?1:0), int, "%d");
BC_ASSERT_TRUE(linphone_conference_is_in(conference));
ms_list_free_with_data(participants, (void(*)(void *))linphone_address_destroy);
}
......
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