Bluetooth Framework C++ Edition
|
The "virtual" connection for the Bluetooth GATT Server. More...
#include <wclBluetooth.h>
Public Member Functions | |
CwclGattServerConnection (CwclBluetoothRadio *const Radio) | |
Creates a new "virtual" GATT Server connection object. | |
virtual | ~CwclGattServerConnection () |
Frees the GATT Server connection. | |
int | Start () |
Starts the Bluetooth LE GATT Server. | |
int | Stop () |
Stops the Bluetooth LE GATT Server. | |
int | AddService (const wclGattUuid &Uuid, CwclGattLocalService *&Service) |
Creates new local GATT service and adds it to the services list. | |
int | ClearServices () |
Clears the local services list. | |
int | DeleteService (const size_t Index) |
Deletes the service with given index. | |
bool | GetActive () const |
Gets the GATT server state. | |
__declspec (property(get=GetActive)) bool Active | |
Gets the GATT server state. | |
CwclGattServerClient * | GetClients (const size_t Index) const |
Gets the GATT server client by its index. | |
__declspec (property(get=GetClients)) CwclGattServerClient *Clients[] | |
Gets the GATT server client by its index. | |
size_t | GetClientsCount () const |
Gets the clients count. | |
__declspec (property(get=GetClientsCount)) size_t ClientsCount | |
Gets the clients count. | |
CwclBluetoothRadio * | GetRadio () const |
Gets the connection owner. | |
__declspec (property(get=GetRadio)) CwclBluetoothRadio *Radio | |
Gets the connection owner. | |
CwclGattLocalService * | GetServices (const size_t Index) const |
Gets the local GATT service by its index. | |
__declspec (property(get=GetServices)) CwclGattLocalService *Services[] | |
Gets the local GATT service by its index. | |
size_t | GetServicesCount () const |
Gets the services count. | |
__declspec (property(get=GetServicesCount)) size_t ServicesCount | |
Gets the services count. | |
__event void | OnClientConnected (void *Sender, CwclGattServerClient *const Client) |
The event fires when a client connected to the server. | |
__event void | OnClientDisconnected (void *Sender, CwclGattServerClient *const Client) |
The event fires when a client disconnected from the server. | |
__event void | OnConnectionParamsChanged (void *Sender, CwclGattServerClient *const Client) |
The event fires when the connection parameters changed. | |
__event void | OnConnectionPhyChanged (void *Sender, CwclGattServerClient *const Client) |
The event fires when the connection PHY changed. | |
__event void | OnMaxPduSizeChanged (void *Sender, CwclGattServerClient *const Client) |
The event fires when maximum PDU size changed for the connected client. | |
__event void | OnNotificationSizeChanged (void *Sender, CwclGattServerClient *const Client) |
The event fires when a maximum notification size of a subscribed client has been changed. | |
__event void | OnRead (void *Sender, CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic, CwclGattLocalCharacteristicReadRequest *const Request) |
The event fires when a remote GATT client requests characteristic's data read. | |
__event void | OnStarted (void *Sender) |
The event fires when the Bluetooth LE GATT Server has been successfully started. | |
__event void | OnStopped (void *Sender) |
The event fires when the Bluetooth LE GATT Server has been stopped. | |
__event void | OnSubscribed (void *Sender, CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic) |
The event fires when a remote GATT client subscribes to the characteristic changes notifications or indications. | |
__event void | OnUnsubscribed (void *Sender, CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic) |
The event fires when a remote GATT client unsubscribes from the characteristic changes notifications or indications. | |
__event void | OnWrite (void *Sender, CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic, CwclGattLocalCharacteristicWriteRequest *const Request) |
The event fires when a remote device writes data to the characteristic. | |
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 | |
virtual void | MessageReceived (const CwclMessage *const Message) |
The method called when a new notification message received. | |
virtual void | DoClientConnected (CwclGattServerClient *const Client) |
Fires the OnClientConnected event. | |
virtual void | DoClientDisconnected (CwclGattServerClient *const Client) |
Fires the OnClientDisconnected event. | |
virtual void | DoConnectionParamsChanged (CwclGattServerClient *const Client) |
Fires the OnConnectionParamsChanged event. | |
virtual void | DoConnectionPhyChanged (CwclGattServerClient *const Client) |
Fires the OnConnectionPhyChanged event. | |
virtual void | DoMaxPduSizeChanged (CwclGattServerClient *const Client) |
Fires the OnMaxPduSizeChanged event. | |
virtual void | DoNotificationSizeChanged (CwclGattServerClient *const Client) |
Fires the OnNotificationSizeChanged event. | |
virtual void | DoRead (CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic, CwclGattLocalCharacteristicReadRequest *const Request) |
Fires the OnRead event. | |
virtual void | DoStarted () |
Fires the OnStarted event. | |
virtual void | DoStopped () |
Fires the OnStopped event. | |
virtual void | DoSubscribed (CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic) |
Fires the OnSubscribed event. | |
virtual void | DoUnsubscribed (CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic) |
Fires the OnUnsubscribed event. | |
virtual void | DoWrite (CwclGattServerClient *const Client, CwclGattLocalCharacteristic *const Characteristic, CwclGattLocalCharacteristicWriteRequest *const Request) |
Fires the OnWrite event. | |
virtual int | HalInitialize ()=0 |
Implements a driver specific code to initialize Bluetooth LE GATT Server. | |
virtual int | HalUninitialize ()=0 |
Implements a driver specific code to uninitialize Bluetooth LE GATT Server. | |
virtual int | HalCreateService (const wclGattUuid &Uuid, CwclGattLocalService *&Service)=0 |
Creates a driver specific local GATT service object. | |
virtual CwclGattServerClient * | HalCreateClient (const __int64 Address)=0 |
Creates a driver specific GATT server client object. | |
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 "virtual" connection for the Bluetooth GATT Server.
An application must not create or use this class directly. Instead of that an application must use high-level Bluetooth components.