Bluetooth Framework C++ Edition
Public Member Functions | Protected Member Functions | List of all members
CwclGattLocalService Class Referenceabstract

This class represents a local GATT service. More...

#include <wclBluetooth.h>

Inheritance diagram for CwclGattLocalService:
CwclGattLocalAttribute

Public Member Functions

 CwclGattLocalService (CwclGattServerConnection *const Server, const wclGattUuid &Uuid)
 Creates new Local GATT service.
 
virtual ~CwclGattLocalService ()
 Frees the object.
 
int AddCharacteristic (const wclGattUuid &Uuid, const wclGattLocalCharacteristicParameters &Params, CwclGattLocalCharacteristic *&Characteristic)
 Creates new characteristic and adds it to the service characteristics list.
 
int ClearCharacteristics ()
 Clears the characteristics list.
 
int DeleteCharacteristic (const size_t Index)
 Deletes the characteristic with given index.
 
bool GetConnectable () const
 Gets a boolean that indicates if the GATT service is connectable.
 
void SetConnectable (const bool Value)
 Sets a boolean that indicates if the GATT service is connectable.
 
 __declspec (property(get=GetConnectable, put=SetConnectable)) bool Connectable
 Gets or sets a boolean that indicates if the GATT service is connectable.
 
bool GetDiscoverable () const
 Gets a boolean indicating that the GATT service is discoverable.
 
void SetDiscoverable (const bool Value)
 Sets a boolean indicating that the GATT service is discoverable.
 
 __declspec (property(get=GetDiscoverable, put=SetDiscoverable)) bool Discoverable
 Gets or sets a boolean indicating that the GATT service is discoverable.
 
bool GetAdded () const
 Gets the service state.
 
 __declspec (property(get=GetAdded)) bool Added
 Gets the service state.
 
CwclGattLocalCharacteristicGetCharacteristics (const size_t Index) const
 Gets the GATT characteristic by its index.
 
 __declspec (property(get=GetCharacteristics)) CwclGattLocalCharacteristic *Characteristics[]
 Gets the GATT characteristic by its index.
 
size_t GetCharacteristicsCount () const
 Gets the characteristics count.
 
 __declspec (property(get=GetCharacteristicsCount)) size_t CharacteristicsCount
 Gets the characteristics count.
 
int GetError () const
 Gets the service's publishing result code.
 
 __declspec (property(get=GetError)) int Error
 Gets the service's publishing result code.
 
CwclGattServerConnectionGetServer () const
 Gets the GATT server object that owns the service.
 
 __declspec (property(get=GetServer)) CwclGattServerConnection *Server
 Gets the GATT server object that owns the service.
 
- Public Member Functions inherited from CwclGattLocalAttribute
 CwclGattLocalAttribute (const wclGattUuid &Uuid)
 Creates new local GATT attribute.
 
virtual ~CwclGattLocalAttribute ()
 Frees the object.
 
wclGattUuid GetUuid () const
 Gets the attribute's UUID.
 
 __declspec (property(get=GetUuid)) wclGattUuid Uuid
 Gets the attribute's UUID.
 

Protected Member Functions

virtual int HalAdd ()=0
 The method implements a driver specific code to add local GATT service to the GATT server.
 
virtual int HalCreate ()=0
 The method implements a driver specific code to create local GATT service to the GATT server.
 
virtual int HalDestroy ()=0
 The method implements a driver specific code to destroy local GATT service from the GATT server.
 
virtual int HalRemove ()=0
 The method implements a driver specific code to remove local GATT service from the GATT server.
 
virtual int HalCreateCharacteristic (const wclGattUuid &Uuid, const wclGattLocalCharacteristicParameters &Params, CwclGattLocalCharacteristic *&Characteristic)=0
 The function creates a driver specific GATT characteristic object.
 
- Protected Member Functions inherited from CwclGattLocalAttribute
void Enter () const
 Enters the GATT local attribute protection critical section.
 
void Leave () const
 Leaves the GATT local attribute protection critical section.
 

Detailed Description

This class represents a local GATT service.

An application must not create or destroy this class directly. Instead of that an application must use methods of the CwclGattServerConnection classes.

See also
CwclGattLocalAttribute