blob: 4ef22a51fe678e613fa75c7122ccf81f620a9eac [file] [log] [blame]
Eric Laurenta1745882016-11-21 10:41:22 -08001/*
2 * Copyright (C) 2016 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#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_0_UTILS_H
17#define ANDROID_HARDWARE_BROADCASTRADIO_V1_0_UTILS_H
18
19#include <android/hardware/broadcastradio/1.0/types.h>
20#include <hardware/radio.h>
21
22namespace android {
23namespace hardware {
24namespace broadcastradio {
25namespace V1_0 {
26namespace implementation {
27
28class Utils {
29public:
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,
Tomasz Wasilczyk5cc9d862017-01-06 14:19:11 -080039 radio_program_info_t *halInfo);
Eric Laurenta1745882016-11-21 10:41:22 -080040 static int convertMetaDataFromHal(hidl_vec<MetaData>& metadata,
41 radio_metadata_t *halMetadata);
42private:
43 static const char * sClassModuleNames[];
44
45};
46
47} // namespace implementation
48} // namespace V1_0
49} // namespace broadcastradio
50} // namespace hardware
51} // namespace android
52
53#endif // ANDROID_HARDWARE_BROADCASTRADIO_V1_0_UTILS_H