Liblinphone 5.2.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
LINPHONECXX_PUBLIC | Conference (void *ptr, bool takeRef=true)
LINPHONECXX_PUBLIC _LinphoneConference * | cPtr ()
LINPHONECXX_PUBLIC void | addListener (const std::shared_ptr< ConferenceListener > &listener)
| Add an application listener to the Conference instance.
LINPHONECXX_PUBLIC void | removeListener (const std::shared_ptr< ConferenceListener > &listener)
| Remove a previously added listener from the Conference instance.
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ParticipantDevice > | getActiveSpeakerParticipantDevice () const
| Get the currently active speaker participant device.
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Call > | getCall () const
| Gets the call that is controlling a conference.
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getConferenceAddress () const
| Get the conference address of the conference.
LINPHONECXX_PUBLIC void | setConferenceAddress (const std::shared_ptr< linphone::Address > &address)
| Set the conference address.
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Core > | getCore () const
| Returns core for a Conference.
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::ConferenceParams > | getCurrentParams () const
| Get current parameters of the conference.
LINPHONECXX_PUBLIC int | getDuration () const
| Get the conference duration.
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED std::string | getId () const
| Get the conference id as string.
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED void | setId (const std::string &conferenceId)
| Set the conference id as string.
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AudioDevice > | getInputAudioDevice () const
| Gets the current input device for this conference.
LINPHONECXX_PUBLIC void | setInputAudioDevice (const std::shared_ptr< linphone::AudioDevice > &audioDevice)
| Sets the given AudioDevice as input for this conference only.
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.
LINPHONECXX_PUBLIC bool | isRecording () const
| Gets whether the conference is currently being recorded.
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Participant > | 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 local participant of the conference.
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AudioDevice > | getOutputAudioDevice () const
| Gets the current output device for this conference.
LINPHONECXX_PUBLIC void | setOutputAudioDevice (const std::shared_ptr< linphone::AudioDevice > &audioDevice)
| Sets the given AudioDevice as output for this conference only.
LINPHONECXX_PUBLIC int | getParticipantCount () const
| Get number of participants without me.
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::ParticipantDevice > > | getParticipantDeviceList () const
| Get list of all participant devices of a conference including me if it is in.
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::Participant > > | getParticipantList () const
| Get list of all participants of a conference.
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 participants.
LINPHONECXX_PUBLIC time_t | getStartTime () const
| Get the conference start time.
LINPHONECXX_PUBLIC State | getState () const
| Get the current state of the conference.
LINPHONECXX_PUBLIC std::string | getSubject () const
| Get the conference subject.
LINPHONECXX_PUBLIC void | setSubject (const std::string &subject)
| Set the conference subject.
LINPHONECXX_PUBLIC std::string | getUsername () const
| Get the conference username.
LINPHONECXX_PUBLIC void | setUsername (const std::string &username)
| Set the conference username.
LINPHONECXX_PUBLIC linphone::Status | addParticipant (const std::shared_ptr< linphone::Call > &call)
| Join an existing call to the conference.
LINPHONECXX_PUBLIC linphone::Status | addParticipant (const std::shared_ptr< const linphone::Address > &uri)
| Join a participant to the conference.
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.
LINPHONECXX_PUBLIC linphone::Status | addParticipants (const std::list< std::shared_ptr< linphone::Address > > &addresses)
| Add participants to the conference, by supplying a list of Address.
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.
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Participant > | findParticipant (const std::shared_ptr< const linphone::Address > &uri)
| Find a participant from a conference.
LINPHONECXX_PUBLIC int | getParticipantDeviceVolume (const std::shared_ptr< linphone::ParticipantDevice > &device)
| Retrieves the volume of a specific participant.
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.
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 local participant of the conference.
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.
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 | setLocalParticipantStreamCapability (linphone::MediaDirection direction, linphone::StreamType type)
| Set stream capability on me device of a local conference.
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).
LINPHONECXX_PUBLIC int | startRecording (const std::string &path)
| Starts recording the conference.
LINPHONECXX_PUBLIC int | stopRecording ()
| Stops the conference recording.
LINPHONECXX_PUBLIC int | terminate ()
| Terminates conference.
LINPHONECXX_PUBLIC int | updateParams (const std::shared_ptr< const linphone::ConferenceParams > &params)
| Update parameters of the conference.

## 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

enum class linphone::Conference::State
| strong

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

## ◆ addListener()

LINPHONECXX_PUBLIC void linphone::Conference::addListener | ( | const std::shared_ptr< ConferenceListener > & | listener | ) |

Add an application listener to the Conference instance.

Parameters

  listener | the application listener

## ◆ 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

  uri | a Address that has to be added to the conference.

Warning
  This function guarantees that the local endpoint is added to the conference only if there is a call state StreamsRunning towards one of the addresses. It is highly recommended to call linphone_confererence_enter() to guarantee that the local endpoint is 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

  call | a Call that has to be added to the conference.

Warning
  This function guarantees that the local endpoint is added to the conference only if one of calls added is in state StreamsRunning. It is highly recommended to call linphone_confererence_enter() to guarantee that the local endpoint is added to the conference.

## ◆ addParticipants() [1/2]

LINPHONECXX_PUBLIC linphone::Status linphone::Conference::addParticipants | ( | const std::list< std::shared_ptr< linphone::Address > > & | addresses | ) |

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

Parameters

  addresses | A list of calls to add to the conference.

## ◆ addParticipants() [2/2]

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

  calls | A 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

  uri | SIP URI of the participant to search.

Returns
  a pointer to the participant found or nullptr.

## ◆ getActiveSpeakerParticipantDevice()

LINPHONECXX_PUBLIC std::shared_ptr< linphone::ParticipantDevice > linphone::Conference::getActiveSpeakerParticipantDevice | ( |  | ) | const

Get the currently active speaker participant device.

Returns
  the ParticipantDevice currently displayed as active speaker.

## ◆ getCall()

LINPHONECXX_PUBLIC std::shared_ptr< linphone::Call > linphone::Conference::getCall | ( |  | ) | const

Gets the call that is controlling a conference.

Returns
  the Call controlling the conference or nullptr if none or local conference

## ◆ 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 .

## ◆ getDuration()

LINPHONECXX_PUBLIC int linphone::Conference::getDuration | ( |  | ) | const

Get the conference duration.

Returns
  conference duration.

## ◆ 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 local participant 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

## ◆ getParticipantDeviceList()

LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::ParticipantDevice > > linphone::Conference::getParticipantDeviceList | ( |  | ) | const

Get list of all participant devices of a conference including me if it is in.

Returns
  The list of participant devices of the conference.

## ◆ getParticipantDeviceVolume()

LINPHONECXX_PUBLIC int linphone::Conference::getParticipantDeviceVolume | ( | const std::shared_ptr< linphone::ParticipantDevice > & | device | ) |

Retrieves the volume of a specific participant.

Parameters

  device | The Participant

Returns
  The volume of the participant expressed in dbm0.

## ◆ getParticipantList()

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

Get list of all participants of a conference.

Warning
  The returned list does not include me.

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 participants.

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

Warning
  The returned list does not include me.

Returns
  The list of the participants' address active in the conference.

Deprecated
  10/07/2020 Use getParticipantList() instead.

## ◆ getStartTime()

LINPHONECXX_PUBLIC time_t linphone::Conference::getStartTime | ( |  | ) | const

Get the conference start time.

Returns
  conference start time.

## ◆ getState()

LINPHONECXX_PUBLIC State linphone::Conference::getState | ( |  | ) | const

Get the current state of the conference.

Returns
  the State of the conference.

## ◆ getSubject()

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

Get the conference subject.

Returns
  conference subject.

## ◆ getUsername()

LINPHONECXX_PUBLIC std::string linphone::Conference::getUsername | ( |  | ) | const

Get the conference username.

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

  params | CallParams 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 local participant of the conference.

Parameters

  uri | A Address object

Returns
  true if the participant is me, false otherwise.

## ◆ isRecording()

LINPHONECXX_PUBLIC bool linphone::Conference::isRecording | ( |  | ) | const

Gets whether the conference is currently being recorded.

Returns
  true if conference is being recorded, 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

## ◆ removeListener()

LINPHONECXX_PUBLIC void linphone::Conference::removeListener | ( | const std::shared_ptr< ConferenceListener > & | listener | ) |

Remove a previously added listener from the Conference instance.

Parameters

  listener | the application listener

## ◆ removeParticipant() [1/3]

LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED linphone::Status linphone::Conference::removeParticipant | ( | const std::shared_ptr< const linphone::Address > & | uri | ) |

Parameters

  uri | URI 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

  call | call 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

  participant | participant 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

  address | the 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

  conferenceId | the 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

  audioDevice | The AudioDevice. nullptr does nothing.

## ◆ setLocalParticipantStreamCapability()

LINPHONECXX_PUBLIC void linphone::Conference::setLocalParticipantStreamCapability | ( | linphone::MediaDirection | direction,
|  | linphone::StreamType | type )

Set stream capability on me device of a local conference.

Parameters

  direction | the direction of stream of type stream_type

## ◆ 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

  audioDevice | The 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

  isAdmin | A 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

  subject | conference subject

## ◆ setUsername()

LINPHONECXX_PUBLIC void linphone::Conference::setUsername | ( | const std::string & | username | ) |

Set the conference username.

Parameters

  username | conference subject

## ◆ startRecording()

LINPHONECXX_PUBLIC int linphone::Conference::startRecording | ( | const std::string & | path | ) |

Starts recording the conference.

Parameters

  path | Where to record the conference

Returns
  0 if succeeded. Negative number in case of failure.

## ◆ stopRecording()

LINPHONECXX_PUBLIC int linphone::Conference::stopRecording | ( |  | ) |

Stops the conference recording.

Returns
  0 if succeeded. Negative number in case of failure.

## ◆ 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

  params | the new parameters to apply.

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

- conference.hh