2 * Copyright (C) 2016 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package android.hardware.broadcastradio@1.0;
19 import ITunerCallback;
22 interface IBroadcastRadio {
25 * Retrieve implementation properties.
26 * @return result Operation completion status: OK in case of success,
27 * NOT_INITIALIZED in case of initialization error.
28 * @return properties A Properties structure containing implementation
29 * description and capabilities.
31 getProperties() generates (Result result, Properties properties);
34 * Open a tuner interface for the requested configuration.
35 * If no other tuner is opened, this will power on the radio hardware.
36 * The hardware must be powered down when all tuner interface are released.
37 * @param config A BandConfig struct containing the band configuration to apply
38 * @param audio True if this tuner must be used for live radio listening and
39 * should be connected to the radio audio source.
40 * @param callback the callback interface
41 * @return result Operation completion status: OK in case of success,
42 * INVALID_ARGUMENTS if configuration requested is invalid,
43 * INVALID_STATE if called out of sequence
44 * @return tuner The interface to control the tuner
46 * Callback ITunerCallback.ConfigChanged MUST be called once the
47 * configuration is applied or a failure occurs or after a time out.
49 openTuner(BandConfig config, bool audio, ITunerCallback callback)
50 generates (Result result, ITuner tuner);