Liblinphone  5.0.0
Public Types | Public Member Functions | List of all members
linphone::Conference Class Reference

A conference is the object that allow to make calls when there are 2 or more participants. More...

#include <conference.hh>

Inheritance diagram for linphone::Conference:

Public Types

enum class  State {
  None = 0 ,
  Instantiated = 1 ,
  CreationPending = 2 ,
  Created = 3 ,
  CreationFailed = 4 ,
  TerminationPending = 5 ,
  Terminated = 6 ,
  TerminationFailed = 7 ,
  Deleted = 8
}
 State is used to indicate the current state of a conference. More...
 

Public Member Functions

 Conference (void *ptr, bool takeRef=true)
 
LINPHONECXX_PUBLIC _LinphoneConference * cPtr ()
 
LINPHONECXX_PUBLIC void addListener (const std::shared_ptr< ConferenceListener > &listener)
 
LINPHONECXX_PUBLIC void removeListener (const std::shared_ptr< ConferenceListener > &listener)
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AddressgetConferenceAddress () const
 Get the conference address of the conference. More...
 
LINPHONECXX_PUBLIC void setConferenceAddress (const std::shared_ptr< linphone::Address > &address)
 Set the conference address. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::CoregetCore () const
 Returns core for a Conference. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::ConferenceParamsgetCurrentParams () const
 Get current parameters of the conference. More...
 
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED std::string getId () const
 Get the conference id as string. More...
 
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED void setId (const std::string &conferenceId)
 Set the conference id as string. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AudioDevicegetInputAudioDevice () const
 Gets the current input device for this conference. More...
 
LINPHONECXX_PUBLIC void setInputAudioDevice (const std::shared_ptr< linphone::AudioDevice > &audioDevice)
 Sets the given AudioDevice as input for this conference only. More...
 
LINPHONECXX_PUBLIC bool isIn () const
 For a local conference, it returns whether the local participant is enabled For a remote conference, it return whether the remote participant has left the conference without bein removed from it. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ParticipantgetMe () const
 For a local audio video conference, this function returns the participant hosting the conference For a remote audio video conference, this function returns the focus of the conference. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AudioDevicegetOutputAudioDevice () const
 Gets the current output device for this conference. More...
 
LINPHONECXX_PUBLIC void setOutputAudioDevice (const std::shared_ptr< linphone::AudioDevice > &audioDevice)
 Sets the given AudioDevice as output for this conference only. More...
 
LINPHONECXX_PUBLIC int getParticipantCount () const
 Get number of participants without me. More...
 
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::Participant > > getParticipantList () const
 Get list of all participants of one conference. More...
 
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED std::list< std::shared_ptr< linphone::Address > > getParticipants () const
 Get URIs of all participants of one conference The returned bctbx_list_t contains URIs of all participant. More...
 
LINPHONECXX_PUBLIC std::string getSubject () const
 Get the conference subject. More...
 
LINPHONECXX_PUBLIC void setSubject (const std::string &subject)
 Set the conference subject. More...
 
LINPHONECXX_PUBLIC linphone::Status addParticipant (const std::shared_ptr< linphone::Call > &call)
 Join an existing call to the conference. More...
 
LINPHONECXX_PUBLIC linphone::Status addParticipant (const std::shared_ptr< const linphone::Address > &uri)
 Join a participant to the conference. More...
 
LINPHONECXX_PUBLIC linphone::Status addParticipants (const std::list< std::shared_ptr< linphone::Call >> &calls)
 Add participants to the conference, by supplying a list of Call. More...
 
LINPHONECXX_PUBLIC int enter ()
 For a local conference, the local participant joins the conference For a remote conference, the participant rejoins the conference after leaving it earlier on. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ParticipantfindParticipant (const std::shared_ptr< const linphone::Address > &uri)
 Find a participant from a conference. More...
 
LINPHONECXX_PUBLIC linphone::Status inviteParticipants (const std::list< std::shared_ptr< linphone::Address >> &addresses, const std::shared_ptr< const linphone::CallParams > &params)
 Invite participants to the conference, by supplying a list of Address If the conference is in the state LinphoneConferenceStateCreationPending, then the conference will start on the input and output audio devices used for the currently active call, if any. More...
 
LINPHONECXX_PUBLIC bool isMe (const std::shared_ptr< const linphone::Address > &uri) const
 For a local audio video conference, this function compares the address provided as argument with that of participant hosting the conference For a remote audio video conference, this function compares the address provided as argument with that of the focus of the conference. More...
 
LINPHONECXX_PUBLIC int leave ()
 For a local conference, the local participant leaves the conference For a remote conference, the participant leaves the conference after joining it earlier on. More...
 
LINPHONECXX_PUBLIC void oglRender ()
 Call generic OpenGL render for a given conference.
 
LINPHONECXX_PUBLIC void previewOglRender ()
 Call generic OpenGL render preview for a given conference.
 
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED linphone::Status removeParticipant (const std::shared_ptr< const linphone::Address > &uri)
 
LINPHONECXX_PUBLIC linphone::Status removeParticipant (const std::shared_ptr< linphone::Participant > &participant)
 
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED linphone::Status removeParticipant (const std::shared_ptr< linphone::Call > &call)
 
LINPHONECXX_PUBLIC void setParticipantAdminStatus (const std::shared_ptr< linphone::Participant > &participant, bool isAdmin)
 Change the admin status of a participant of a conference (you need to be an admin yourself to do this). More...
 
LINPHONECXX_PUBLIC int terminate ()
 Terminates conference. More...
 
LINPHONECXX_PUBLIC int updateParams (const std::shared_ptr< const linphone::ConferenceParams > &params)
 Update parameters of the conference. More...
 

Detailed Description

A conference is the object that allow to make calls when there are 2 or more participants.

To create (or find) a Conference, you first need a ConferenceParams object. Core::createConferenceWithParams() allows you to create a conference. A conference is uniquely identified by a conference address, meaning you can have more than one conference between two accounts. As of now, each Core can host only 1 conference but it can be part of many conferences as a remote participant. To find a conference among those a core is part of, you can call Core::searchConference().

Member Enumeration Documentation

◆ State

State is used to indicate the current state of a conference.

Enumerator
None 

Initial state.

Instantiated 

Conference is now instantiated on local.

CreationPending 

One creation request was sent to the server.

Created 

Conference was created on the server.

CreationFailed 

Conference creation failed.

TerminationPending 

Wait for conference termination.

Terminated 

Conference exists on server but not in local.

TerminationFailed 

Conference termination failed.

Deleted 

Conference was deleted on the server.

Member Function Documentation

◆ addParticipant() [1/2]

LINPHONECXX_PUBLIC linphone::Status linphone::Conference::addParticipant ( const std::shared_ptr< const linphone::Address > &  uri)

Join a participant to the conference.

Parameters
uria Address that has to be added to the conference.

◆ addParticipant() [2/2]

LINPHONECXX_PUBLIC linphone::Status linphone::Conference::addParticipant ( const std::shared_ptr< linphone::Call > &  call)

Join an existing call to the conference.

If the conference is in the state LinphoneConferenceStateCreationPending, then the conference will start on the input and output audio devices used for the currently active call, if any

Parameters
calla Call that has to be added to the conference.

◆ addParticipants()

LINPHONECXX_PUBLIC linphone::Status linphone::Conference::addParticipants ( const std::list< std::shared_ptr< linphone::Call >> &  calls)

Add participants to the conference, by supplying a list of Call.

If the conference is in the state LinphoneConferenceStateCreationPending, then the conference will start on the input and output audio devices used for the currently active call, if any

Parameters
callsA list of calls to add to the conference.

◆ enter()

LINPHONECXX_PUBLIC int linphone::Conference::enter ( )

For a local conference, the local participant joins the conference For a remote conference, the participant rejoins the conference after leaving it earlier on.

Returns
0 if succeeded. Negative number if failed

◆ findParticipant()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::Participant> linphone::Conference::findParticipant ( const std::shared_ptr< const linphone::Address > &  uri)

Find a participant from a conference.

Parameters
uriSIP URI of the participant to search.
Returns
a pointer to the participant found or nullptr.

◆ getConferenceAddress()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::Conference::getConferenceAddress ( ) const

Get the conference address of the conference.

Returns
The conference address of the conference.

◆ getCore()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::Core> linphone::Conference::getCore ( ) const

Returns core for a Conference.

Returns
back pointer to Core object. Returns back pointer to Core object.

◆ getCurrentParams()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::ConferenceParams> linphone::Conference::getCurrentParams ( ) const

Get current parameters of the conference.

Returns
a ConferenceParams .

◆ getId()

LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED std::string linphone::Conference::getId ( ) const

Get the conference id as string.

Returns
the conference id
Deprecated:
10/07/2020 Use getConferenceAddress() instead.

◆ getInputAudioDevice()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::AudioDevice> linphone::Conference::getInputAudioDevice ( ) const

Gets the current input device for this conference.

Returns
the AudioDevice used by this conference as input or nullptr if there is currently no soundcard configured (depending on the state of the conference)

◆ getMe()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::Participant> linphone::Conference::getMe ( ) const

For a local audio video conference, this function returns the participant hosting the conference For a remote audio video conference, this function returns the focus of the conference.

Returns
a Participant .

◆ getOutputAudioDevice()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::AudioDevice> linphone::Conference::getOutputAudioDevice ( ) const

Gets the current output device for this conference.

Returns
the AudioDevice used by this conference as output or nullptr if there is currently no soundcard configured (depending on the state of the conference)

◆ getParticipantCount()

LINPHONECXX_PUBLIC int linphone::Conference::getParticipantCount ( ) const

Get number of participants without me.

Returns
the number of participants excluding me in a Conference

◆ getParticipantList()

LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::Participant> > linphone::Conference::getParticipantList ( ) const

Get list of all participants of one conference.

Returns
The list of participants of the conference.

◆ getParticipants()

LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED std::list<std::shared_ptr<linphone::Address> > linphone::Conference::getParticipants ( ) const

Get URIs of all participants of one conference The returned bctbx_list_t contains URIs of all participant.

That list must be freed after use and each URI must be unref with linphone_address_unref

Returns
The list of the participants' address active in the conference.
Deprecated:
10/07/2020 Use getParticipantList() instead.

◆ getSubject()

LINPHONECXX_PUBLIC std::string linphone::Conference::getSubject ( ) const

Get the conference subject.

Returns
conference subject.

◆ inviteParticipants()

LINPHONECXX_PUBLIC linphone::Status linphone::Conference::inviteParticipants ( const std::list< std::shared_ptr< linphone::Address >> &  addresses,
const std::shared_ptr< const linphone::CallParams > &  params 
)

Invite participants to the conference, by supplying a list of Address If the conference is in the state LinphoneConferenceStateCreationPending, then the conference will start on the input and output audio devices used for the currently active call, if any.

Parameters
paramsCallParams to use for inviting the participants.

◆ isIn()

LINPHONECXX_PUBLIC bool linphone::Conference::isIn ( ) const

For a local conference, it returns whether the local participant is enabled For a remote conference, it return whether the remote participant has left the conference without bein removed from it.

Returns
true if the local participant is in a conference, false otherwise.

◆ isMe()

LINPHONECXX_PUBLIC bool linphone::Conference::isMe ( const std::shared_ptr< const linphone::Address > &  uri) const

For a local audio video conference, this function compares the address provided as argument with that of participant hosting the conference For a remote audio video conference, this function compares the address provided as argument with that of the focus of the conference.

Parameters
uriA Address object
Returns
true if the participant is me, false otherwise.

◆ leave()

LINPHONECXX_PUBLIC int linphone::Conference::leave ( )

For a local conference, the local participant leaves the conference For a remote conference, the participant leaves the conference after joining it earlier on.

Returns
0 if succeeded. Negative number if failed

◆ removeParticipant() [1/3]

LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED linphone::Status linphone::Conference::removeParticipant ( const std::shared_ptr< const linphone::Address > &  uri)
Parameters
uriURI of the participant to remove
Warning
The passed participant uri must be one of those returned by getParticipants()
Returns
0 if succeeded, -1 if failed
Deprecated:
10/07/2020 Use removeParticipant() instead.

◆ removeParticipant() [2/3]

LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED linphone::Status linphone::Conference::removeParticipant ( const std::shared_ptr< linphone::Call > &  call)
Parameters
callcall to remove
Returns
0 if succeeded, -1 if failed
Deprecated:
10/07/2020 Use removeParticipant() instead.

◆ removeParticipant() [3/3]

LINPHONECXX_PUBLIC linphone::Status linphone::Conference::removeParticipant ( const std::shared_ptr< linphone::Participant > &  participant)
Parameters
participantparticipant to remove
Warning
The passed participant must be one of those returned by getParticipantList()
This method may destroy the conference if the only remaining participant had an existing call to the local participant before the conference was created
Returns
0 if succeeded, -1 if failed

◆ setConferenceAddress()

LINPHONECXX_PUBLIC void linphone::Conference::setConferenceAddress ( const std::shared_ptr< linphone::Address > &  address)

Set the conference address.

Parameters
addressthe conference address to set.
Warning
This is only allowed for a remote conference if it is in state CreationPending or Instantiated

◆ setId()

LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED void linphone::Conference::setId ( const std::string &  conferenceId)

Set the conference id as string.

Parameters
conferenceIdthe conference id to set.
Deprecated:
10/07/2020 Use setConferenceAddress() instead.

◆ setInputAudioDevice()

LINPHONECXX_PUBLIC void linphone::Conference::setInputAudioDevice ( const std::shared_ptr< linphone::AudioDevice > &  audioDevice)

Sets the given AudioDevice as input for this conference only.

Parameters
audioDeviceThe AudioDevice. nullptr does nothing.

◆ setOutputAudioDevice()

LINPHONECXX_PUBLIC void linphone::Conference::setOutputAudioDevice ( const std::shared_ptr< linphone::AudioDevice > &  audioDevice)

Sets the given AudioDevice as output for this conference only.

Parameters
audioDeviceThe AudioDevice. nullptr does nothing.

◆ setParticipantAdminStatus()

LINPHONECXX_PUBLIC void linphone::Conference::setParticipantAdminStatus ( const std::shared_ptr< linphone::Participant > &  participant,
bool  isAdmin 
)

Change the admin status of a participant of a conference (you need to be an admin yourself to do this).

Parameters
isAdminA boolean value telling whether the participant should now be an admin or not

◆ setSubject()

LINPHONECXX_PUBLIC void linphone::Conference::setSubject ( const std::string &  subject)

Set the conference subject.

Parameters
subjectconference subject

◆ terminate()

LINPHONECXX_PUBLIC int linphone::Conference::terminate ( )

Terminates conference.

Returns
0 if the termination is successful, -1 otherwise.

◆ updateParams()

LINPHONECXX_PUBLIC int linphone::Conference::updateParams ( const std::shared_ptr< const linphone::ConferenceParams > &  params)

Update parameters of the conference.

This is typically used enable or disable the video stream in the conference.

Parameters
paramsthe new parameters to apply.

The documentation for this class was generated from the following file: