1*ec779b8eSAndroid Build Coastguard Worker /*
2*ec779b8eSAndroid Build Coastguard Worker * Copyright (C) 2024 The Android Open Source Project
3*ec779b8eSAndroid Build Coastguard Worker *
4*ec779b8eSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License");
5*ec779b8eSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License.
6*ec779b8eSAndroid Build Coastguard Worker * You may obtain a copy of the License at
7*ec779b8eSAndroid Build Coastguard Worker *
8*ec779b8eSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0
9*ec779b8eSAndroid Build Coastguard Worker *
10*ec779b8eSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software
11*ec779b8eSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS,
12*ec779b8eSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*ec779b8eSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and
14*ec779b8eSAndroid Build Coastguard Worker * limitations under the License.
15*ec779b8eSAndroid Build Coastguard Worker */
16*ec779b8eSAndroid Build Coastguard Worker
17*ec779b8eSAndroid Build Coastguard Worker #include "ParameterParser.h"
18*ec779b8eSAndroid Build Coastguard Worker
19*ec779b8eSAndroid Build Coastguard Worker #define LOG_TAG "Audio_ParameterParser"
20*ec779b8eSAndroid Build Coastguard Worker #include <android-base/logging.h>
21*ec779b8eSAndroid Build Coastguard Worker
22*ec779b8eSAndroid Build Coastguard Worker namespace vendor::audio::parserservice {
23*ec779b8eSAndroid Build Coastguard Worker
24*ec779b8eSAndroid Build Coastguard Worker using ::aidl::android::hardware::audio::core::VendorParameter;
25*ec779b8eSAndroid Build Coastguard Worker using ParameterScope = ::aidl::android::media::audio::IHalAdapterVendorExtension::ParameterScope;
26*ec779b8eSAndroid Build Coastguard Worker
parseVendorParameterIds(ParameterScope in_scope,const std::string & in_rawKeys,std::vector<std::string> *)27*ec779b8eSAndroid Build Coastguard Worker ::ndk::ScopedAStatus ParameterParser::parseVendorParameterIds(ParameterScope in_scope,
28*ec779b8eSAndroid Build Coastguard Worker const std::string& in_rawKeys,
29*ec779b8eSAndroid Build Coastguard Worker std::vector<std::string>*) {
30*ec779b8eSAndroid Build Coastguard Worker LOG(DEBUG) << __func__ << ": scope: " << toString(in_scope) << ", keys: " << in_rawKeys;
31*ec779b8eSAndroid Build Coastguard Worker return ::ndk::ScopedAStatus::ok();
32*ec779b8eSAndroid Build Coastguard Worker }
33*ec779b8eSAndroid Build Coastguard Worker
parseVendorParameters(ParameterScope in_scope,const std::string & in_rawKeysAndValues,std::vector<VendorParameter> *,std::vector<VendorParameter> *)34*ec779b8eSAndroid Build Coastguard Worker ::ndk::ScopedAStatus ParameterParser::parseVendorParameters(ParameterScope in_scope,
35*ec779b8eSAndroid Build Coastguard Worker const std::string& in_rawKeysAndValues,
36*ec779b8eSAndroid Build Coastguard Worker std::vector<VendorParameter>*,
37*ec779b8eSAndroid Build Coastguard Worker std::vector<VendorParameter>*) {
38*ec779b8eSAndroid Build Coastguard Worker LOG(DEBUG) << __func__ << ": scope: " << toString(in_scope)
39*ec779b8eSAndroid Build Coastguard Worker << ", keys/values: " << in_rawKeysAndValues;
40*ec779b8eSAndroid Build Coastguard Worker return ::ndk::ScopedAStatus::ok();
41*ec779b8eSAndroid Build Coastguard Worker }
42*ec779b8eSAndroid Build Coastguard Worker
parseBluetoothA2dpReconfigureOffload(const std::string & in_rawValue,std::vector<VendorParameter> *)43*ec779b8eSAndroid Build Coastguard Worker ::ndk::ScopedAStatus ParameterParser::parseBluetoothA2dpReconfigureOffload(
44*ec779b8eSAndroid Build Coastguard Worker const std::string& in_rawValue, std::vector<VendorParameter>*) {
45*ec779b8eSAndroid Build Coastguard Worker LOG(DEBUG) << __func__ << ": value: " << in_rawValue;
46*ec779b8eSAndroid Build Coastguard Worker return ::ndk::ScopedAStatus::ok();
47*ec779b8eSAndroid Build Coastguard Worker }
48*ec779b8eSAndroid Build Coastguard Worker
parseBluetoothLeReconfigureOffload(const std::string & in_rawValue,std::vector<VendorParameter> *)49*ec779b8eSAndroid Build Coastguard Worker ::ndk::ScopedAStatus ParameterParser::parseBluetoothLeReconfigureOffload(
50*ec779b8eSAndroid Build Coastguard Worker const std::string& in_rawValue, std::vector<VendorParameter>*) {
51*ec779b8eSAndroid Build Coastguard Worker LOG(DEBUG) << __func__ << ": value: " << in_rawValue;
52*ec779b8eSAndroid Build Coastguard Worker return ::ndk::ScopedAStatus::ok();
53*ec779b8eSAndroid Build Coastguard Worker }
54*ec779b8eSAndroid Build Coastguard Worker
processVendorParameters(ParameterScope in_scope,const std::vector<VendorParameter> & in_parameters,std::string *)55*ec779b8eSAndroid Build Coastguard Worker ::ndk::ScopedAStatus ParameterParser::processVendorParameters(
56*ec779b8eSAndroid Build Coastguard Worker ParameterScope in_scope, const std::vector<VendorParameter>& in_parameters, std::string*) {
57*ec779b8eSAndroid Build Coastguard Worker LOG(DEBUG) << __func__ << ": scope: " << toString(in_scope)
58*ec779b8eSAndroid Build Coastguard Worker << ", parameters: " << ::android::internal::ToString(in_parameters);
59*ec779b8eSAndroid Build Coastguard Worker return ::ndk::ScopedAStatus::ok();
60*ec779b8eSAndroid Build Coastguard Worker }
61*ec779b8eSAndroid Build Coastguard Worker
62*ec779b8eSAndroid Build Coastguard Worker } // namespace vendor::audio::parserservice
63