Bluetooth Framework C++ Edition
Public Member Functions | Protected Member Functions | List of all members
CwclRfCommClient Class Reference

The Bluetooth RFCOMM Client component. More...

#include <wclBluetooth.h>

Inheritance diagram for CwclRfCommClient:
CwclBluetoothComponent

Public Member Functions

 CwclRfCommClient ()
 Creates new RFCOMM client component.
 
virtual ~CwclRfCommClient ()
 Frees the component.
 
int Connect (CwclBluetoothRadio *const Radio)
 Starts connecting to a remote Bluetooth device.
 
int Disconnect ()
 Disconnects from the connection remote device.
 
int GetReadBufferSize (unsigned long &Size)
 Reads the read buffer size.
 
int GetWriteBufferSize (unsigned long &Size)
 Reads the write buffer size.
 
int SetReadBufferSize (const unsigned long Size)
 Sets the read buffer size.
 
int SetWriteBufferSize (const unsigned long Size)
 Sets the write buffer size.
 
int Write (const void *const Data, const unsigned long Size, unsigned long &Written)
 Sends data to the connected device.
 
CwclCustomClientDataProcessorGetProcessor () const
 Gets the Data Processor created for the connection.
 
 __declspec (property(get=GetProcessor)) CwclCustomClientDataProcessor *Processor
 Gets the Data Processor created for the connection.
 
CwclBluetoothRadioGetRadio () const
 Gets the radio object used for connection.
 
 __declspec (property(get=GetRadio)) CwclBluetoothRadio *Radio
 Gets the radio object used for connection.
 
GUID GetService () const
 Gets the service's UUID that should be used for connection.
 
void SetService (const GUID &Value)
 Sets the service's UUID that should be used for connection.
 
 __declspec (property(get=GetService, put=SetService)) GUID Service
 Gets and sets the service's UUID that should be used for connection.
 
wclClientState GetState () const
 Gets the current client state.
 
 __declspec (property(get=GetState)) wclClientState State
 Gets the current client state.
 
__int64 GetAddress () const
 Gets a target Bluetooth device's MAC address.
 
void SetAddress (const __int64 Value)
 Sets a target Bluetooth device's MAC address.
 
 __declspec (property(get=GetAddress, put=SetAddress)) __int64 Address
 Gets and sets a target Bluetooth device's MAC address.
 
bool GetAuthentication () const
 Gets the authentication property for the connection.
 
void SetAuthentication (const bool Value)
 Sets the authentication property for the connection.
 
 __declspec (property(get=GetAuthentication, put=SetAuthentication)) bool Authentication
 Gets and sets the authentication property for the connection.
 
unsigned char GetChannel () const
 Gets the RFCOMM channel number used for connection.
 
void SetChannel (const unsigned char Value)
 Sets the RFCOMM channel number used for connection.
 
 __declspec (property(get=GetChannel, put=SetChannel)) unsigned char Channel
 Gets and sets the RFCOMM channel number used for connection.
 
bool GetEncryption () const
 Gets the Encryption property for the connection.
 
void SetEncryption (const bool Value)
 Sets the Encryption property for the connection.
 
 __declspec (property(get=GetEncryption, put=SetEncryption)) bool Encryption
 Gets and sets the Encryption property for the connection.
 
unsigned long GetTimeout () const
 Gets the connect timeout value.
 
void SetTimeout (const unsigned long Value)
 Sets the connect timeout value.
 
 __declspec (property(get=GetTimeout, put=SetTimeout)) unsigned long Timeout
 Gets and sets the connect timeout value.
 
__event void OnConnect (void *Sender, const int Error)
 The event fires when a connection to a remote device has been completed (with or without success).
 
__event void OnCreateProcessor (void *Sender, CwclClientDataConnection *const Connection)
 The event fires when connection to a remote device has been established with success to allow application provide a data processor for the connection.
 
__event void OnData (void *Sender, const void *const Data, const unsigned long Size)
 The event fires when new data is received from the connected remote device.
 
__event void OnDestroyProcessor (void *Sender, CwclClientDataConnection *const Connection)
 The event fires when connection to a remote device has been terminated. An application must destroy the Data Processor created for the connection.
 
__event void OnDisconnect (void *Sender, const int Reason)
 The event fires when the remote connected device has been disconnected.
 
- Public Member Functions inherited from CwclBluetoothComponent
 CwclBluetoothComponent ()
 Creates a new component.
 
virtual ~CwclBluetoothComponent ()
 Frees the component.
 

Protected Member Functions

virtual void DoConnect (const int Error)
 Fires the OnConnect event.
 
virtual void DoCreateProcessor (CwclClientDataConnection *const Connection)
 Fires the OnCreateProcessor event.
 
virtual void DoData (const void *const Data, const unsigned long Size)
 Fires the OnData event.
 
virtual void DoDestroyProcessor (CwclClientDataConnection *const Connection)
 Fires the OnDestroyProcessor event.
 
virtual void DoDisconnect (const int Reason)
 Fires the OnDisconnect event.
 
- Protected Member Functions inherited from CwclBluetoothComponent
void SetCopy (CwclCustomConnection *const NewConnection)
 The method sets new copy of the current connection.
 
void Enter () const
 Enters the Bluetooth component protection critical section.
 
void Leave () const
 Leaves the Bluetooth component protection critical section.
 

Detailed Description

The Bluetooth RFCOMM Client component.

See also
CwclBluetoothComponent