WiFi Framework C++ Edition
Public Member Functions | Protected Member Functions | List of all members
CwclWiFiDirectClient Class Reference

The WiFi Direct Client allows to connect to other WiFi Direct devices. More...

#include <wclWiFi.h>

Inheritance diagram for CwclWiFiDirectClient:
CwclWiFiDirectConnectionComponent CwclCustomWiFiDirectComponent

Public Member Functions

 CwclWiFiDirectClient ()
 Creates a new WiFi Direct Client component.
 
int Connect (const tstring &Id)
 Connect to remote WiFi Direct device.
 
int Disconnect ()
 Disconnect from the connected remote WiFi Direct device.
 
tstring GetLocalAddress () const
 Gets local IP address for the connection.
 
 __declspec (property(get=GetLocalAddress)) tstring LocalAddress
 Gets local IP address for the connection.
 
tstring GetRemoteAddress () const
 Gets remote IP address for the connection.
 
 __declspec (property(get=GetRemoteAddress)) tstring RemoteAddress
 Gets remote IP address for the connection.
 
wclWiFiDirectDeviceState GetState () const
 Gets a client state.
 
 __declspec (property(get=GetState)) wclWiFiDirectDeviceState State
 Gets a client state.
 
- Public Member Functions inherited from CwclWiFiDirectConnectionComponent
 CwclWiFiDirectConnectionComponent ()
 Creates a new WiFi Direct Advertiser component.
 
__event void OnDeviceConnected (void *Sender, CwclWiFiDirectDevice *const Device, const int Error)
 The event fires when a remote WiFi enabled device has been connected to the WiFi Direct Advertiser.
 
__event void OnDeviceDisconnected (void *Sender, CwclWiFiDirectDevice *const Device, const int Reason)
 The event fires when the remote WiFi enabled device has been disconnected from the WiFi Direct Advertiser.
 
__event void OnPairCompleted (void *Sender, CwclWiFiDirectDevice *const Device, const int Result)
 The event fires when pairing with a remote WiFi enabled device has been completed (with or without success).
 
__event void OnPairConfirm (void *Sender, CwclWiFiDirectDevice *const Device, bool &Confirm)
 The event fires when a remote WiFi enabled device requests simple pairing confirmation.
 
__event void OnPairDisplayPin (void *Sender, CwclWiFiDirectDevice *const Device, const tstring &Pin)
 The event fires when a remote WiFi enabled device requests the Display Pin pairing procedure. An application must show the Pin received from the event.
 
__event void OnPairGetParams (void *Sender, CwclWiFiDirectDevice *const Device, short &GroupOwnerIntent, wclWiFiDirectConfigurationMethods &ConfigurationMethods, wclWiFiDirectPairingProcedure &PairingProcedure)
 The event fires when pairing parameters need to be set.
 
__event void OnPairProvidePin (void *Sender, CwclWiFiDirectDevice *const Device, tstring &Pin)
 The event fires when a remote WiFi enabled device requests Pin for pairing. An application must provide Pin.
 
- Public Member Functions inherited from CwclCustomWiFiDirectComponent
 CwclCustomWiFiDirectComponent ()
 Creates a new WiFi Direct Advertiser component.
 
virtual ~CwclCustomWiFiDirectComponent ()
 Frees the WiFi Direct Advertiser component.
 

Protected Member Functions

virtual void HardwareRemoved () override
 The method called when WiFi hardware has been switched off or removed.
 
virtual CwclWiFiDirectDeviceFindDevice (const tstring &Id) const override
 Gets device object by its ID.
 
virtual void DoDeviceConnected (CwclWiFiDirectDevice *const Device, const int Error) override
 Fires the OnDeviceConnected event.
 
virtual void DoDeviceDisconnected (CwclWiFiDirectDevice *const Device, const int Reason) override
 Fires the OnDeviceDisconnected event.
 
- Protected Member Functions inherited from CwclWiFiDirectConnectionComponent
virtual CwclWiFiDirectDeviceFindDevice (const tstring &Id) const =0
 Gets device object by its ID.
 
virtual void MessageReceived (const CwclMessage *const Message) override
 The method called when a new notification message received.
 
virtual void DoDeviceConnected (CwclWiFiDirectDevice *const Device, const int Error)
 Fires the OnDeviceConnected event.
 
virtual void DoDeviceDisconnected (CwclWiFiDirectDevice *const Device, const int Reason)
 Fires the OnDeviceDisconnected event.
 
virtual void DoPairCompleted (CwclWiFiDirectDevice *const Device, const int Result)
 Fires the OnPairComplete event.
 
virtual void DoPairConfirm (CwclWiFiDirectDevice *const Device, bool &Confirm)
 Fires the OnPairConfirm event.
 
virtual void DoPairDisplayPin (CwclWiFiDirectDevice *const Device, const tstring &Pin)
 Fires the OnPairDisplayPin event.
 
virtual void DoPairGetParams (CwclWiFiDirectDevice *const Device, short &GroupOwnerIntent, wclWiFiDirectConfigurationMethods &ConfigurationMethods, wclWiFiDirectPairingProcedure &PairingProcedure)
 Fires the OnPairGetParams event.
 
virtual void DoPairProvidePin (CwclWiFiDirectDevice *const Device, tstring &Pin)
 Fires the OnPairProvidePin event.
 
- Protected Member Functions inherited from CwclCustomWiFiDirectComponent
virtual void HardwareRemoved ()
 The method called when WiFi hardware has been switched off or removed.
 
int InitWlan ()
 Initializes native WLAN subsystem.
 
void UninitWlan ()
 Uninitializes native WLAN subsystem.
 
virtual void MessageReceived (const CwclMessage *const Message)
 The method called when a new notification message received.
 
bool GetHardwareAvailable () const
 Gets the Hardware Available flag.
 
 __declspec (property(get=GetHardwareAvailable)) bool HardwareAvailable
 Gets the Hardware Available flag.
 
CwclMessageReceiverGetReceiver () const
 Gets the message receiver object.
 
 __declspec (property(get=GetReceiver)) CwclMessageReceiver *Receiver
 Gets the message receiver object.
 

Detailed Description

The WiFi Direct Client allows to connect to other WiFi Direct devices.

See also
CwclWiFiDirectConnectionComponent