WiFi Framework C++ Edition
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.
 
wclMessageProcessingMethod GetMessageProcessing () const
 Gets a message processing method that should be used by the WiFi Sniffer.
 
void SetMessageProcessing (const wclMessageProcessingMethod Value)
 Sets a message processing method that should be used by the WiFi Sniffer.
 
 __declspec (property(get=GetMessageProcessing, put=SetMessageProcessing)) wclMessageProcessingMethod MessageProcessing
 Gets and sets a message processing method that should be used by the WiFi Sniffer.
 

Protected Member Functions

virtual void HardwareRemoved () override
 The method called when WiFi hardware has been switched off or removed.
 
virtual CwclWiFiDirectDevice * FindDevice (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 void MessageReceived (const CwclMessage *const Message) override
 The method called when a new notification message received.
 
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
int InitWlan ()
 Initializes native WLAN subsystem.
 
void UninitWlan ()
 Uninitializes native WLAN subsystem.
 
bool GetHardwareAvailable () const
 Gets the Hardware Available flag.
 
 __declspec (property(get=GetHardwareAvailable)) bool HardwareAvailable
 Gets the Hardware Available flag.
 
CwclMessageReceiver * GetReceiver () 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