1 /*
2 * Copyright (C) 2024 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 "ParameterParser.h"
18
19 #define LOG_TAG "Audio_ParameterParser"
20 #include <android-base/logging.h>
21
22 namespace vendor::audio::parserservice {
23
24 using ::aidl::android::hardware::audio::core::VendorParameter;
25 using ParameterScope = ::aidl::android::media::audio::IHalAdapterVendorExtension::ParameterScope;
26
parseVendorParameterIds(ParameterScope in_scope,const std::string & in_rawKeys,std::vector<std::string> *)27 ::ndk::ScopedAStatus ParameterParser::parseVendorParameterIds(ParameterScope in_scope,
28 const std::string& in_rawKeys,
29 std::vector<std::string>*) {
30 LOG(DEBUG) << __func__ << ": scope: " << toString(in_scope) << ", keys: " << in_rawKeys;
31 return ::ndk::ScopedAStatus::ok();
32 }
33
parseVendorParameters(ParameterScope in_scope,const std::string & in_rawKeysAndValues,std::vector<VendorParameter> *,std::vector<VendorParameter> *)34 ::ndk::ScopedAStatus ParameterParser::parseVendorParameters(ParameterScope in_scope,
35 const std::string& in_rawKeysAndValues,
36 std::vector<VendorParameter>*,
37 std::vector<VendorParameter>*) {
38 LOG(DEBUG) << __func__ << ": scope: " << toString(in_scope)
39 << ", keys/values: " << in_rawKeysAndValues;
40 return ::ndk::ScopedAStatus::ok();
41 }
42
parseBluetoothA2dpReconfigureOffload(const std::string & in_rawValue,std::vector<VendorParameter> *)43 ::ndk::ScopedAStatus ParameterParser::parseBluetoothA2dpReconfigureOffload(
44 const std::string& in_rawValue, std::vector<VendorParameter>*) {
45 LOG(DEBUG) << __func__ << ": value: " << in_rawValue;
46 return ::ndk::ScopedAStatus::ok();
47 }
48
parseBluetoothLeReconfigureOffload(const std::string & in_rawValue,std::vector<VendorParameter> *)49 ::ndk::ScopedAStatus ParameterParser::parseBluetoothLeReconfigureOffload(
50 const std::string& in_rawValue, std::vector<VendorParameter>*) {
51 LOG(DEBUG) << __func__ << ": value: " << in_rawValue;
52 return ::ndk::ScopedAStatus::ok();
53 }
54
processVendorParameters(ParameterScope in_scope,const std::vector<VendorParameter> & in_parameters,std::string *)55 ::ndk::ScopedAStatus ParameterParser::processVendorParameters(
56 ParameterScope in_scope, const std::vector<VendorParameter>& in_parameters, std::string*) {
57 LOG(DEBUG) << __func__ << ": scope: " << toString(in_scope)
58 << ", parameters: " << ::android::internal::ToString(in_parameters);
59 return ::ndk::ScopedAStatus::ok();
60 }
61
62 } // namespace vendor::audio::parserservice
63