2016-10-20 02:57:01 +02:00
|
|
|
/*
|
|
|
|
* 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 {
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-20 02:57:01 +02:00
|
|
|
* Method called by the HAL when a HW failure occurs.
|
|
|
|
* The framework MUST close the ITuner interface and open a new one.
|
|
|
|
*/
|
|
|
|
oneway hardwareFailure();
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-20 02:57:01 +02:00
|
|
|
* 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);
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-20 02:57:01 +02:00
|
|
|
* 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);
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-20 02:57:01 +02:00
|
|
|
* Method called by the HAL when a frequency switch occurs.
|
|
|
|
* @param info A ProgramInfo structure describing the new tuned station.
|
|
|
|
*/
|
|
|
|
oneway afSwitch(ProgramInfo info);
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-20 02:57:01 +02:00
|
|
|
* 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);
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-20 02:57:01 +02:00
|
|
|
* 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);
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-20 02:57:01 +02:00
|
|
|
* 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);
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-20 02:57:01 +02:00
|
|
|
* Method called by the HAL when metadata for current station
|
|
|
|
* are updated.
|
2016-11-21 19:41:22 +01:00
|
|
|
* @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.
|
2016-10-20 02:57:01 +02:00
|
|
|
*/
|
2016-11-21 19:41:22 +01:00
|
|
|
oneway newMetadata(uint32_t channel, uint32_t subChannel, vec<MetaData> metadata);
|
2017-03-29 01:19:16 +02:00
|
|
|
};
|