Ganesh Ganapathi Batta | fefb334 | 2013-02-05 15:23:45 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | |
| 18 | #ifndef ANDROID_INCLUDE_BT_GATT_TYPES_H |
| 19 | #define ANDROID_INCLUDE_BT_GATT_TYPES_H |
| 20 | |
| 21 | #include <stdint.h> |
| 22 | #include <stdbool.h> |
| 23 | |
| 24 | __BEGIN_DECLS |
| 25 | |
| 26 | /** |
| 27 | * GATT Service types |
| 28 | */ |
| 29 | #define BTGATT_SERVICE_TYPE_PRIMARY 0 |
| 30 | #define BTGATT_SERVICE_TYPE_SECONDARY 1 |
| 31 | |
Andre Eisenbach | 02223d1 | 2013-07-09 00:02:48 -0700 | [diff] [blame] | 32 | /** GATT ID adding instance id tracking to the UUID */ |
Ganesh Ganapathi Batta | fefb334 | 2013-02-05 15:23:45 -0800 | [diff] [blame] | 33 | typedef struct |
| 34 | { |
| 35 | bt_uuid_t uuid; |
| 36 | uint8_t inst_id; |
Andre Eisenbach | 02223d1 | 2013-07-09 00:02:48 -0700 | [diff] [blame] | 37 | } btgatt_gatt_id_t; |
Ganesh Ganapathi Batta | fefb334 | 2013-02-05 15:23:45 -0800 | [diff] [blame] | 38 | |
| 39 | /** GATT Service ID also identifies the service type (primary/secondary) */ |
| 40 | typedef struct |
| 41 | { |
Andre Eisenbach | 02223d1 | 2013-07-09 00:02:48 -0700 | [diff] [blame] | 42 | btgatt_gatt_id_t id; |
Ganesh Ganapathi Batta | fefb334 | 2013-02-05 15:23:45 -0800 | [diff] [blame] | 43 | uint8_t is_primary; |
| 44 | } btgatt_srvc_id_t; |
| 45 | |
Ganesh Ganapathi Batta | f9f4d10 | 2014-04-18 10:02:49 -0700 | [diff] [blame] | 46 | /** Preferred physical Transport for GATT connection */ |
| 47 | typedef enum |
| 48 | { |
| 49 | GATT_TRANSPORT_AUTO, |
| 50 | GATT_TRANSPORT_BREDR, |
| 51 | GATT_TRANSPORT_LE |
| 52 | } btgatt_transport_t; |
| 53 | |
Ganesh Ganapathi Batta | fefb334 | 2013-02-05 15:23:45 -0800 | [diff] [blame] | 54 | __END_DECLS |
| 55 | |
| 56 | #endif /* ANDROID_INCLUDE_BT_GATT_TYPES_H */ |