Bluetooth Framework C++ Edition
|
Bluetooth RFCOMM server. More...
#include <wclBluetooth.h>
Public Member Functions | |
CwclRfCommServer () | |
Creates a new component. | |
virtual | ~CwclRfCommServer () |
Frees the component. | |
int | Close () |
Closes the server. | |
int | Listen (CwclBluetoothRadio *const Radio) |
The method starts listening for client connections. | |
unsigned char | GetAssignedChannel () const |
Gets the RFCOMM assigned channel number. | |
__declspec (property(get=GetAssignedChannel)) unsigned char AssignedChannel | |
Gets the RFCOMM assigned channel number. | |
size_t | GetCount () const |
Gets the number of the connected clients. | |
__declspec (property(get=GetCount)) size_t Count | |
Gets the number of the connected clients. | |
CwclRfCommServerClientConnection * | GetClients (const size_t Index) const |
Gets the connected client by its index. | |
__declspec (property(get=GetClients)) CwclRfCommServerClientConnection *Clients[] | |
Gets the connected client by its index. | |
CwclBluetoothRadio * | GetRadio () const |
Gets the connection radio object. | |
__declspec (property(get=GetRadio)) CwclBluetoothRadio *Radio | |
Gets the connection radio object. | |
GUID | GetService () const |
Gets the Bluetooth service UUID used for connection. | |
void | SetService (const GUID &Value) |
Sets the Bluetooth service UUID used for connection. | |
__declspec (property(get=GetService, put=SetService)) GUID Service | |
Gets and sets the Bluetooth service UUID used for connection. | |
wclServerState | GetState () const |
Gets the current connection state. | |
__declspec (property(get=GetState)) wclServerState State | |
Gets the current connection state. | |
bool | GetAuthentication () const |
Gets the authentication value. | |
void | SetAuthentication (const bool Value) |
Sets the authentication value. | |
__declspec (property(get=GetAuthentication, put=SetAuthentication)) bool Authentication | |
Gets and sets the authentication value. | |
unsigned char | GetChannel () const |
Gets the service RFCOMM channel number. 0 to auto detection. | |
void | SetChannel (const unsigned char Value) |
Sets the service RFCOMM channel number. 0 to auto detection. | |
__declspec (property(get=GetChannel, put=SetChannel)) unsigned char Channel | |
Gets and sets the service RFCOMM channel number. 0 to auto detection. | |
bool | GetEncryption () const |
Gets the encryption state of the connection. | |
void | SetEncryption (const bool Value) |
Sets the encryption state of the connection. | |
__declspec (property(get=GetEncryption, put=SetEncryption)) bool Encryption | |
Gets and sets the encryption state of the connection. | |
tstring | GetServiceName () const |
Gets the service name. | |
void | SetServiceName (const tstring &Value) |
Sets the service name. | |
__declspec (property(get=GetServiceName, put=SetServiceName)) tstring ServiceName | |
Gets and sets the service name. | |
__event void | GetSdpAttributes (void *Sender, wclBluetoothSdpProtocols &Protocols, wclBluetoothSdpProfiles &Profiles, wclBluetoothSdpFormats &Formats, unsigned long &Cod) |
The event fires when the server builds SDP record for the service it runs. If an application needs to provide additional attributes it should handle the event. By default no additional attributes is added for the SDP record. | |
__event void | OnClosed (void *Sender, const int Reason) |
The event fires when the server is closed. | |
__event void | OnConnect (void *Sender, CwclRfCommServerClientConnection *const Client, const int Error) |
The event fires when a remote client is connected to the server. | |
__event void | OnCreateProcessor (void *Sender, CwclServerClientDataConnection *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, CwclRfCommServerClientConnection *const Client, 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, CwclServerClientDataConnection *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, CwclRfCommServerClientConnection *const Client, const int Reason) |
The event fires when a remote client has disconnected from the server. | |
__event void | OnListen (void *Sender) |
The event fires when the server is ready to accept incoming connections (is in listening state). | |
Public Member Functions inherited from CwclBluetoothComponent | |
CwclBluetoothComponent () | |
Creates a new component. | |
virtual | ~CwclBluetoothComponent () |
Frees the component. | |
Protected Member Functions | |
virtual void | DoClosed (const int Reason) |
Fires the OnClosed event. | |
virtual void | DoConnect (CwclRfCommServerClientConnection *const Client, const int Error) |
Fires the OnConnect event. | |
virtual void | DoCreateProcessor (CwclServerClientDataConnection *const Connection) |
Fires the OnCreateProcessor event. | |
virtual void | DoData (CwclRfCommServerClientConnection *const Client, const void *const Data, const unsigned long Size) |
Fires the OnData event. | |
virtual void | DoDestroyProcessor (CwclServerClientDataConnection *const Connection) |
Fires the OnDestroyProcessor event. | |
virtual void | DoDisconnect (CwclRfCommServerClientConnection *const Client, const int Reason) |
Fires the OnDisconnect event. | |
virtual void | DoListen () |
Fires the OnListen event. | |
virtual void | DoGetSdpAttributes (wclBluetoothSdpProtocols &Protocols, wclBluetoothSdpProfiles &Profiles, wclBluetoothSdpFormats &Formats, unsigned long &Cod) |
Fires the GetSdpAttributes 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. | |
Bluetooth RFCOMM server.
The TwclRfCommClient
component enables an application to accept connections from Bluetooth devices through RFCOMM protocol and work with RFCOMM based profiles (SPP, OBEX, others).