# Print output for @column tags ?>
public
final
class
WifiP2pWfdInfo
extends Object
implements
Parcelable
java.lang.Object | |
↳ | 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.
Constants | |
---|---|
int |
DEVICE_TYPE_PRIMARY_SINK
The device is a primary sink. |
int |
DEVICE_TYPE_SECONDARY_SINK
The device is a secondary sink. |
int |
DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK
The device is dual-role capable i.e. |
int |
DEVICE_TYPE_WFD_SOURCE
The device is a Wifi Display Source. |
Inherited constants |
---|
Fields | |
---|---|
public
static
final
Creator<WifiP2pWfdInfo> |
CREATOR
Implement the Parcelable interface |
Public constructors | |
---|---|
WifiP2pWfdInfo()
Default constructor. |
|
WifiP2pWfdInfo(WifiP2pWfdInfo source)
Copy constructor. |
Public methods | |
---|---|
int
|
describeContents()
Implement the Parcelable interface |
int
|
getControlPort()
Returns the TCP port at which the WFD Device listens for RTSP messages. |
int
|
getDeviceType()
Get the type of the device. |
int
|
getMaxThroughput()
Returns the maximum average throughput capability of the WFD Device, in megabits/second. |
boolean
|
isContentProtectionSupported()
|
boolean
|
isEnabled()
Returns true is Wifi Display is enabled, false otherwise. |
boolean
|
isSessionAvailable()
Returns true if a session is available, false otherwise. |
void
|
setContentProtectionSupported(boolean enabled)
Sets whether Content Protection using the HDCP system 2.0/2.1 is supported. |
void
|
setControlPort(int port)
Sets the TCP port at which the WFD Device listens for RTSP messages. |
boolean
|
setDeviceType(int deviceType)
Sets the type of the device. |
void
|
setEnabled(boolean enabled)
Sets whether Wifi Display should be enabled. |
void
|
setMaxThroughput(int maxThroughput)
Sets the maximum average throughput capability of the WFD Device, in megabits/second. |
void
|
setSessionAvailable(boolean enabled)
Sets whether a session is available. |
String
|
toString()
Returns a string representation of the object. |
void
|
writeToParcel(Parcel dest, int flags)
Implement the Parcelable interface |
Inherited methods | |
---|---|
public static final int DEVICE_TYPE_PRIMARY_SINK
The device is a primary sink.
Constant Value: 1 (0x00000001)
public static final int DEVICE_TYPE_SECONDARY_SINK
The device is a secondary sink.
Constant Value: 2 (0x00000002)
public static final int DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK
The device is dual-role capable i.e. either a WFD source or a primary sink.
Constant Value: 3 (0x00000003)
public static final int DEVICE_TYPE_WFD_SOURCE
The device is a Wifi Display Source.
Constant Value: 0 (0x00000000)
public WifiP2pWfdInfo ()
Default constructor.
public WifiP2pWfdInfo (WifiP2pWfdInfo source)
Copy constructor.
Parameters | |
---|---|
source |
WifiP2pWfdInfo : This value may be null . |
public int describeContents ()
Implement the Parcelable interface
Returns | |
---|---|
int |
a bitmask indicating the set of special object types marshaled
by this Parcelable object instance.
Value is either 0 or CONTENTS_FILE_DESCRIPTOR |
public int getControlPort ()
Returns the TCP port at which the WFD Device listens for RTSP messages.
Returns | |
---|---|
int |
public int getDeviceType ()
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
Returns | |
---|---|
int |
Value is DEVICE_TYPE_WFD_SOURCE , DEVICE_TYPE_PRIMARY_SINK , DEVICE_TYPE_SECONDARY_SINK , or DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK |
public int getMaxThroughput ()
Returns the maximum average throughput capability of the WFD Device, in megabits/second.
Returns | |
---|---|
int |
public boolean isContentProtectionSupported ()
Returns | |
---|---|
boolean |
true if Content Protection using the HDCP system 2.0/2.1 is supported. |
public boolean isEnabled ()
Returns true is Wifi Display is enabled, false otherwise.
Returns | |
---|---|
boolean |
public boolean isSessionAvailable ()
Returns true if a session is available, false otherwise.
Returns | |
---|---|
boolean |
public void setContentProtectionSupported (boolean enabled)
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. |
public void setControlPort (int port)
Sets the TCP port at which the WFD Device listens for RTSP messages.
Parameters | |
---|---|
port |
int : Value is 0 or greater |
public boolean setDeviceType (int deviceType)
Sets the type of the device.
Parameters | |
---|---|
deviceType |
int : One of DEVICE_TYPE_WFD_SOURCE , DEVICE_TYPE_PRIMARY_SINK ,
DEVICE_TYPE_SECONDARY_SINK , DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK
Value is DEVICE_TYPE_WFD_SOURCE , DEVICE_TYPE_PRIMARY_SINK , DEVICE_TYPE_SECONDARY_SINK , or DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK |
Returns | |
---|---|
boolean |
true if the device type was successfully set, false otherwise |
public void setEnabled (boolean enabled)
Sets whether Wifi Display should be enabled.
Parameters | |
---|---|
enabled |
boolean : true to enable Wifi Display, false to disable |
public void setMaxThroughput (int maxThroughput)
Sets the maximum average throughput capability of the WFD Device, in megabits/second.
Parameters | |
---|---|
maxThroughput |
int : Value is 0 or greater |
public void setSessionAvailable (boolean enabled)
Sets whether a session is available.
Parameters | |
---|---|
enabled |
boolean : true to indicate that a session is available, false otherwise. |
public String toString ()
Returns a string representation of the object. In general, the
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
Returns | |
---|---|
String |
a string representation of the object. |
public void writeToParcel (Parcel dest, int flags)
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.PARCELABLE_WRITE_RETURN_VALUE .
Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |