summaryrefslogtreecommitdiffstats
path: root/broadcastradio/1.0/ITunerCallback.hal
blob: 0966ff4380e492c036246e065a2d7f55d961a683 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
 * Copyright (C) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.broadcastradio@1.0;


interface ITunerCallback {

    /**
     * Method called by the HAL when a HW failure occurs.
     * The framework MUST close the ITuner interface and open a new one.
     */
    oneway hardwareFailure();

    /**
     * Method called by the HAL when a new configuration is applied
     * in response to IDevice.openTuner() or ITuner.setConfiguration().
     * @param result OK if the configuration has been applied,
     *               INVALID_ARGUMENTS if not or TIMEOUT in case of time out.
     * @param config A BandConfig structure describing the new configuration
     *               applied.
     */
    oneway configChange(Result result, BandConfig config);

    /**
     * Method called by the HAL when a tuning operation completes
     * following a step(), scan() or tune() command.
     * @param result OK if tune succeeded or TIMEOUT in case of time out.
     * @param info A ProgramInfo structure describing the tuned station.
     */
    oneway tuneComplete(Result result, ProgramInfo info);

    /**
     * Method called by the HAL when a frequency switch occurs.
     * @param info A ProgramInfo structure describing the new tuned station.
     */
    oneway afSwitch(ProgramInfo info);

    /**
     * Method called by the HAL when the antenna connection state changes.
     * @param connected True if the antenna is connected, false otherwise.
     */
    oneway antennaStateChange(bool connected);

    /**
     * Method called by the HAL when a traffic announcement starts or
     * stops.
     * @param active True if the announcement starts, false if it stops.
     */
    oneway trafficAnnouncement(bool active);

    /**
     * Method called by the HAL when an emergency announcement starts
     * or stops.
     * @param active True if the announcement starts, false if it stops.
     */
    oneway emergencyAnnouncement(bool active);

    /**
     * Method called by the HAL when metadata for current station
     * are updated.
     * @param channel The channel the metadata is associated with.
     * @param subChannel The sub channel the metadata is associated with.
     * @param metadata A list of all updated metada.
     */
    oneway newMetadata(uint32_t channel, uint32_t subChannel, vec<MetaData>  metadata);
};