Class WiFiDirectPeer
Definition
- Namespace:
- Tizen.Network.WiFiDirect
- Assembly:
- Tizen.Network.WiFiDirect.dll
- API Level:
- 3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
The WiFiDirectPeer class is used to handle the connection with remote devices using Wi-Fi Direct.
public class WiFiDirectPeer
- Inheritance
-
WiFiDirectPeer
Properties
View SourceChannel
The listening channel of the peer device.
Declaration
public int Channel { get; }
Property Value
Type | Description |
---|---|
Int32 |
API Level: 3
View SourceDisplay
The Wi-Fi display device type of the peer device.
Declaration
public WiFiDirectDisplayType Display { get; }
Property Value
Type | Description |
---|---|
WiFiDirectDisplayType |
Remarks
Wi-Fi Direct must be activated. If there is any error, a default value of WiFiDirectDisplayType will be returned.
API Level: 3
View SourceDisplayAvailability
The Wi-Fi display session availability of the peer device.
Declaration
public bool DisplayAvailability { get; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Wi-Fi Direct must be activated. If there is any error, false will be returned.
API Level: 3
View SourceHdcp
The HDCP information of the peer device.
Declaration
public int Hdcp { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Wi-Fi Direct must be activated. If there is any error, -1 will be returned.
API Level: 3
View SourceInterfaceAddress
The Interface address of the peer device.
Declaration
public string InterfaceAddress { get; }
Property Value
Type | Description |
---|---|
String |
API Level: 3
View SourceIpAddress
The IP address of the peer device.
Declaration
public string IpAddress { get; }
Property Value
Type | Description |
---|---|
String |
API Level: 3
View SourceIsConnected
The connected state of the peer device.
Declaration
public bool IsConnected { get; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
View SourceIsGroupOwner
The P2P group state of the peer device.
Declaration
public bool IsGroupOwner { get; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
View SourceIsMiracastDevice
Checks if the peer device is a Wi-Fi display device.
Declaration
public bool IsMiracastDevice { get; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
View SourceIsP2PInvitationSupported
The P2P invitation state of the peer device.
Declaration
public bool IsP2PInvitationSupported { get; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
View SourceMacAddress
The MAC address of the peer device.
Declaration
public string MacAddress { get; }
Property Value
Type | Description |
---|---|
String |
API Level: 3
View SourceName
The name of the peer device.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String |
API Level: 3
View SourceP2PSupport
The P2P state of the peer device.
Declaration
public bool P2PSupport { get; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
View SourcePort
The port of the connected peer device.
Declaration
public int Port { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Wi-Fi Direct must be activated. If there is any error, -1 will be returned.
API Level: 3
View SourcePrimaryType
The primary catagory of the peer device.
Declaration
public WiFiDirectPrimaryDeviceType PrimaryType { get; }
Property Value
Type | Description |
---|---|
WiFiDirectPrimaryDeviceType |
API Level: 3
View SourceRssi
The Wi-Fi RSSI value of the peer device.
Declaration
public int Rssi { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Wi-Fi Direct must be activated. If there is any error, -1 will be returned.
API Level: 3
View SourceSecondaryType
The sub category of the peer device.
Declaration
public WiFiDirectSecondaryDeviceType SecondaryType { get; }
Property Value
Type | Description |
---|---|
WiFiDirectSecondaryDeviceType |
API Level: 3
View SourceServiceCount
The number of registered services of the peer device.
Declaration
public uint ServiceCount { get; }
Property Value
Type | Description |
---|---|
UInt32 |
API Level: 3
View SourceServiceList
The list of registered services of the peer device.
Declaration
public IEnumerable<string> ServiceList { get; }
Property Value
Type | Description |
---|---|
IEnumerable<String> |
API Level: 3
View SourceThroughput
The Wi-Fi display maximum throughput of the peer device.
Declaration
public int Throughput { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Wi-Fi Direct must be activated. If there is any error, -1 will be returned.
API Level: 3
View SourceWpsTypes
The list of the supported WPS type of the peer device.
Declaration
public int WpsTypes { get; }
Property Value
Type | Description |
---|---|
Int32 |
API Level: 3
Methods
View SourceCancelConnection()
Cancels the connection now in progress.
Declaration
public void CancelConnection()
Remarks
Wi-Fi Direct must be activated.
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the Wi-Fi Direct is not supported. |
API Level: 3
View SourceCancelServiceDiscovery(WiFiDirectServiceType)
Stops the Wi-Fi Direct service discovery.
Declaration
public void CancelServiceDiscovery(WiFiDirectServiceType type)
Parameters
Type | Name | Description |
---|---|---|
WiFiDirectServiceType | type | The type of the service. |
Remarks
Wi-Fi Direct must be activated.
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown during one of the following cases:
|
API Level: 3
View SourceConnect()
Connects to a specified remote device.
Declaration
public void Connect()
Remarks
Wi-Fi Direct must be activated. If this succeeds, the ConnectionStateChanged event will be invoked.
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the Wi-Fi Direct is not supported |
API Level: 3
View SourceDisconnect()
Disconnects the specified remote device.
Declaration
public void Disconnect()
Remarks
Wi-Fi Direct must be activated. If this succeeds, the ConnectionStateChanged event will be invoked.
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the Wi-Fi Direct is not supported. |
API Level: 3
View SourceSetAutoConnect()
Allows a device to connect automatically.
Declaration
public void SetAutoConnect()
Remarks
Wi-Fi Direct must be activated.
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the Wi-Fi Direct is not supported. |
API Level: 3
View SourceStartServiceDiscovery(WiFiDirectServiceType)
Starts the Wi-Fi Direct service discovery.
Declaration
public void StartServiceDiscovery(WiFiDirectServiceType type)
Parameters
Type | Name | Description |
---|---|---|
WiFiDirectServiceType | type | The type of the service. |
Remarks
Wi-Fi Direct must be activated. If this succeeds, the ServiceStateChanged event will be invoked.
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown during one of the following cases:
|
API Level: 3
Events
View SourceConnectionStateChanged
The ConnectionStateChanged event is raised when the connection state of the peer device changes.
Declaration
public event EventHandler<ConnectionStateChangedEventArgs> ConnectionStateChanged
Event Type
Type | Description |
---|---|
EventHandler<ConnectionStateChangedEventArgs> |
API Level: 3
View SourceIpAddressAssigned
The IpAddressAssigned event is raised when the IP address of the peer device is assigned.
Declaration
public event EventHandler<IpAddressAssignedEventArgs> IpAddressAssigned
Event Type
Type | Description |
---|---|
EventHandler<IpAddressAssignedEventArgs> |
API Level: 3
View SourceServiceStateChanged
The ServiceStateChanged event is raised when the state of service discovery is changed.
Declaration
public event EventHandler<ServiceStateChangedEventArgs> ServiceStateChanged
Event Type
Type | Description |
---|---|
EventHandler<ServiceStateChangedEventArgs> |