Class WiFiDirectPeer
Definition
- Namespace:
- Tizen.Network.WiFiDirect
- Assembly:
- Tizen.Network.WiFiDirect.dll
The WiFiDirectPeer class is used to handle the connection with remote devices using Wi-Fi Direct.
public class WiFiDirectPeer
- Inheritance
-
objectWiFiDirectPeer
Properties
View SourceChannel
The listening channel of the peer device.
Declaration
public int Channel { get; }
Property Value
Type | Description |
---|---|
int |
Display
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.
DisplayAvailability
The Wi-Fi display session availability of the peer device.
Declaration
public bool DisplayAvailability { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Wi-Fi Direct must be activated. If there is any error, false will be returned.
Hdcp
The HDCP information of the peer device.
Declaration
public int Hdcp { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
Wi-Fi Direct must be activated. If there is any error, -1 will be returned.
InterfaceAddress
The Interface address of the peer device.
Declaration
public string InterfaceAddress { get; }
Property Value
Type | Description |
---|---|
string |
IpAddress
The IP address of the peer device.
Declaration
public string IpAddress { get; }
Property Value
Type | Description |
---|---|
string |
IsConnected
The connected state of the peer device.
Declaration
public bool IsConnected { get; }
Property Value
Type | Description |
---|---|
bool |
IsGroupOwner
The P2P group state of the peer device.
Declaration
public bool IsGroupOwner { get; }
Property Value
Type | Description |
---|---|
bool |
IsMiracastDevice
Checks if the peer device is a Wi-Fi display device.
Declaration
public bool IsMiracastDevice { get; }
Property Value
Type | Description |
---|---|
bool |
IsP2PInvitationSupported
The P2P invitation state of the peer device.
Declaration
public bool IsP2PInvitationSupported { get; }
Property Value
Type | Description |
---|---|
bool |
MacAddress
The MAC address of the peer device.
Declaration
public string MacAddress { get; }
Property Value
Type | Description |
---|---|
string |
Name
The name of the peer device.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
P2PSupport
The P2P state of the peer device.
Declaration
public bool P2PSupport { get; }
Property Value
Type | Description |
---|---|
bool |
Port
The port of the connected peer device.
Declaration
public int Port { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
Wi-Fi Direct must be activated. If there is any error, -1 will be returned.
PrimaryType
The primary catagory of the peer device.
Declaration
public WiFiDirectPrimaryDeviceType PrimaryType { get; }
Property Value
Type | Description |
---|---|
WiFiDirectPrimaryDeviceType |
Rssi
The Wi-Fi RSSI value of the peer device.
Declaration
public int Rssi { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
Wi-Fi Direct must be activated. If there is any error, -1 will be returned.
SecondaryType
The sub category of the peer device.
Declaration
public WiFiDirectSecondaryDeviceType SecondaryType { get; }
Property Value
Type | Description |
---|---|
WiFiDirectSecondaryDeviceType |
ServiceCount
The number of registered services of the peer device.
Declaration
public uint ServiceCount { get; }
Property Value
Type | Description |
---|---|
uint |
ServiceList
The list of registered services of the peer device.
Declaration
public IEnumerable<string> ServiceList { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><string> |
Throughput
The Wi-Fi display maximum throughput of the peer device.
Declaration
public int Throughput { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
Wi-Fi Direct must be activated. If there is any error, -1 will be returned.
WpsTypes
The list of the supported WPS type of the peer device.
Declaration
public int WpsTypes { get; }
Property Value
Type | Description |
---|---|
int |
Methods
View SourceCancelConnection()
Cancels the connection now in progress.
Declaration
public void CancelConnection()
Remarks
Wi-Fi Direct must be activated.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi Direct is not supported. |
CancelServiceDiscovery(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 |
---|---|
System.NotSupportedException | Thrown during one of the following cases:
|
Connect()
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 |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi Direct is not supported |
Disconnect()
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 |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi Direct is not supported. |
SetAutoConnect()
Allows a device to connect automatically.
Declaration
public void SetAutoConnect()
Remarks
Wi-Fi Direct must be activated.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi Direct is not supported. |
StartServiceDiscovery(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 |
---|---|
System.NotSupportedException | Thrown during one of the following cases:
|
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 |
---|---|
System.EventHandler<TEventArgs><ConnectionStateChangedEventArgs> |
IpAddressAssigned
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 |
---|---|
System.EventHandler<TEventArgs><IpAddressAssignedEventArgs> |
ServiceStateChanged
The ServiceStateChanged event is raised when the state of service discovery is changed.
Declaration
public event EventHandler<ServiceStateChangedEventArgs> ServiceStateChanged
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><ServiceStateChangedEventArgs> |