• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2021 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 #include "hal_version_manager.h"
18 
19 namespace bluetooth {
20 namespace audio {
21 
22 const BluetoothAudioHalVersion BluetoothAudioHalVersion::VERSION_UNAVAILABLE =
23         BluetoothAudioHalVersion();
24 const BluetoothAudioHalVersion BluetoothAudioHalVersion::VERSION_2_0 =
25         BluetoothAudioHalVersion(BluetoothAudioHalTransport::HIDL, 2, 0);
26 const BluetoothAudioHalVersion BluetoothAudioHalVersion::VERSION_2_1 =
27         BluetoothAudioHalVersion(BluetoothAudioHalTransport::HIDL, 2, 1);
28 const BluetoothAudioHalVersion BluetoothAudioHalVersion::VERSION_AIDL_V1 =
29         BluetoothAudioHalVersion(BluetoothAudioHalTransport::AIDL, 1, 0);
30 const BluetoothAudioHalVersion BluetoothAudioHalVersion::VERSION_AIDL_V2 =
31         BluetoothAudioHalVersion(BluetoothAudioHalTransport::AIDL, 2, 0);
32 const BluetoothAudioHalVersion BluetoothAudioHalVersion::VERSION_AIDL_V3 =
33         BluetoothAudioHalVersion(BluetoothAudioHalTransport::AIDL, 3, 0);
34 const BluetoothAudioHalVersion BluetoothAudioHalVersion::VERSION_AIDL_V4 =
35         BluetoothAudioHalVersion(BluetoothAudioHalTransport::AIDL, 4, 0);
36 
37 std::unique_ptr<HalVersionManager> HalVersionManager::instance_ptr = nullptr;
38 
GetHalVersion()39 BluetoothAudioHalVersion HalVersionManager::GetHalVersion() {
40   return BluetoothAudioHalVersion::VERSION_UNAVAILABLE;
41 }
42 
GetHalTransport()43 BluetoothAudioHalTransport HalVersionManager::GetHalTransport() {
44   return BluetoothAudioHalTransport::UNKNOWN;
45 }
46 
GetProvidersFactory_2_1()47 android::sp<IBluetoothAudioProvidersFactory_2_1> HalVersionManager::GetProvidersFactory_2_1() {
48   return nullptr;
49 }
50 
GetProvidersFactory_2_0()51 android::sp<IBluetoothAudioProvidersFactory_2_0> HalVersionManager::GetProvidersFactory_2_0() {
52   return nullptr;
53 }
54 
HalVersionManager()55 HalVersionManager::HalVersionManager() {
56   hal_version_ = BluetoothAudioHalVersion::VERSION_UNAVAILABLE;
57   hal_transport_ = BluetoothAudioHalTransport::UNKNOWN;
58 }
59 
60 }  // namespace audio
61 }  // namespace bluetooth
62