summaryrefslogtreecommitdiffstats
path: root/include/hardware/bt_gatt_types.h
diff options
context:
space:
mode:
authorGanesh Ganapathi Batta <ganeshg@broadcom.com>2013-02-05 15:23:45 -0800
committerMatthew Xie <mattx@google.com>2013-02-27 18:14:00 -0800
commitfefb3343906fe73c827d1b9d50cb3c451602c514 (patch)
treeef5822b437061769289b08ae98fd1903dde55e5f /include/hardware/bt_gatt_types.h
parenta0ed4bead4d7a9b9031f7cefe0ef49a951443461 (diff)
downloadhardware_libhardware-fefb3343906fe73c827d1b9d50cb3c451602c514.zip
hardware_libhardware-fefb3343906fe73c827d1b9d50cb3c451602c514.tar.gz
hardware_libhardware-fefb3343906fe73c827d1b9d50cb3c451602c514.tar.bz2
Initial version of BLE support for Bluedroid
Change-Id: Iacf3a56943b31c4fd4f4b833ed675a35cbd47104
Diffstat (limited to 'include/hardware/bt_gatt_types.h')
-rw-r--r--include/hardware/bt_gatt_types.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/include/hardware/bt_gatt_types.h b/include/hardware/bt_gatt_types.h
new file mode 100644
index 0000000..fee9bb5
--- /dev/null
+++ b/include/hardware/bt_gatt_types.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_INCLUDE_BT_GATT_TYPES_H
+#define ANDROID_INCLUDE_BT_GATT_TYPES_H
+
+#include <stdint.h>
+#include <stdbool.h>
+
+__BEGIN_DECLS
+
+/**
+ * GATT Service types
+ */
+#define BTGATT_SERVICE_TYPE_PRIMARY 0
+#define BTGATT_SERVICE_TYPE_SECONDARY 1
+
+/** GATT Characteristic ID adding instance id tracking to the UUID */
+typedef struct
+{
+ bt_uuid_t uuid;
+ uint8_t inst_id;
+} btgatt_char_id_t;
+
+/** GATT Service ID also identifies the service type (primary/secondary) */
+typedef struct
+{
+ btgatt_char_id_t id;
+ uint8_t is_primary;
+} btgatt_srvc_id_t;
+
+__END_DECLS
+
+#endif /* ANDROID_INCLUDE_BT_GATT_TYPES_H */