WifiP2pWfdInfo
class WifiP2pWfdInfo : Parcelable
kotlin.Any | |
↳ | android.net.wifi.p2p.WifiP2pWfdInfo |
A class representing Wifi Display information for a device. See Wifi Display technical specification v1.0.0, section 5.1.2. See Wifi Display technical specification v2.0.0, section 5.1.12 for Wifi Display R2.
Summary
Constants | |
---|---|
static Int |
Bit field for |
static Int |
Bit field for |
static Int |
Bit field for |
static Int |
Bit field for |
static Int |
Bit field for |
static Int |
|
static Int |
Bit field for |
static Int |
Bit field for |
static Int |
Bit field for |
static Int |
Bit field for |
static Int |
Bit field for |
static Int |
Bit field for |
static Int |
The device is a primary sink. |
static Int |
The device is a secondary sink. |
static Int |
The device is dual-role capable i. |
static Int |
The device is a Wifi Display Source. |
static Int |
Wifi Display (WFD) preferred connectivity is Wifi Direct (P2P). |
static Int |
Wifi Display (WFD) preferred connectivity is TDLS. |
Inherited constants | |
---|---|
Public constructors | |
---|---|
Default constructor. |
|
WifiP2pWfdInfo(source: WifiP2pWfdInfo?) Copy constructor. |
Public methods | |
---|---|
Int |
Implement the Parcelable interface |
Int |
Returns the TCP port at which the WFD Device listens for RTSP messages. |
Int |
Return R1 raw device info, See Wifi Display technical specification v1. |
Int |
Get the type of the device. |
Int |
Returns the maximum average throughput capability of the WFD Device, in megabits/second. |
Int |
Return R2 raw device info, See Wifi Display technical specification v2. |
Int |
Get the type of the R2 device. |
Boolean | |
Boolean |
Returns true if Coupled Sink is supported by WFD Sink. |
Boolean |
Returns true if Coupled Sink is supported by WFD Source. |
Boolean |
Returns true is Wifi Display is enabled, false otherwise. |
Boolean |
Returns true is Wifi Display R2 is enabled, false otherwise. |
Boolean |
Returns true if a session is available, false otherwise. |
Unit |
setContentProtectionSupported(enabled: Boolean) Sets whether Content Protection using the HDCP system 2. |
Unit |
setControlPort(port: Int) Sets the TCP port at which the WFD Device listens for RTSP messages. |
Unit |
setCoupledSinkSupportAtSink(enabled: Boolean) Sets whether Coupled Sink feature is supported by WFD Sink. |
Unit |
setCoupledSinkSupportAtSource(enabled: Boolean) Sets whether Coupled Sink feature is supported by WFD Source. |
Boolean |
setDeviceType(deviceType: Int) Sets the type of the device. |
Unit |
setEnabled(enabled: Boolean) Sets whether Wifi Display should be enabled. |
Unit |
setMaxThroughput(maxThroughput: Int) Sets the maximum average throughput capability of the WFD Device, in megabits/second. |
Boolean |
setR2DeviceType(deviceType: Int) Sets the type of the Wifi Display R2 device. |
Unit |
setSessionAvailable(enabled: Boolean) Sets whether a session is available. |
String |
toString() |
Unit |
writeToParcel(dest: Parcel, flags: Int) Implement the Parcelable interface |
Properties | |
---|---|
static Parcelable.Creator<WifiP2pWfdInfo!> |
Implement the Parcelable interface |
Constants
DEVICE_INFO_AUDIO_ONLY_SUPPORT_AT_SOURCE
static val DEVICE_INFO_AUDIO_ONLY_SUPPORT_AT_SOURCE: Int
Bit field for getDeviceInfo()
, indicate audo is only supported at source. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.
Value: 2048
DEVICE_INFO_AUDIO_UNSUPPORTED_AT_PRIMARY_SINK
static val DEVICE_INFO_AUDIO_UNSUPPORTED_AT_PRIMARY_SINK: Int
Bit field for getDeviceInfo()
, indicate audio is not supported at primary sink. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.
Value: 1024
DEVICE_INFO_CONTENT_PROTECTION_SUPPORT
static val DEVICE_INFO_CONTENT_PROTECTION_SUPPORT: Int
Bit field for getDeviceInfo()
, indicate the support of Content Protection using the HDCP system 2.0/2.1. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.
Value: 256
DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SINK
static val DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SINK: Int
Bit field for getDeviceInfo()
, indicates that coupled sink is supporeted at sink. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.
Value: 8
DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SOURCE
static val DEVICE_INFO_COUPLED_SINK_SUPPORT_AT_SOURCE: Int
Bit field for getDeviceInfo()
, indicates that coupled sink is supported at source. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.
Value: 4
DEVICE_INFO_DEVICE_TYPE_MASK
static val DEVICE_INFO_DEVICE_TYPE_MASK: Int
getDeviceInfo()
& DEVICE_INFO_DEVICE_TYPE_MASK
is one of DEVICE_TYPE_WFD_SOURCE
, DEVICE_TYPE_PRIMARY_SINK
, DEVICE_TYPE_SECONDARY_SINK
or DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK
. The bit definition is listed in 5.1.2 WFD Device Information Subelement and 5.1.12 WFD R2 Device Information Subelement in Wifi Display Technical Specification.
Value: 3
DEVICE_INFO_PREFERRED_CONNECTIVITY_MASK
static val DEVICE_INFO_PREFERRED_CONNECTIVITY_MASK: Int
Bit field for getDeviceInfo()
, indicate the preferred connectifity for Wifi Display. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification. The value is one of PREFERRED_CONNECTIVITY_P2P
or PREFERRED_CONNECTIVITY_TDLS
.
Value: 128
DEVICE_INFO_SESSION_AVAILABLE_MASK
static val DEVICE_INFO_SESSION_AVAILABLE_MASK: Int
Bit field for getDeviceInfo()
, indicates that Wifi Display session is available. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.
Value: 48
DEVICE_INFO_TDLS_PERSISTENT_GROUP
static val DEVICE_INFO_TDLS_PERSISTENT_GROUP: Int
Bit field for getDeviceInfo()
, indicate that TDLS persistent group is intended. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.
Value: 4096
DEVICE_INFO_TDLS_PERSISTENT_GROUP_REINVOKE
static val DEVICE_INFO_TDLS_PERSISTENT_GROUP_REINVOKE: Int
Bit field for getDeviceInfo()
, indicate that the request is for re-invocation of TDLS persistent group. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.
Value: 8192
DEVICE_INFO_TIME_SYNCHRONIZATION_SUPPORT
static val DEVICE_INFO_TIME_SYNCHRONIZATION_SUPPORT: Int
Bit field for getDeviceInfo()
, indicate time synchronization using 802.1AS is supported. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.
Value: 512
DEVICE_INFO_WFD_SERVICE_DISCOVERY_SUPPORT
static val DEVICE_INFO_WFD_SERVICE_DISCOVERY_SUPPORT: Int
Bit field for getDeviceInfo()
, indicates that Wifi Display discovery is supported. The bit definition is listed in 5.1.2 WFD Device Information Subelement in Wifi Display Technical Specification.
Value: 64
DEVICE_TYPE_PRIMARY_SINK
static val DEVICE_TYPE_PRIMARY_SINK: Int
The device is a primary sink.
Value: 1
DEVICE_TYPE_SECONDARY_SINK
static val DEVICE_TYPE_SECONDARY_SINK: Int
The device is a secondary sink. This type is only supported by R1.
Value: 2
DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK
static val DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK: Int
The device is dual-role capable i.e. either a WFD source or a primary sink.
Value: 3
DEVICE_TYPE_WFD_SOURCE
static val DEVICE_TYPE_WFD_SOURCE: Int
The device is a Wifi Display Source.
Value: 0
PREFERRED_CONNECTIVITY_P2P
static val PREFERRED_CONNECTIVITY_P2P: Int
Wifi Display (WFD) preferred connectivity is Wifi Direct (P2P).
Value: 0
PREFERRED_CONNECTIVITY_TDLS
static val PREFERRED_CONNECTIVITY_TDLS: Int
Wifi Display (WFD) preferred connectivity is TDLS.
Value: 1
Public constructors
WifiP2pWfdInfo
WifiP2pWfdInfo(source: WifiP2pWfdInfo?)
Copy constructor.
Parameters | |
---|---|
source |
WifiP2pWfdInfo?: This value may be null . |
Public methods
describeContents
fun describeContents(): Int
Implement the Parcelable interface
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
getControlPort
fun getControlPort(): Int
Returns the TCP port at which the WFD Device listens for RTSP messages.
getDeviceInfo
fun getDeviceInfo(): Int
Return R1 raw device info, See Wifi Display technical specification v1.0.0, section 5.1.2. Access bit fields by DEVICE_INFO_* constants.
getDeviceType
fun getDeviceType(): Int
Get the type of the device. One of DEVICE_TYPE_WFD_SOURCE
, DEVICE_TYPE_PRIMARY_SINK
, DEVICE_TYPE_SECONDARY_SINK
, DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK
getMaxThroughput
fun getMaxThroughput(): Int
Returns the maximum average throughput capability of the WFD Device, in megabits/second.
getR2DeviceInfo
fun getR2DeviceInfo(): Int
Return R2 raw device info, See Wifi Display technical specification v2.0.0, section 5.1.12. Access bit fields by DEVICE_INFO_DEVICE_TYPE_MASK
.
Return | |
---|---|
Int |
Value is either 0 or android.net.wifi.p2p.WifiP2pWfdInfo#DEVICE_INFO_DEVICE_TYPE_MASK |
getR2DeviceType
fun getR2DeviceType(): Int
Get the type of the R2 device. One of DEVICE_TYPE_WFD_SOURCE
, DEVICE_TYPE_PRIMARY_SINK
, or DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK
isContentProtectionSupported
fun isContentProtectionSupported(): Boolean
Return | |
---|---|
Boolean |
true if Content Protection using the HDCP system 2.0/2.1 is supported. |
isCoupledSinkSupportedAtSink
fun isCoupledSinkSupportedAtSink(): Boolean
Returns true if Coupled Sink is supported by WFD Sink. See Wifi Display technical specification v1.0.0, section 4.9.
isCoupledSinkSupportedAtSource
fun isCoupledSinkSupportedAtSource(): Boolean
Returns true if Coupled Sink is supported by WFD Source. See Wifi Display technical specification v1.0.0, section 4.9.
isEnabled
fun isEnabled(): Boolean
Returns true is Wifi Display is enabled, false otherwise.
isR2Supported
fun isR2Supported(): Boolean
Returns true is Wifi Display R2 is enabled, false otherwise.
isSessionAvailable
fun isSessionAvailable(): Boolean
Returns true if a session is available, false otherwise.
setContentProtectionSupported
fun setContentProtectionSupported(enabled: Boolean): Unit
Sets whether Content Protection using the HDCP system 2.0/2.1 is supported.
Parameters | |
---|---|
enabled |
Boolean: true to indicate that Content Protection is supported, false otherwise. |
setControlPort
fun setControlPort(port: Int): Unit
Sets the TCP port at which the WFD Device listens for RTSP messages.
Parameters | |
---|---|
port |
Int: Value is 0 or greater |
setCoupledSinkSupportAtSink
fun setCoupledSinkSupportAtSink(enabled: Boolean): Unit
Sets whether Coupled Sink feature is supported by WFD Sink. See Wifi Display technical specification v1.0.0, section 4.9.
Parameters | |
---|---|
enabled |
Boolean: true to indicate support for coupled sink, false otherwise. |
setCoupledSinkSupportAtSource
fun setCoupledSinkSupportAtSource(enabled: Boolean): Unit
Sets whether Coupled Sink feature is supported by WFD Source. See Wifi Display technical specification v1.0.0, section 4.9.
Parameters | |
---|---|
enabled |
Boolean: true to indicate support for coupled sink, false otherwise. |
setDeviceType
fun setDeviceType(deviceType: Int): Boolean
Sets the type of the device.
Return | |
---|---|
Boolean |
true if the device type was successfully set, false otherwise |
setEnabled
fun setEnabled(enabled: Boolean): Unit
Sets whether Wifi Display should be enabled.
Parameters | |
---|---|
enabled |
Boolean: true to enable Wifi Display, false to disable |
setMaxThroughput
fun setMaxThroughput(maxThroughput: Int): Unit
Sets the maximum average throughput capability of the WFD Device, in megabits/second.
Parameters | |
---|---|
maxThroughput |
Int: Value is 0 or greater |
setR2DeviceType
fun setR2DeviceType(deviceType: Int): Boolean
Sets the type of the Wifi Display R2 device. See Wifi Display technical specification v2.0.0, section 5.1.12 for Wifi Display R2. Before calling this API, call WifiManager#isWifiDisplayR2Supported()
setSessionAvailable
fun setSessionAvailable(enabled: Boolean): Unit
Sets whether a session is available.
Parameters | |
---|---|
enabled |
Boolean: true to indicate that a session is available, false otherwise. |
toString
fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Implement the Parcelable interface
Parameters | |
---|---|
dest |
Parcel: This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |
Properties
CREATOR
static val CREATOR: Parcelable.Creator<WifiP2pWfdInfo!>
Implement the Parcelable interface