IrDA Framework C++ Edition
Public Member Functions | Protected Member Functions | List of all members
CwclIrDAClient Class Reference

The IrDA client component. More...

#include <wclIrDAClients.h>

Public Member Functions

 CwclIrDAClient ()
 Create a new IrDA client.
 
virtual ~CwclIrDAClient ()
 Frees the component.
 
int Connect ()
 Connects to a remote device.
 
int Disconnect ()
 Disconnects from the connected 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.
 
wclClientState GetState () const
 Gets the connection state.
 
 __declspec (property(get=GetState)) wclClientState State
 Gets the connection state.
 
unsigned long GetAddress () const
 Gets the target IrDA device's address.
 
void SetAddress (const unsigned long Value)
 Sets the target IrDA device's address.
 
 __declspec (property(get=GetAddress, put=SetAddress)) unsigned long Address
 Gets and sets the target IrDA device's address.
 
wclIrDAConnectionMode GetMode () const
 Gets the IrDA connection mode.
 
void SetMode (const wclIrDAConnectionMode Value=cmIrComm9Wire)
 Sets the IrDA connection mode.
 
 __declspec (property(get=GetMode, put=SetMode)) wclIrDAConnectionMode Mode
 Gets and sets the IrDA connection mode.
 
tstring GetService () const
 Gets the IrDA service that should be used to connect. It can be a TinyTP service name or LSAP selector number. In case of using LSAP selector number the format is 'LSAP-SELn' where n is a select number in range from 1 to 127.
 
void SetService (const tstring &Value=_T("IrDA:IrCOMM"))
 Sets the IrDA service that should be used to connect. It can be a TinyTP service name or LSAP selector number. In case of using LSAP selector number the format is 'LSAP-SELn' where n is a select number in range from 1 to 127.
 
 __declspec (property(get=GetService, put=SetService)) tstring Service
 Gets and sets the IrDA service that should be used to connect. It can be a TinyTP service name or LSAP selector number. In case of using LSAP selector number the format is 'LSAP-SELn' where n is a select number in range from 1 to 127.
 
unsigned long GetTimeout () const
 Gets the connect timeout value.
 
void SetTimeout (const unsigned long Value=10000)
 Sets 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.
 

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.
 

Detailed Description

The IrDA client component.

The IrDA Client component allows your application to connect to a remote IrDA enabled device and exchange data with the device.