d3b9971ad8
am: dda8e88d3f
Change-Id: I292a512e234be1de0dafa100b13798de840e8c5e
72 lines
2.8 KiB
Text
72 lines
2.8 KiB
Text
/*
|
|
* Copyright (C) 2017 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.1;
|
|
|
|
import @1.0::ITunerCallback;
|
|
|
|
/**
|
|
* Some methods of @1.1::ITunerCallback are updated versions of those from
|
|
* @1.0:ITunerCallback. All 1.1 HAL implementations must call both
|
|
* (eg. tuneComplete and tuneComplete_1_1), while 1.1 clients may ignore 1.0
|
|
* ones, to avoid receiving a callback twice.
|
|
*/
|
|
interface ITunerCallback extends @1.0::ITunerCallback {
|
|
/**
|
|
* 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_1_1(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_1_1(ProgramInfo info);
|
|
|
|
/**
|
|
* Called by the HAL when background scan feature becomes available or not.
|
|
*
|
|
* @param isAvailable true, if the tuner turned temporarily background-
|
|
* capable, false in the other case.
|
|
*/
|
|
oneway backgroundScanAvailable(bool isAvailable);
|
|
|
|
/**
|
|
* Called by the HAL when background scan initiated by startBackgroundScan
|
|
* finishes. If the list was changed, programListChanged must be called too.
|
|
* @param result OK if the scan succeeded, client may retrieve the actual
|
|
* list with ITuner::getProgramList.
|
|
* UNAVAILABLE if the scan was interrupted due to
|
|
* hardware becoming temporarily unavailable.
|
|
* NOT_INITIALIZED other error, ie. HW failure.
|
|
*/
|
|
oneway backgroundScanComplete(ProgramListResult result);
|
|
|
|
/**
|
|
* Called each time the internally cached program list changes. HAL may not
|
|
* call it immediately, ie. it may wait for a short time to accumulate
|
|
* multiple list change notifications into a single event.
|
|
*
|
|
* It may be triggered either by an explicitly issued background scan,
|
|
* or a scan issued by the device internally.
|
|
*
|
|
* Client may retrieve the actual list with ITuner::getProgramList.
|
|
*/
|
|
oneway programListChanged();
|
|
};
|