OSDN Git Service

Merge "Revert "Add keymaster VTS tests."" into oc-dev
[android-x86/hardware-interfaces.git] / broadcastradio / 1.1 / ITunerCallback.hal
1 /*
2  * Copyright (C) 2017 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
17 package android.hardware.broadcastradio@1.1;
18
19 import @1.0::ITunerCallback;
20
21 /**
22  * Some methods of @1.1::ITunerCallback are updated versions of those from
23  * @1.0:ITunerCallback. All 1.1 HAL implementations must call both
24  * (eg. tuneComplete and tuneComplete_1_1), while 1.1 clients may ignore 1.0
25  * ones, to avoid receiving a callback twice.
26  */
27 interface ITunerCallback extends @1.0::ITunerCallback {
28     /**
29      * Method called by the HAL when a tuning operation completes
30      * following a step(), scan() or tune() command.
31      * @param result OK if tune succeeded or TIMEOUT in case of time out.
32      * @param info A ProgramInfo structure describing the tuned station.
33      */
34     oneway tuneComplete_1_1(Result result, ProgramInfo info);
35
36     /**
37      * Method called by the HAL when a frequency switch occurs.
38      * @param info A ProgramInfo structure describing the new tuned station.
39      */
40     oneway afSwitch_1_1(ProgramInfo info);
41
42     /**
43      * Called by the HAL when background scan initiated by startBackgroundScan
44      * finishes. If the list was changed, programListChanged must be called too.
45      * @param result OK if the scan succeeded, client may retrieve the actual
46      *               list with ITuner::getProgramList.
47      *               TEMPORARILY_UNAVAILABLE if the scan was interrupted due to
48      *               hardware becoming temporarily unavailable.
49      *               NOT_INITIALIZED other error, ie. HW failure.
50      */
51     oneway backgroundScanComplete(ProgramListResult result);
52
53     /**
54      * Called each time the internally cached program list changes. HAL may not
55      * call it immediately, ie. it may wait for a short time to accumulate
56      * multiple list change notifications into a single event.
57      *
58      * It may be triggered either by an explicitly issued background scan,
59      * or a scan issued by the device internally.
60      *
61      * Client may retrieve the actual list with ITuner::getProgramList.
62      */
63     oneway programListChanged();
64 };