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
    object
    WiFiDirectPeer

    Properties

    View Source

    Channel

    The listening channel of the peer device.

    Declaration
    public int Channel { get; }
    Property Value
    Type Description
    int
    View Source

    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.

    View Source

    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.

    View Source

    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.

    View Source

    InterfaceAddress

    The Interface address of the peer device.

    Declaration
    public string InterfaceAddress { get; }
    Property Value
    Type Description
    string
    View Source

    IpAddress

    The IP address of the peer device.

    Declaration
    public string IpAddress { get; }
    Property Value
    Type Description
    string
    View Source

    IsConnected

    The connected state of the peer device.

    Declaration
    public bool IsConnected { get; }
    Property Value
    Type Description
    bool
    View Source

    IsGroupOwner

    The P2P group state of the peer device.

    Declaration
    public bool IsGroupOwner { get; }
    Property Value
    Type Description
    bool
    View Source

    IsMiracastDevice

    Checks if the peer device is a Wi-Fi display device.

    Declaration
    public bool IsMiracastDevice { get; }
    Property Value
    Type Description
    bool
    View Source

    IsP2PInvitationSupported

    The P2P invitation state of the peer device.

    Declaration
    public bool IsP2PInvitationSupported { get; }
    Property Value
    Type Description
    bool
    View Source

    MacAddress

    The MAC address of the peer device.

    Declaration
    public string MacAddress { get; }
    Property Value
    Type Description
    string
    View Source

    Name

    The name of the peer device.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    string
    View Source

    P2PSupport

    The P2P state of the peer device.

    Declaration
    public bool P2PSupport { get; }
    Property Value
    Type Description
    bool
    View Source

    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.

    View Source

    PrimaryType

    The primary catagory of the peer device.

    Declaration
    public WiFiDirectPrimaryDeviceType PrimaryType { get; }
    Property Value
    Type Description
    WiFiDirectPrimaryDeviceType
    View Source

    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.

    View Source

    SecondaryType

    The sub category of the peer device.

    Declaration
    public WiFiDirectSecondaryDeviceType SecondaryType { get; }
    Property Value
    Type Description
    WiFiDirectSecondaryDeviceType
    View Source

    ServiceCount

    The number of registered services of the peer device.

    Declaration
    public uint ServiceCount { get; }
    Property Value
    Type Description
    uint
    View Source

    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>
    View Source

    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.

    View Source

    Vsie

    The vendor specific information element (VSIE) of a peer.

    Declaration
    public string Vsie { get; }
    Property Value
    Type Description
    string
    Remarks

    Wi-Fi Direct must be activated. If there is any error, null will be returned.

    View Source

    WpsTypes

    The list of the supported WPS type of the peer device.

    Declaration
    public int WpsTypes { get; }
    Property Value
    Type Description
    int

    Methods

    View Source

    CancelConnection()

    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.

    View Source

    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:

    1. When the Wi-Fi Direct is not supported.
    2. When the Wi-Fi Direct service discovery is not supported.
    View Source

    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

    View Source

    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.

    View Source

    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.

    View Source

    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:

    1. When the Wi-Fi Direct is not supported.
    2. When the Wi-Fi Direct service discovery is not supported.

    Events

    View Source

    ConnectionStateChanged

    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>
    View Source

    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>
    View Source

    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>
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX