Blame android/hardware/bt_gatt_types.h
|
Packit |
34410b |
/*
|
|
Packit |
34410b |
* Copyright (C) 2013 The Android Open Source Project
|
|
Packit |
34410b |
*
|
|
Packit |
34410b |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
Packit |
34410b |
* you may not use this file except in compliance with the License.
|
|
Packit |
34410b |
* You may obtain a copy of the License at
|
|
Packit |
34410b |
*
|
|
Packit |
34410b |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit |
34410b |
*
|
|
Packit |
34410b |
* Unless required by applicable law or agreed to in writing, software
|
|
Packit |
34410b |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
Packit |
34410b |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
Packit |
34410b |
* See the License for the specific language governing permissions and
|
|
Packit |
34410b |
* limitations under the License.
|
|
Packit |
34410b |
*/
|
|
Packit |
34410b |
|
|
Packit |
34410b |
|
|
Packit |
34410b |
#ifndef ANDROID_INCLUDE_BT_GATT_TYPES_H
|
|
Packit |
34410b |
#define ANDROID_INCLUDE_BT_GATT_TYPES_H
|
|
Packit |
34410b |
|
|
Packit |
34410b |
#include <stdint.h>
|
|
Packit |
34410b |
#include <stdbool.h>
|
|
Packit |
34410b |
|
|
Packit |
34410b |
__BEGIN_DECLS
|
|
Packit |
34410b |
|
|
Packit |
34410b |
/**
|
|
Packit |
34410b |
* GATT Service types
|
|
Packit |
34410b |
*/
|
|
Packit |
34410b |
#define BTGATT_SERVICE_TYPE_PRIMARY 0
|
|
Packit |
34410b |
#define BTGATT_SERVICE_TYPE_SECONDARY 1
|
|
Packit |
34410b |
|
|
Packit |
34410b |
/** GATT ID adding instance id tracking to the UUID */
|
|
Packit |
34410b |
typedef struct
|
|
Packit |
34410b |
{
|
|
Packit |
34410b |
bt_uuid_t uuid;
|
|
Packit |
34410b |
uint8_t inst_id;
|
|
Packit |
34410b |
} btgatt_gatt_id_t;
|
|
Packit |
34410b |
|
|
Packit |
34410b |
/** GATT Service ID also identifies the service type (primary/secondary) */
|
|
Packit |
34410b |
typedef struct
|
|
Packit |
34410b |
{
|
|
Packit |
34410b |
btgatt_gatt_id_t id;
|
|
Packit |
34410b |
uint8_t is_primary;
|
|
Packit |
34410b |
} btgatt_srvc_id_t;
|
|
Packit |
34410b |
|
|
Packit |
34410b |
/** Preferred physical Transport for GATT connection */
|
|
Packit |
34410b |
typedef enum
|
|
Packit |
34410b |
{
|
|
Packit |
34410b |
GATT_TRANSPORT_AUTO,
|
|
Packit |
34410b |
GATT_TRANSPORT_BREDR,
|
|
Packit |
34410b |
GATT_TRANSPORT_LE
|
|
Packit |
34410b |
} btgatt_transport_t;
|
|
Packit |
34410b |
|
|
Packit |
34410b |
__END_DECLS
|
|
Packit |
34410b |
|
|
Packit |
34410b |
#endif /* ANDROID_INCLUDE_BT_GATT_TYPES_H */
|