Bill Schilit / BLE_API

Fork of BLE_API by Bluetooth Low Energy

Committer:
ktownsend
Date:
Thu Jan 09 11:03:10 2014 +0000
Revision:
27:4a83843f04b0
Parent:
23:f19c60478e1b
Child:
29:011e95ce78b8
Matching file names and apache headers

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ktownsend 27:4a83843f04b0 1 /* mbed Microcontroller Library
ktownsend 27:4a83843f04b0 2 * Copyright (c) 2006-2013 ARM Limited
ktownsend 27:4a83843f04b0 3 *
ktownsend 27:4a83843f04b0 4 * Licensed under the Apache License, Version 2.0 (the "License");
ktownsend 27:4a83843f04b0 5 * you may not use this file except in compliance with the License.
ktownsend 27:4a83843f04b0 6 * You may obtain a copy of the License at
ktownsend 27:4a83843f04b0 7 *
ktownsend 27:4a83843f04b0 8 * http://www.apache.org/licenses/LICENSE-2.0
ktownsend 27:4a83843f04b0 9 *
ktownsend 27:4a83843f04b0 10 * Unless required by applicable law or agreed to in writing, software
ktownsend 27:4a83843f04b0 11 * distributed under the License is distributed on an "AS IS" BASIS,
ktownsend 27:4a83843f04b0 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ktownsend 27:4a83843f04b0 13 * See the License for the specific language governing permissions and
ktownsend 27:4a83843f04b0 14 * limitations under the License.
ktownsend 27:4a83843f04b0 15 */
ktownsend 27:4a83843f04b0 16
ktownsend 27:4a83843f04b0 17
ktownsend 2:ffc5216bd2cc 18 #ifndef __GATT_SERVICE_H__
ktownsend 2:ffc5216bd2cc 19 #define __GATT_SERVICE_H__
ktownsend 2:ffc5216bd2cc 20
ktownsend 2:ffc5216bd2cc 21 #include "blecommon.h"
ktownsend 27:4a83843f04b0 22 #include "UUID.h"
ktownsend 2:ffc5216bd2cc 23 #include "GattCharacteristic.h"
ktownsend 2:ffc5216bd2cc 24
ktownsend 2:ffc5216bd2cc 25 #define BLE_SERVICE_MAX_CHARACTERISTICS (5)
ktownsend 2:ffc5216bd2cc 26
ktownsend 2:ffc5216bd2cc 27 class GattService
ktownsend 2:ffc5216bd2cc 28 {
ktownsend 2:ffc5216bd2cc 29 private:
ktownsend 2:ffc5216bd2cc 30
ktownsend 2:ffc5216bd2cc 31 public:
ktownsend 2:ffc5216bd2cc 32 GattService(uint8_t[16]); /* 128-bit Base UUID */
ktownsend 2:ffc5216bd2cc 33 GattService(uint16_t); /* 16-bit BLE UUID */
ktownsend 2:ffc5216bd2cc 34 virtual ~GattService(void);
ktownsend 2:ffc5216bd2cc 35
ktownsend 2:ffc5216bd2cc 36 UUID primaryServiceID;
ktownsend 2:ffc5216bd2cc 37 uint8_t characteristicCount;
ktownsend 23:f19c60478e1b 38 GattCharacteristic characteristics[BLE_SERVICE_MAX_CHARACTERISTICS];
ktownsend 11:200931be5617 39 uint8_t handle;
ktownsend 2:ffc5216bd2cc 40
ktownsend 2:ffc5216bd2cc 41 ble_error_t addCharacteristic(GattCharacteristic &);
ktownsend 2:ffc5216bd2cc 42 };
ktownsend 2:ffc5216bd2cc 43
ktownsend 2:ffc5216bd2cc 44 #endif