Minor temporary patch to allow DFU packet callback

Fork of BLE_API by Bluetooth Low Energy

GattService.h

Committer:
ktownsend
Date:
2013-12-17
Revision:
11:200931be5617
Parent:
2:ffc5216bd2cc
Child:
23:f19c60478e1b

File content as of revision 11:200931be5617:

#ifndef __GATT_SERVICE_H__
#define __GATT_SERVICE_H__

#include "blecommon.h"
#include "uuid.h"
#include "GattCharacteristic.h"

#define BLE_SERVICE_MAX_CHARACTERISTICS (5)

class GattService
{
private:

public:
    typedef struct
    {
        uint16_t    id;
        uint16_t    lenMin;
        uint16_t    lenMax;
        uint8_t     properties;
        uint8_t     reserved;
    } serialisedChar_t;
    
    GattService(uint8_t[16]);  /* 128-bit Base UUID */
    GattService(uint16_t);     /* 16-bit BLE UUID */
    virtual ~GattService(void);

    UUID                primaryServiceID;
    uint8_t             characteristicCount;
    serialisedChar_t    characteristics[BLE_SERVICE_MAX_CHARACTERISTICS];
    uint8_t             handle;

    ble_error_t         addCharacteristic(GattCharacteristic &);
};

#endif