Liblinphone: linphone::ParticipantDevice Class Reference

Liblinphone 5.3.0

Public Types | Public Member Functions | List of all members
linphone::ParticipantDevice Class Reference

This object represents a unique device for a member of a Conference or ChatRoom. More...

`#include <participant_device.hh>`

Inheritance diagram for linphone::ParticipantDevice:

## Public Types
enum class | JoiningMethod { DialedIn = 0 , DialedOut = 1 , FocusOwner = 2 }
| JoiningMethod is used to indicate how a participant joined a conference or if it is the focus. More...
enum class | DisconnectionMethod { Booted = 0 , Departed = 1 , Busy = 2 , Failed = 3 }
| DisconnectionMethod is used to indicate how a participant left a conference. More...
enum class | State { Joining = 0 , Present = 1 , Leaving = 2 , Left = 3 , ScheduledForJoining = 4 , ScheduledForLeaving = 5 , OnHold = 6 , Alerting = 7 , MutedByFocus = 8 }
| State is used to list all states a participant device can be in More...

## Public Member Functions
LINPHONECXX_PUBLIC | ParticipantDevice (void *ptr, bool takeRef=true)
LINPHONECXX_PUBLIC _LinphoneParticipantDevice * | cPtr ()
LINPHONECXX_PUBLIC void | addListener (const std::shared_ptr< ParticipantDeviceListener > &listener)
| Add an application listener to the ParticipantDevice instance.
LINPHONECXX_PUBLIC void | removeListener (const std::shared_ptr< ParticipantDeviceListener > &listener)
| Remove a previously added listener from the ParticipantDevice instance.
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getAddress () const
| Get the address of a participant's device.
LINPHONECXX_PUBLIC DisconnectionMethod | getDisconnectionMethod () const
| Get the disconnection method.
LINPHONECXX_PUBLIC std::string | getDisconnectionReason () const
| Get the disconnection reason.
LINPHONECXX_PUBLIC bool | isInConference () const
| Return whether the participant device is in a conference or not.
LINPHONECXX_PUBLIC bool | getIsMuted () const
| Return whether the participant device is muted or not.
LINPHONECXX_PUBLIC bool | getIsSpeaking () const
| Return whether the participant device is speaking or not.
LINPHONECXX_PUBLIC JoiningMethod | getJoiningMethod () const
| Get the joining method or it the device is the focus owner.
LINPHONECXX_PUBLIC std::string | getName () const
| Return the name of the device or nullptr.
LINPHONECXX_PUBLIC void * | getNativeVideoWindowId () const
| Get window ID.
LINPHONECXX_PUBLIC void | setNativeVideoWindowId (void *windowId)
| Set window ID for a device.
LINPHONECXX_PUBLIC linphone::ChatRoom::SecurityLevel | getSecurityLevel () const
| Get the security level of a participant's device.
LINPHONECXX_PUBLIC State | getState () const
| Get the state of a participant device.
LINPHONECXX_PUBLIC time_t | getTimeOfDisconnection () const
| Get the timestamp the device left a conference.
LINPHONECXX_PUBLIC time_t | getTimeOfJoining () const
| Get the timestamp the device joined a conference.
LINPHONECXX_PUBLIC void * | createNativeVideoWindowId () const
| Create a window ID and return it.
LINPHONECXX_PUBLIC uint32_t | getSsrc (linphone::StreamType streamType) const
| Get the audio stream SSRC of the device.
LINPHONECXX_PUBLIC bool | getStreamAvailability (linphone::StreamType streamType) const
| Get the stream availability of the device.
LINPHONECXX_PUBLIC linphone::MediaDirection | getStreamCapability (linphone::StreamType streamType) const
| Get the stream capability of the device.

## Detailed Description

This object represents a unique device for a member of a Conference or ChatRoom.

Devices are identified by the gruu parameter inside the Address which can be obtained by getAddress(). It is specially usefull to know the security level of each device inside an end-to-end encrypted ChatRoom. You can get a list of all ParticipantDevice using Participant::getDevices().

## Member Enumeration Documentation

## ◆ DisconnectionMethod

enum class linphone::ParticipantDevice::DisconnectionMethod
| strong

DisconnectionMethod is used to indicate how a participant left a conference.

Enumerator
Booted | an admin removes the device from a conference
Departed | the device disconnects from the conference
Busy | device is busy
Failed | an error occurred while the device is leaving the conference or he declined a call from the server

## ◆ JoiningMethod

enum class linphone::ParticipantDevice::JoiningMethod
| strong

JoiningMethod is used to indicate how a participant joined a conference or if it is the focus.

Enumerator
DialedIn | device called the conference
DialedOut | device is called the conference
FocusOwner | device is the focus

## ◆ State

enum class linphone::ParticipantDevice::State
| strong

State is used to list all states a participant device can be in

Enumerator
Joining | an INVITE has been sent
Present | the SIP session has been concluded, participant is part of the conference
Leaving | A BYE is pending.
Left | The Session is terminated.
ScheduledForJoining | Initial state for the server group chatroom, when the participant has not yet been INVITEd.
ScheduledForLeaving | Transitional state for a participant that will receive a BYE shortly.
OnHold | the SIP session has been concluded, participant is not media mixed
Alerting | 180 Ringing
MutedByFocus | Some medias have been muted by the focus.

## Member Function Documentation

## ◆ addListener()

LINPHONECXX_PUBLIC void linphone::ParticipantDevice::addListener | ( | const std::shared_ptr< ParticipantDeviceListener > & | listener | ) |

Add an application listener to the ParticipantDevice instance.

Parameters

  listener | the application listener

## ◆ createNativeVideoWindowId()

LINPHONECXX_PUBLIC void * linphone::ParticipantDevice::createNativeVideoWindowId | ( |  | ) | const

Create a window ID and return it.

Returns
  the window ID of the device

## ◆ getAddress()

LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > linphone::ParticipantDevice::getAddress | ( |  | ) | const

Get the address of a participant's device.

Returns
  The Address of the participant's device

## ◆ getDisconnectionMethod()

LINPHONECXX_PUBLIC DisconnectionMethod linphone::ParticipantDevice::getDisconnectionMethod | ( |  | ) | const

Get the disconnection method.

Returns
  disconnection method DisconnectionMethod

## ◆ getDisconnectionReason()

LINPHONECXX_PUBLIC std::string linphone::ParticipantDevice::getDisconnectionReason | ( |  | ) | const

Get the disconnection reason.

Returns
  disconnection reason

## ◆ getIsMuted()

LINPHONECXX_PUBLIC bool linphone::ParticipantDevice::getIsMuted | ( |  | ) | const

Return whether the participant device is muted or not.

Returns
  true if the participant device is muted, false otherwise.

## ◆ getIsSpeaking()

LINPHONECXX_PUBLIC bool linphone::ParticipantDevice::getIsSpeaking | ( |  | ) | const

Return whether the participant device is speaking or not.

Returns
  true if the participant device is speaking, false otherwise.

## ◆ getJoiningMethod()

LINPHONECXX_PUBLIC JoiningMethod linphone::ParticipantDevice::getJoiningMethod | ( |  | ) | const

Get the joining method or it the device is the focus owner.

Returns
  joining method or focus owner JoiningMethod

## ◆ getName()

LINPHONECXX_PUBLIC std::string linphone::ParticipantDevice::getName | ( |  | ) | const

Return the name of the device or nullptr.

Returns
  the name of the device or nullptr.

## ◆ getNativeVideoWindowId()

LINPHONECXX_PUBLIC void * linphone::ParticipantDevice::getNativeVideoWindowId | ( |  | ) | const

Get window ID.

Returns
  the window ID of the device

## ◆ getSecurityLevel()

LINPHONECXX_PUBLIC linphone::ChatRoom::SecurityLevel linphone::ParticipantDevice::getSecurityLevel | ( |  | ) | const

Get the security level of a participant's device.

Returns
  The ChatRoom::SecurityLevel of the device

## ◆ getSsrc()

LINPHONECXX_PUBLIC uint32_t linphone::ParticipantDevice::getSsrc | ( | linphone::StreamType | streamType | ) | const

Get the audio stream SSRC of the device.

Parameters

  streamType | A StreamType

Returns
  the audio stream SSRC of the device

## ◆ getState()

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

Get the state of a participant device.

Returns
  The State of the device

## ◆ getStreamAvailability()

LINPHONECXX_PUBLIC bool linphone::ParticipantDevice::getStreamAvailability | ( | linphone::StreamType | streamType | ) | const

Get the stream availability of the device.

The availability information represents whether a given stream type is currently available to be presented in the conference for a ParticipantDevice

Parameters

  streamType | A StreamType

Returns
  true if the stream of type stream_type is available for device, false otherwise

## ◆ getStreamCapability()

LINPHONECXX_PUBLIC linphone::MediaDirection linphone::ParticipantDevice::getStreamCapability | ( | linphone::StreamType | streamType | ) | const

Get the stream capability of the device.

The capability information represents the capability for the ParticipantDevice to handle a given stream type (audio, video or text).

Parameters

  streamType | A StreamType

Returns
  the capability of stream of type stream_type of the device MediaDirection

## ◆ getTimeOfDisconnection()

LINPHONECXX_PUBLIC time_t linphone::ParticipantDevice::getTimeOfDisconnection | ( |  | ) | const

Get the timestamp the device left a conference.

Returns
  time of disconnection a conference as returned by time(nullptr). For UNIX based systems it is the number of seconds since 00:00hours of the 1st of January 1970

## ◆ getTimeOfJoining()

LINPHONECXX_PUBLIC time_t linphone::ParticipantDevice::getTimeOfJoining | ( |  | ) | const

Get the timestamp the device joined a conference.

Returns
  time of joining a conference as returned by time(nullptr). For UNIX based systems it is the number of seconds since 00:00hours of the 1st of January 1970

## ◆ isInConference()

LINPHONECXX_PUBLIC bool linphone::ParticipantDevice::isInConference | ( |  | ) | const

Return whether the participant device is in a conference or not.

Returns
  a boolean to state whether the device is in a conference

## ◆ removeListener()

LINPHONECXX_PUBLIC void linphone::ParticipantDevice::removeListener | ( | const std::shared_ptr< ParticipantDeviceListener > & | listener | ) |

Remove a previously added listener from the ParticipantDevice instance.

Parameters

  listener | the application listener

## ◆ setNativeVideoWindowId()

LINPHONECXX_PUBLIC void linphone::ParticipantDevice::setNativeVideoWindowId | ( | void * | windowId | ) |

Set window ID for a device.

Parameters

  windowId | the window ID of the device

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

- participant_device.hh