Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c317800 authored by Mehdi Alizadeh's avatar Mehdi Alizadeh Committed by Gerrit Code Review
Browse files

Merge changes from topic "revert-1402170-LQAXZAXPCC"

* changes:
  Revert "Unused def include/hardware/bt_gatt_types::btgatt_transp..."
  Revert "Removed unused file include/hardware/bt_gatt_types.h"
parents 1e1b344e 67229057
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <stdint.h>
#include <vector>
#include "bt_common_types.h"
#include "bt_gatt_types.h"

struct AdvertiseParameters {
  uint16_t advertising_event_properties;
+2 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <vector>
#include "bt_common_types.h"
#include "bt_gatt_client.h"
#include "bt_gatt_types.h"

/** Callback invoked when batchscan reports are obtained */
typedef void (*batchscan_reports_callback)(int client_if, int status,
+9 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <stdint.h>
#include <vector>
#include "bt_common_types.h"
#include "bt_gatt_types.h"

#include <bluetooth/uuid.h>

@@ -45,6 +46,14 @@ typedef struct {
  uint8_t status;
} btgatt_read_params_t;

/** Parameters for GATT write operations */
typedef struct {
  btgatt_srvc_id_t srvc_id;
  btgatt_gatt_id_t char_id;
  btgatt_gatt_id_t descr_id;
  uint8_t status;
} btgatt_write_params_t;

/** Attribute change notification parameters */
typedef struct {
  uint8_t value[BTGATT_MAX_ATTR_LEN];
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@
#include <stdint.h>
#include <vector>

#include "bt_gatt_types.h"

__BEGIN_DECLS

/** GATT value type used in response to remote read requests */
+54 −0
Original line number Diff line number Diff line
/*
 * 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 <stdbool.h>
#include <stdint.h>

#include <bluetooth/uuid.h>

__BEGIN_DECLS

/**
 * GATT Service types
 */
#define BTGATT_SERVICE_TYPE_PRIMARY 0
#define BTGATT_SERVICE_TYPE_SECONDARY 1

/** GATT ID adding instance id tracking to the UUID */
typedef struct {
  bluetooth::Uuid uuid;
  uint8_t inst_id;
} btgatt_gatt_id_t;

/** GATT Service ID also identifies the service type (primary/secondary) */
typedef struct {
  btgatt_gatt_id_t id;
  uint8_t is_primary;
} btgatt_srvc_id_t;

/** Preferred physical Transport for GATT connection */
typedef enum {
  GATT_TRANSPORT_AUTO,
  GATT_TRANSPORT_BREDR,
  GATT_TRANSPORT_LE
} btgatt_transport_t;

__END_DECLS

#endif /* ANDROID_INCLUDE_BT_GATT_TYPES_H */
Loading