Package org.linphone.core

# Interface Conference

public interface Conference
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(org.linphone.core.ConferenceParams)` 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. To find a
conference among those a core is part of, you can call `Core.searchConference(org.linphone.core.ConferenceParams, org.linphone.core.Address, org.linphone.core.Address, org.linphone.core.Address[])`
.
A `Conference` may be created automatically and implicitely when an
outgoing call is made to a conference server. Thanks to the standard 'isfocus'
contact parameter, the call is identified as belonging to a conference. The
conference object can then be retrieved with `Call.getConference()`.

## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
`static enum`
`Conference.JoiningMode`
`static enum`
`Conference.Layout`
`static enum`
`Conference.ParticipantListType`
`static enum`
`Conference.SecurityLevel`
`static enum`
`Conference.State`

## Method Summary

Modifier and Type
Method
Description
`void`
`addListener(ConferenceListener listener)`
`int`
`addParticipant(Address uri)`
Join a participant to the conference.
`int`
`addParticipant(Call call)`
Join an existing call to the conference.
`int`
`addParticipants(Address[] addresses)`
Add participants to the conference, by supplying a list of `Address`.
`int`
`addParticipants(Call[] calls)`
Add participants to the conference, by supplying a list of `Call`.
`int`
`close()`
Terminates a conference.
`int`
`enter()`
For a local conference, the local participant joins the conference For a client
conference, the participant rejoins the conference after leaving it earlier on.
`Participant`
`findParticipant(Address uri)`
Find a participant from a conference.
`Account`
`getAccount()`
Gets the `Account` object associated with the conference.
`ParticipantDevice`
`getActiveSpeakerParticipantDevice()`
Get the currently active speaker participant device.
`Call`
`getCall()`
Gets the call that is controlling a conference.
`ChatRoom`
`getChatRoom()`
Returns the `ChatRoom` linked to the `Conference`.
`Address`
`getConferenceAddress()`
Get the conference address of the conference.
`Core`
`getCore()`
Returns core for a `Conference`.
`ConferenceParams`
`getCurrentParams()`
Get current parameters of the conference.
`int`
`getDuration()`
Get the conference duration.
`String`
`getIdentifier()`
Returns the conference identifier.
`ConferenceInfo`
`getInfo()`
Gets the `ConferenceInfo` object associated with a conference.
`AudioDevice`
`getInputAudioDevice()`
Gets the current input device for this conference.
`float`
`getInputVolume()`
Retrieves the volume of a specific participant.
`Participant`
`getMe()`
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.
`boolean`
`getMicrophoneMuted()`
Retrieves the volume of a specific participant.
`long`
`getNativePointer()`
Gets the native pointer used by this class to make native method calls.
`AudioDevice`
`getOutputAudioDevice()`
Gets the current output device for this conference.
`int`
`getParticipantCount()`
Get number of participants without me.
`ParticipantDevice[]`
`getParticipantDeviceList()`
Get list of all participant devices of a conference including me if it is in.
`int`
`getParticipantDeviceVolume(ParticipantDevice device)`
Retrieves the volume of a specific participant.
`Participant[]`
`getParticipantList()`
Get list of all participants of a conference.
`Address[]`
`getParticipants()`
Deprecated.
`Player`
`getPlayer()`
Gets a player associated with the conference to play a local file and stream it
to the remote peers.
`Participant`
`getScreenSharingParticipant()`
Get the participant that is currently screen sharing.
`ParticipantDevice`
`getScreenSharingParticipantDevice()`
Get the participant device that is currently screen sharing.
`long`
`getStartTime()`
Get the conference start time.
`Conference.State`
`getState()`
Get the current state of the conference.
`String`
`getSubject()`
Get the conference subject.
`String`
`getSubjectUtf8()`
Get the conference subject as an UTF-8 string.
`Object`
`getUserData()`
Gets the object stored in this object user's data
`String`
`getUsername()`
Get the conference username.
`int`
`inviteParticipants(Address[] addresses, 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 This method will call every address supplied and
add it to a conference on devices hosting a conference.
`boolean`
`isIn()`
For a local conference, it returns whether the local participant is enabled For
a client conference, it return whether the remote participant has left the
conference without bein removed from it.
`boolean`
`isMe(Address uri)`
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.
`boolean`
`isRecording()`
Gets whether the conference is currently being recorded.
`int`
`leave()`
For a local conference, the local participant leaves the conference For a
client conference, the participant leaves the conference after joining it
earlier on.
`int`
`nominateAdminAndLeave(Address newAdmin)`
Nominates a new admin and then leaves a conference.
`void`
`removeListener(ConferenceListener listener)`
`int`
`removeParticipant(Address uri)`
Deprecated.
`int`
`removeParticipant(Call call)`
Deprecated.
`int`
`removeParticipant(Participant participant)`
`void`
`setConferenceAddress(Address address)`
Set the conference address.
`void`
`setInputAudioDevice(AudioDevice audioDevice)`
Sets the given `AudioDevice` as input for this conference only.
`void`
`setLocalParticipantStreamCapability(MediaDirection direction, StreamType streamType)`
Set stream capability on 'me' device of a local conference.
`void`
`setMicrophoneMuted(boolean muted)`
Get microphone muted state.
`void`
`setOutputAudioDevice(AudioDevice audioDevice)`
Sets the given `AudioDevice` as output for this conference only.
`void`
`setParticipantAdminStatus(Participant participant, boolean isAdmin)`
Change the admin status of a participant of a conference (you need to be an
admin yourself to do this).
`void`
`setSubject(String subject)`
Set the conference subject.
`void`
`setSubjectUtf8(String subject)`
Set the conference subject as an UTF-8 string.
`void`
`setUserData(Object data)`
Sets the object to store in this object user's data
`void`
`setUsername(String username)`
Set the conference username.
`int`
`startRecording(String path)`
Starts recording the conference.
`String`
`stateToString(Conference.State state)`
A function to convert a `Conference.State` into a string.
`int`
`stopRecording()`
Stops the conference recording.
`int`
`terminate()`
Terminates a conference.
`String`
`toString()`
`int`
`updateParams(ConferenceParams params)`
Update parameters of the conference.

## Method Details

### getAccount

@Nullable Account getAccount()
Gets the `Account` object associated with the conference.

Returns:
  A `Account` object.

### getActiveSpeakerParticipantDevice

@Nullable ParticipantDevice getActiveSpeakerParticipantDevice()
Get the currently active speaker participant device.

Returns:
  the `ParticipantDevice` currently displayed as active speaker.

### getCall

@Nullable Call getCall()
Gets the call that is controlling a conference.
-for the local conference, it will return null
-for the client conference, it will return call associated to the conference

Returns:
  the `Call` controlling the conference or null if none or local
  conference

### getChatRoom

@Nullable ChatRoom getChatRoom()
Returns the `ChatRoom` linked to the `Conference`.

Returns:
  back pointer to `ChatRoom` object.

### getConferenceAddress

@Nullable Address getConferenceAddress()
Get the conference address of the conference.
This function may be return a null pointer if called before the conference
switches to the Created state

Returns:
  The conference address of the conference.

### setConferenceAddress

void setConferenceAddress(@Nullable Address address)
Set the conference address.

Parameters:
  `address` - the conference address to set.
  warning: This is only allowed for a client conference if it is in state
  CreationPending or Instantiated

### getCore

@NonNull Core getCore()
Returns core for a `Conference`.

Returns:
  back pointer to `Core` object.

### getCurrentParams

@NonNull ConferenceParams getCurrentParams()
Get current parameters of the conference.

Returns:
  a `ConferenceParams` .

### getDuration

@Nullable int getDuration()
Get the conference duration.

Returns:
  conference duration.

### getIdentifier

@Nullable String getIdentifier()
Returns the conference identifier.
warning: This method returns a null pointer if the Conference is in the
Instantiated state

Returns:
  the conference identifier.

### getInfo

@Nullable ConferenceInfo getInfo()
Gets the `ConferenceInfo` object associated with a conference.

Returns:
  A `ConferenceInfo` object.

### getInputAudioDevice

@Nullable AudioDevice getInputAudioDevice()
Gets the current input device for this conference.

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

### setInputAudioDevice

void setInputAudioDevice(@Nullable AudioDevice audioDevice)
Sets the given `AudioDevice` as input for this conference only.

Parameters:
  `audioDevice` - The `AudioDevice`. null does nothing.

### getInputVolume

float getInputVolume()
Retrieves the volume of a specific participant.

Returns:
  The volume of the participant expressed in dbm0.

### isIn

boolean isIn()
For a local conference, it returns whether the local participant is enabled For
a client 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.

### isRecording

boolean isRecording()
Gets whether the conference is currently being recorded.

Returns:
  true if conference is being recorded, false otherwise.

### getMe

@NonNull Participant getMe()
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` .

### getMicrophoneMuted

boolean getMicrophoneMuted()
Retrieves the volume of a specific participant.

Returns:
  true if the microphone is muted, false otherwise

### setMicrophoneMuted

void setMicrophoneMuted(boolean muted)
Get microphone muted state.
Note that the microphone may be disabled globally if false was given to `Core#enableMic`
.

Parameters:
  `muted` - The microphone muted state

### getOutputAudioDevice

@Nullable AudioDevice getOutputAudioDevice()
Gets the current output device for this conference.

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

### setOutputAudioDevice

void setOutputAudioDevice(@Nullable AudioDevice audioDevice)
Sets the given `AudioDevice` as output for this conference only.

Parameters:
  `audioDevice` - The `AudioDevice`. null does nothing.

### getParticipantCount

int getParticipantCount()
Get number of participants without me.

Returns:
  the number of participants excluding me in a `Conference`

### getParticipantDeviceList

@NonNull ParticipantDevice[] getParticipantDeviceList()
Get list of all participant devices of a conference including me if it is in.

Returns:
  The list of participant devices of the conference. A list of `ParticipantDevice`
  objects.

### getParticipantList

@NonNull Participant[] getParticipantList()
Get list of all participants of a conference.
warning: The returned list does not include me.

Returns:
  The list of participants of the conference. A list of `Participant`
  objects.

### getParticipants

@Deprecated @NonNull Address[] getParticipants()
Deprecated.
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. A list
  of `Address` objects.
  deprecated: 10/07/2020 Use `getParticipantList()` instead.

### getPlayer

@Nullable Player getPlayer()
Gets a player associated with the conference to play a local file and stream it
to the remote peers.

Returns:
  A `Player` object.

### getScreenSharingParticipant

@Nullable Participant getScreenSharingParticipant()
Get the participant that is currently screen sharing.

Returns:
  a pointer to the participant found or nullptr.

### getScreenSharingParticipantDevice

@Nullable ParticipantDevice getScreenSharingParticipantDevice()
Get the participant device that is currently screen sharing.

Returns:
  a pointer to the participant device found or nullptr.

### getStartTime

@Nullable long getStartTime()
Get the conference start time.

Returns:
  conference start time.

### getState

Conference.State getState()
Get the current state of the conference.

Returns:
  the `Conference.State` of the conference.

### getSubject

@Nullable String getSubject()
Get the conference subject.

Returns:
  conference subject.

### setSubject

void setSubject(@Nullable String subject)
Set the conference subject.

Parameters:
  `subject` - conference subject

### getSubjectUtf8

@Nullable String getSubjectUtf8()
Get the conference subject as an UTF-8 string.

Returns:
  conference subject.

### setSubjectUtf8

void setSubjectUtf8(@Nullable String subject)
Set the conference subject as an UTF-8 string.

Parameters:
  `subject` - conference subject

### getUsername

@Nullable String getUsername()
Get the conference username.

Returns:
  conference subject.

### setUsername

void setUsername(@Nullable String username)
Set the conference username.

Parameters:
  `username` - conference subject

### addParticipant

int addParticipant(@NonNull 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.

### addParticipant

int addParticipant(@NonNull 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.

### addParticipants

int addParticipants(@NonNull 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. A list of `Call`
  objects.

### addParticipants

int addParticipants(@NonNull Address[] addresses)
Add participants to the conference, by supplying a list of `Address`.

Parameters:
  `addresses` - A list of calls to add to the conference. A list of `Address`
  objects.

### close

int close()
Terminates a conference.
If no media is supported, it instructs the conference server to remove all
participants

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

### enter

int enter()
For a local conference, the local participant joins the conference For a client
conference, the participant rejoins the conference after leaving it earlier on.

Returns:
  0 if succeeded. Negative number if failed

### findParticipant

@Nullable Participant findParticipant(@NonNull 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.

### getParticipantDeviceVolume

int getParticipantDeviceVolume(@NonNull ParticipantDevice device)
Retrieves the volume of a specific participant.

Parameters:
  `device` - The Participant
Returns:
  The volume of the participant expressed in dbm0.

### inviteParticipants

int inviteParticipants(@NonNull Address[] addresses, @Nullable 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 This method will call every address supplied and
add it to a conference on devices hosting a conference.
On the other hand, if the conference is created on a server, this method will
allow to create either a chat only conference or an ad-hoc audio video
conference

Parameters:
  `addresses` - A list of SIP addresses to invite. A list of `Address`
  objects.
  `params` - `CallParams` to use for inviting the participants.
  warning: The `CallParams` are only honored by conference servers and
  devices that host the conference locally.

### isMe

boolean isMe(@NonNull Address uri)
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.

### leave

int leave()
For a local conference, the local participant leaves the conference For a
client conference, the participant leaves the conference after joining it
earlier on.

Returns:
  0 if succeeded. Negative number if failed

### nominateAdminAndLeave

int nominateAdminAndLeave(@NonNull Address newAdmin)
Nominates a new admin and then leaves a conference.

Parameters:
  `newAdmin` - The `Address` of the new admin
Returns:
  0 if succeeded. Negative number if failed
  note: The local participant will not leave the chat room if the new admin
  cannot be nominated
  warning: It is not applicable to conference servers.

### removeParticipant

@Deprecated int removeParticipant(@NonNull Address uri)
Deprecated.

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(org.linphone.core.Address)` instead.

### removeParticipant

int removeParticipant(@NonNull Participant participant)

Parameters:
  `participant` - participant to remove
  warning: The passed participant must be one of those returned by `getParticipantList()`
  warning: 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

### removeParticipant

@Deprecated int removeParticipant(@NonNull Call call)
Deprecated.

Parameters:
  `call` - call to remove
Returns:
  0 if succeeded, -1 if failed
  deprecated: 10/07/2020 Use `removeParticipant(org.linphone.core.Address)` instead.

### setLocalParticipantStreamCapability

void setLocalParticipantStreamCapability(MediaDirection direction, StreamType streamType)
Set stream capability on 'me' device of a local conference.

Parameters:
  `direction` - the direction of stream of type stream_type
  `streamType` - A `StreamType`

### setParticipantAdminStatus

void setParticipantAdminStatus(@NonNull Participant participant, boolean isAdmin)
Change the admin status of a participant of a conference (you need to be an
admin yourself to do this).

Parameters:
  `participant` - The Participant for which to change the admin status
  `isAdmin` - A boolean value telling whether the participant should now be an
  admin or not

### startRecording

int startRecording(@NonNull String path)
Starts recording the conference.

Parameters:
  `path` - Where to record the conference
Returns:
  0 if succeeded. Negative number in case of failure.

### stopRecording

int stopRecording()
Stops the conference recording.

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

### terminate

int terminate()
Terminates a conference.

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

### updateParams

int updateParams(@NonNull 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.

### stateToString

String stateToString(Conference.State state)
A function to convert a `Conference.State` into a string.

### addListener

void addListener(ConferenceListener listener)

### removeListener

void removeListener(ConferenceListener listener)

### setUserData

void setUserData(Object data)
Sets the object to store in this object user's data

Parameters:
  `data` - the object to store

### getUserData

Object getUserData()
Gets the object stored in this object user's data

Returns:
  the object store if any, null otherwise

### getNativePointer

long getNativePointer()
Gets the native pointer used by this class to make native method calls.

Returns:
  the nativer pointer, as long

### toString

String toString()

Overrides:
  `toString` in class `Object`