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.
17 package android.hardware.broadcastradio@1.0;
20 interface ITunerCallback {
23 * Method called by the HAL when a HW failure occurs.
24 * The framework MUST close the ITuner interface and open a new one.
26 oneway hardwareFailure();
29 * Method called by the HAL when a new configuration is applied
30 * in response to IDevice.openTuner() or ITuner.setConfiguration().
31 * @param result OK if the configuration has been applied,
32 * INVALID_ARGUMENTS if not or TIMEOUT in case of time out.
33 * @param config A BandConfig structure describing the new configuration
36 oneway configChange(Result result, BandConfig config);
39 * Method called by the HAL when a tuning operation completes
40 * following a step(), scan() or tune() command.
41 * @param result OK if tune succeeded or TIMEOUT in case of time out.
42 * @param info A ProgramInfo structure describing the tuned station.
44 oneway tuneComplete(Result result, ProgramInfo info);
47 * Method called by the HAL when a frequency switch occurs.
48 * @param info A ProgramInfo structure describing the new tuned station.
50 oneway afSwitch(ProgramInfo info);
53 * Method called by the HAL when the antenna connection state changes.
54 * @param connected True if the antenna is connected, false otherwise.
56 oneway antennaStateChange(bool connected);
59 * Method called by the HAL when a traffic announcement starts or
61 * @param active True if the announcement starts, false if it stops.
63 oneway trafficAnnouncement(bool active);
66 * Method called by the HAL when an emergency announcement starts
68 * @param active True if the announcement starts, false if it stops.
70 oneway emergencyAnnouncement(bool active);
73 * Method called by the HAL when metadata for current station
75 * @param channel The channel the metadata is associated with.
76 * @param subChannel The sub channel the metadata is associated with.
77 * @param metadata A list of all updated metada.
79 oneway newMetadata(uint32_t channel, uint32_t subChannel, vec<MetaData> metadata);