blob: f80547231b78783738437dcca7d9dd89ec00d215 [file] [log] [blame]
Eric Laurent402a8292016-10-19 17:57:01 -07001/*
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
17package android.hardware.broadcastradio@1.0;
18
19
20interface ITunerCallback {
21
22 /*
23 * Method called by the HAL when a HW failure occurs.
24 * The framework MUST close the ITuner interface and open a new one.
25 */
26 oneway hardwareFailure();
27
28 /*
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
34 * applied.
35 */
36 oneway configChange(Result result, BandConfig config);
37
38 /*
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.
43 */
44 oneway tuneComplete(Result result, ProgramInfo info);
45
46 /*
47 * Method called by the HAL when a frequency switch occurs.
48 * @param info A ProgramInfo structure describing the new tuned station.
49 */
50 oneway afSwitch(ProgramInfo info);
51
52 /*
53 * Method called by the HAL when the antenna connection state changes.
54 * @param connected True if the antenna is connected, false otherwise.
55 */
56 oneway antennaStateChange(bool connected);
57
58 /*
59 * Method called by the HAL when a traffic announcement starts or
60 * stops.
61 * @param active True if the announcement starts, false if it stops.
62 */
63 oneway trafficAnnouncement(bool active);
64
65 /*
66 * Method called by the HAL when an emergency announcement starts
67 * or stops.
68 * @param active True if the announcement starts, false if it stops.
69 */
70 oneway emergencyAnnouncement(bool active);
71
72 /*
73 * Method called by the HAL when metadata for current station
74 * are updated.
75 * @param metadatas A list of all updated metada.
76 */
77 oneway newMetadata(vec<MetaData> metadatas);
78};