2 * Copyright (C) 2016 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 #ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_0_UTILS_H
17 #define ANDROID_HARDWARE_BROADCASTRADIO_V1_0_UTILS_H
19 #include <android/hardware/broadcastradio/1.0/types.h>
20 #include <hardware/radio.h>
24 namespace broadcastradio {
26 namespace implementation {
30 static const char * getClassString(Class ClassId);
31 static Result convertHalResult(int rc);
32 static void convertBandConfigFromHal(BandConfig *config,
33 const radio_hal_band_config_t *halConfig);
34 static void convertPropertiesFromHal(Properties *properties,
35 const radio_hal_properties_t *halProperties);
36 static void convertBandConfigToHal(radio_hal_band_config_t *halConfig,
37 const BandConfig *config);
38 static void convertProgramInfoFromHal(ProgramInfo *info,
39 radio_program_info_t *halInfo);
40 static int convertMetaDataFromHal(hidl_vec<MetaData>& metadata,
41 radio_metadata_t *halMetadata);
43 static const char * sClassModuleNames[];
47 } // namespace implementation
49 } // namespace broadcastradio
50 } // namespace hardware
51 } // namespace android
53 #endif // ANDROID_HARDWARE_BROADCASTRADIO_V1_0_UTILS_H