2017-02-08 02:38:21 +01:00
|
|
|
/*
|
|
|
|
* 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;
|
|
|
|
|
|
|
|
/**
|
2017-03-13 22:30:15 +01:00
|
|
|
* 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.
|
2017-02-08 02:38:21 +01:00
|
|
|
*/
|
|
|
|
interface ITunerCallback extends @1.0::ITunerCallback {
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2017-02-08 02:38:21 +01:00
|
|
|
* Method called by the HAL when a tuning operation completes
|
|
|
|
* following a step(), scan() or tune() command.
|
2017-07-14 00:51:21 +02:00
|
|
|
*
|
|
|
|
* This callback supersedes V1_0::tuneComplete. For performance reasons,
|
|
|
|
* the 1.0 callback may not be called when HAL implementation detects 1.1
|
|
|
|
* client (by casting V1_0::ITunerCallback to V1_1::ITunerCallback).
|
|
|
|
*
|
2017-02-08 02:38:21 +01:00
|
|
|
* @param result OK if tune succeeded or TIMEOUT in case of time out.
|
2017-07-14 00:51:21 +02:00
|
|
|
* @param selector A ProgramSelector structure describing the tuned station.
|
2017-02-08 02:38:21 +01:00
|
|
|
*/
|
2017-07-14 00:51:21 +02:00
|
|
|
oneway tuneComplete_1_1(Result result, ProgramSelector selector);
|
2017-02-08 02:38:21 +01:00
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2017-02-08 02:38:21 +01:00
|
|
|
* Method called by the HAL when a frequency switch occurs.
|
2017-07-14 00:51:21 +02:00
|
|
|
*
|
|
|
|
* This callback supersedes V1_0::afSwitch. For performance reasons,
|
|
|
|
* the 1.0 callback may not be called when HAL implementation detects 1.1
|
|
|
|
* client (by casting V1_0::ITunerCallback to V1_1::ITunerCallback).
|
|
|
|
*
|
|
|
|
* @param selector A ProgramSelector structure describing the tuned station.
|
2017-02-08 02:38:21 +01:00
|
|
|
*/
|
2017-07-14 00:51:21 +02:00
|
|
|
oneway afSwitch_1_1(ProgramSelector selector);
|
2017-03-13 22:30:15 +01:00
|
|
|
|
2017-03-28 00:18:58 +02:00
|
|
|
/**
|
|
|
|
* 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);
|
|
|
|
|
2017-03-13 22:30:15 +01:00
|
|
|
/**
|
|
|
|
* 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.
|
2017-03-28 00:18:58 +02:00
|
|
|
* UNAVAILABLE if the scan was interrupted due to
|
2017-03-13 22:30:15 +01:00
|
|
|
* 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();
|
2017-07-14 00:51:21 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Method called by the HAL when current program information (including
|
|
|
|
* metadata) is updated.
|
|
|
|
*
|
|
|
|
* Client may retrieve the actual program info with
|
|
|
|
* ITuner::getProgramInformation_1_1.
|
|
|
|
*
|
|
|
|
* This may be called together with tuneComplete_1_1 or afSwitch_1_1.
|
|
|
|
*
|
|
|
|
* This callback supersedes V1_0::tuneComplete, V1_0::afSwitch and
|
|
|
|
* newMetadata. For performance reasons, these callbacks may not be called
|
|
|
|
* when HAL implementation detects 1.1 client (by casting
|
|
|
|
* V1_0::ITunerCallback to V1_1::ITunerCallback).
|
|
|
|
*/
|
|
|
|
oneway programInfoChanged();
|
2017-02-08 02:38:21 +01:00
|
|
|
};
|