# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Inherited Constants | Fields | Ctors | Methods | Inherited Methods

# WifiP2pWfdInfo

`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.

## Summary

### 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
From interface `android.os.Parcelable`
`int` | `CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` | `PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `writeToParcel(Parcel, int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`".

### 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
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.
From interface `android.os.Parcelable`
`abstract int` | `describeContents()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
`abstract void` | `writeToParcel(Parcel dest, int flags)` Flatten this object in to a Parcel.

## Constants

### DEVICE_TYPE_PRIMARY_SINK

    public static final int DEVICE_TYPE_PRIMARY_SINK

The device is a primary sink.

Constant Value: 1 (0x00000001)

### DEVICE_TYPE_SECONDARY_SINK

    public static final int DEVICE_TYPE_SECONDARY_SINK

The device is a secondary sink.

Constant Value: 2 (0x00000002)

### DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK

    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)

### DEVICE_TYPE_WFD_SOURCE

    public static final int DEVICE_TYPE_WFD_SOURCE

The device is a Wifi Display Source.

Constant Value: 0 (0x00000000)

## Fields

### CREATOR

    public static final Creator<WifiP2pWfdInfo> CREATOR

Implement the Parcelable interface

## Public constructors

### WifiP2pWfdInfo

    public WifiP2pWfdInfo ()

Default constructor.

### WifiP2pWfdInfo

    public WifiP2pWfdInfo (WifiP2pWfdInfo source)

Copy constructor.

Parameters
`source` | `WifiP2pWfdInfo`: This value may be `null`.

## Public methods

### describeContents

    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`

### getControlPort

    public int getControlPort ()

Returns the TCP port at which the WFD Device listens for RTSP messages.

Returns
`int` |

### getDeviceType

    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`

### getMaxThroughput

    public int getMaxThroughput ()

Returns the maximum average throughput capability of the WFD Device, in megabits/second.

Returns
`int` |

### isContentProtectionSupported

    public boolean isContentProtectionSupported ()

Returns
`boolean` | true if Content Protection using the HDCP system 2.0/2.1 is supported.

### isEnabled

    public boolean isEnabled ()

Returns true is Wifi Display is enabled, false otherwise.

Returns
`boolean` |

### isSessionAvailable

    public boolean isSessionAvailable ()

Returns true if a session is available, false otherwise.

Returns
`boolean` |

### setContentProtectionSupported

    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.

### setControlPort

    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

### setDeviceType

    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

### setEnabled

    public void setEnabled (boolean enabled)

Sets whether Wifi Display should be enabled.

Parameters
`enabled` | `boolean`: true to enable Wifi Display, false to disable

### setMaxThroughput

    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

### setSessionAvailable

    public void setSessionAvailable (boolean enabled)

Sets whether a session is available.

Parameters
`enabled` | `boolean`: true to indicate that a session is available, false otherwise.

### toString

    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.

### writeToParcel

    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

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*