Package org.linphone.core

# Interface ParticipantDevice

public interface ParticipantDevice
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()`
.

## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
`static enum`
`ParticipantDevice.DisconnectionMethod`
`static enum`
`ParticipantDevice.JoiningMethod`
`static enum`
`ParticipantDevice.State`

## Method Summary

Modifier and Type
Method
Description
`void`
`addListener(ParticipantDeviceListener listener)`
`Object`
`createNativeVideoWindowId()`
Creates a window ID and return it.
`Object`
`createNativeVideoWindowId(Object context)`
Creates a window ID and return it.
`Address`
`getAddress()`
Gets the address of a participant's device.
`ParticipantDevice.DisconnectionMethod`
`getDisconnectionMethod()`
Gets the disconnection method.
`String`
`getDisconnectionReason()`
Gets the disconnection reason.
`boolean`
`getIsMuted()`
Returns whether the participant device is muted or not.
`boolean`
`getIsSpeaking()`
Returns whether the participant device is speaking or not.
`ParticipantDevice.JoiningMethod`
`getJoiningMethod()`
Gets the joining method or it the device is the focus owner.
`String`
`getName()`
Returns the name of the device.
`long`
`getNativePointer()`
Gets the native pointer used by this class to make native method calls.
`Object`
`getNativeVideoWindowId()`
Gets the native window ID where video for this participant device is to be
rendered.
`Participant`
`getParticipant()`
Returns the `Participant` this `ParticipantDevice` belongs to.
`ChatRoom.SecurityLevel`
`getSecurityLevel()`
Gets the security level of a participant's device.
`int`
`getSsrc(StreamType streamType)`
Get the audio stream SSRC of the device.
`ParticipantDevice.State`
`getState()`
Gets the state of a participant device.
`boolean`
`getStreamAvailability(StreamType streamType)`
Gets the stream availability of the device.
`MediaDirection`
`getStreamCapability(StreamType streamType)`
Gets the stream capability of the device.
`String`
`getStreamLabel(StreamType streamType)`
Gets the stream label of the device.
`int`
`getThumbnailSsrc()`
Get the thumbnail stream SSRC of the device.
`boolean`
`getThumbnailStreamAvailability()`
Gets the thumbnail stream availability of the device.
`MediaDirection`
`getThumbnailStreamCapability()`
Gets the thumbnail stream capability of the device.
`String`
`getThumbnailStreamLabel()`
Gets the thumbnail stream label of the device.
`long`
`getTimeOfDisconnection()`
Gets the timestamp the device left a conference.
`long`
`getTimeOfJoining()`
Gets the timestamp the device joined a conference.
`Object`
`getUserData()`
Gets the object stored in this object user's data
`boolean`
`isInConference()`
Returns whether the participant device is in a conference or not.
`boolean`
`isScreenSharingEnabled()`
Returns whether the participant device is screen sharing or not.
`void`
`removeListener(ParticipantDeviceListener listener)`
`void`
`setNativeVideoWindowId(Object windowId)`
Sets the the native window ID where video for this participant device is to be
rendered.
`void`
`setUserData(Object data)`
Sets the object to store in this object user's data
`String`
`toString()`

## Method Details

### getAddress

Address getAddress()
Gets the address of a participant's device.

Returns:
  The `Address` of the participant's device

### getDisconnectionMethod

ParticipantDevice.DisconnectionMethod getDisconnectionMethod()
Gets the disconnection method.

Returns:
  disconnection method `ParticipantDevice.DisconnectionMethod`

### getDisconnectionReason

String getDisconnectionReason()
Gets the disconnection reason.

Returns:
  disconnection reason

### isInConference

boolean isInConference()
Returns whether the participant device is in a conference or not.

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

### getIsMuted

boolean getIsMuted()
Returns whether the participant device is muted or not.

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

### getIsSpeaking

boolean getIsSpeaking()
Returns whether the participant device is speaking or not.

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

### getJoiningMethod

ParticipantDevice.JoiningMethod getJoiningMethod()
Gets the joining method or it the device is the focus owner.

Returns:
  joining method or focus owner `ParticipantDevice.JoiningMethod`

### getName

String getName()
Returns the name of the device.

Returns:
  the name of the device or null.

### getNativeVideoWindowId

Object getNativeVideoWindowId()
Gets the native window ID where video for this participant device is to be
rendered.

Returns:
  the window ID of the device

### setNativeVideoWindowId

void setNativeVideoWindowId(Object windowId)
Sets the the native window ID where video for this participant device is to be
rendered.

Parameters:
  `windowId` - the window ID of the device

### getParticipant

Participant getParticipant()
Returns the `Participant` this `ParticipantDevice` belongs to.

Returns:
  the `Participant` this device belongs to

### isScreenSharingEnabled

boolean isScreenSharingEnabled()
Returns whether the participant device is screen sharing or not.

Returns:
  true if the participant device is screen sharing, false otherwise.

### getSecurityLevel

ChatRoom.SecurityLevel getSecurityLevel()
Gets the security level of a participant's device.

Returns:
  The
  invalid reference

      ChatRoom#SecurityLevel

  of the device

### getState

ParticipantDevice.State getState()
Gets the state of a participant device.

Returns:
  The `ParticipantDevice.State` of the device

### getThumbnailSsrc

int getThumbnailSsrc()
Get the thumbnail stream SSRC of the device.

Returns:
  the thumbnail stream's SSRC of the device

### getThumbnailStreamAvailability

boolean getThumbnailStreamAvailability()
Gets the thumbnail 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`

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

### getThumbnailStreamCapability

MediaDirection getThumbnailStreamCapability()
Gets the thumbnail stream capability of the device.

Returns:
  the capability of the thumbnail stream of the device `MediaDirection`

### getThumbnailStreamLabel

String getThumbnailStreamLabel()
Gets the thumbnail stream label of the device.

Returns:
  the label of the thumbnail stream of the device

### getTimeOfDisconnection

long getTimeOfDisconnection()
Gets 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:00:00 of the 1st of
  January 1970

### getTimeOfJoining

long getTimeOfJoining()
Gets the timestamp the device joined a conference.

Returns:
  time of joining a conference expressed as a number of seconds since
  00:00:00 of the 1st of January 1970

### createNativeVideoWindowId

Object createNativeVideoWindowId(Object context)
Creates a window ID and return it.
see: `Core.setNativeVideoWindowId(java.lang.Object)` for a general discussion about window
IDs.
A context can be used to prevent Linphone from allocating the container
(#MSOglContextInfo for MSOGL). null if not used.

Parameters:
  `context` - preallocated Window ID (Used only for MSOGL)
Returns:
  the native video window id (type may vary depending on platform).

### createNativeVideoWindowId

Object createNativeVideoWindowId()
Creates a window ID and return it.
see: `Core.setNativeVideoWindowId(java.lang.Object)` for a general discussion about window
IDs.

Returns:
  the native video window id (type may vary depending on platform).

### getSsrc

int getSsrc(StreamType streamType)
Get the audio stream SSRC of the device.

Parameters:
  `streamType` - A `StreamType`
Returns:
  the stream's SSRC of the device

### getStreamAvailability

boolean getStreamAvailability(StreamType streamType)
Gets 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

MediaDirection getStreamCapability(StreamType streamType)
Gets 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`

### getStreamLabel

String getStreamLabel(StreamType streamType)
Gets the stream label 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 label of stream of type stream_type of the device

### addListener

void addListener(ParticipantDeviceListener listener)

### removeListener

void removeListener(ParticipantDeviceListener 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`