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

Commit e673a9ec authored by Hui Peng's avatar Hui Peng
Browse files

[Invisalign2] Move tREMOTE_VERSION_INFO type def to system/types

Bug: 301661850
Test: mma packages/modules/Bluetooth
Change-Id: Ibe82a0866ce40f86327ee890d648c0643948b1d2
parent 3ea33be1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include "types/bt_transport.h"
#include "types/hci_role.h"
#include "types/raw_address.h"
#include "types/remote_version_type.h"

enum btm_acl_encrypt_state_t {
  BTM_ACL_ENCRYPT_STATE_IDLE = 0,
+1 −1
Original line number Diff line number Diff line
@@ -29,13 +29,13 @@
#include "stack/include/bt_device_type.h"
#include "stack/include/bt_name.h"
#include "stack/include/bt_octets.h"
#include "stack/include/btm_api_types.h"
#include "stack/include/btm_sec_api_types.h"
#include "stack/include/btm_status.h"
#include "stack/include/hci_error_code.h"
#include "types/ble_address_with_type.h"
#include "types/hci_role.h"
#include "types/raw_address.h"
#include "types/remote_version_type.h"

typedef struct {
  uint16_t min_conn_int;
+0 −14
Original line number Diff line number Diff line
@@ -377,18 +377,4 @@ typedef uint8_t tBTM_CONTRL_STATE;
// Bluetooth Quality Report - Report receiver
typedef void(tBTM_BT_QUALITY_REPORT_RECEIVER)(uint8_t len,
                                              const uint8_t* p_stream);

struct tREMOTE_VERSION_INFO {
  uint8_t lmp_version{0};
  uint16_t lmp_subversion{0};
  uint16_t manufacturer{0};
  bool valid{false};
  std::string ToString() const {
    return (valid) ? base::StringPrintf("%02hhu-%05hu-%05hu", lmp_version,
                                        lmp_subversion, manufacturer)
                   : std::string("UNKNOWN");
  }
};
using remote_version_info = tREMOTE_VERSION_INFO;

#endif  // BTM_API_TYPES_H
+38 −0
Original line number Diff line number Diff line
/*
 *
 * Copyright 2023 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.
 *
 */

#pragma once

#include <base/strings/stringprintf.h>

#include <cstdint>
#include <string>

struct tREMOTE_VERSION_INFO {
  uint8_t lmp_version{0};
  uint16_t lmp_subversion{0};
  uint16_t manufacturer{0};
  bool valid{false};
  std::string ToString() const {
    return (valid) ? base::StringPrintf("%02hhu-%05hu-%05hu", lmp_version,
                                        lmp_subversion, manufacturer)
                   : std::string("UNKNOWN");
  }
};

using remote_version_info = tREMOTE_VERSION_INFO;
 No newline at end of file