Bluetooth Framework C++ Edition
|
The base class for the client connection that requires data exchange with a remote device. More...
#include <wclConnections.h>
Public Member Functions | |
CwclClientDataConnection () | |
Creates a new client data connection. | |
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. | |
CwclCustomClientDataProcessor * | GetProcessor () const |
Gets the current Data Processor object assigned to the Connection. | |
__declspec (property(get=GetProcessor)) CwclCustomClientDataProcessor *Processor | |
__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. | |
Public Member Functions inherited from CwclClientConnection | |
CwclClientConnection () | |
Creates a new client connection. | |
virtual | ~CwclClientConnection () |
Frees the connection. | |
int | Connect (const unsigned long Timeout=10000) |
Connects to a remote device. | |
int | Disconnect () |
Disconnects from the connected remote device. | |
wclClientState | GetState () const |
Gets the connection state. | |
__declspec (property(get=GetState)) wclClientState State | |
Gets the connection state. | |
unsigned long | GetTimeout () const |
Gets the connect timeout value. | |
__declspec (property(get=GetTimeout)) unsigned long Timeout | |
Gets 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 | OnDisconnect (void *Sender, const int Reason) |
The event fires when the remote connected device has been disconnected. | |
Public Member Functions inherited from CwclCustomConnection | |
CwclCustomConnection () | |
Creates a new connection. | |
virtual | ~CwclCustomConnection () |
Frees the connection. | |
CwclMessageReceiver * | GetReceiver () const |
Gets the connection message receiver object. | |
__declspec (property(get=GetReceiver)) CwclMessageReceiver *Receiver | |
Gets the connection message receiver object. | |
DWORD | GetThreadId () const |
Gets the connection's thread ID. | |
__declspec (property(get=GetThreadId)) DWORD ThreadId | |
Gets the connection's thread ID. | |
Protected Member Functions | |
void | NotifyDataReceived (const void *const Data, const unsigned long Size) |
Send a data notification message. | |
virtual void | MessageReceived (const CwclMessage *const Message) override |
The message receiver calls this method when a new notification message has been received. | |
virtual void | DoData (const void *const Data, const unsigned long Size) |
Fires the OnData event. | |
virtual int | HalGetReadBufferSize (unsigned long &Size)=0 |
Reads the read buffer size. | |
virtual int | HalGetWriteBufferSize (unsigned long &Size)=0 |
Reads the write buffer size. | |
virtual int | HalSetReadBufferSize (const unsigned long Size)=0 |
Sets the read buffer size. | |
virtual int | HalSetWriteBufferSize (const unsigned long Size)=0 |
Sets the write buffer size. | |
virtual int | HalWrite (const void *const Data, const unsigned long Size, unsigned long &Written)=0 |
Implements a hardware-dependent code that sends data to the connected device. | |
Protected Member Functions inherited from CwclClientConnection | |
void | InternalDisconnect (const int Reason) |
The internal disconnect method. Disconnects from a connected remote device. | |
void | NotifyClosed (const int Reason) |
Send a Disconnect notification message. | |
virtual void | MessageReceived (const CwclMessage *const Message) override |
The message receiver calls this method when a new notification message has been received. | |
virtual void | DoConnect (const int Error) |
Fires the OnConnect event. | |
virtual void | DoDisconnect (const int Reason) |
Fires the OnDisconnect event. | |
virtual int | HalCommunicate (const HANDLE Event) |
Implements a hardware-dependent code that communicate with the connected remote device. | |
virtual int | HalConnect (const HANDLE Event)=0 |
Implements a hardware-dependent code that connects to a remote device. | |
virtual int | HalDisconnect ()=0 |
Implements a hardware-dependent code that disconnects from the connected remote device. | |
Protected Member Functions inherited from CwclCustomConnection | |
virtual void | MessageReceived (const CwclMessage *const Message) |
The message receiver calls this method when a new notification message has been received. | |
void | Enter () |
Enters the connection's critical section. | |
void | Leave () |
Exists *leaves) the connection's critical section. | |
The base class for the client connection that requires data exchange with a remote device.