blob: 6e7002d78537c3e5e8b0e778e9c6d445844fbae1 [file] [log] [blame]
Tomasz Wasilczyk803301a2017-03-13 14:30:15 -07001/*
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
17package android.hardware.broadcastradio@1.1;
18
19import @1.0::IBroadcastRadio;
20
21interface IBroadcastRadio extends @1.0::IBroadcastRadio {
22
Andreas Huber40d3a9b2017-03-28 16:19:16 -070023 /**
Tomasz Wasilczyk803301a2017-03-13 14:30:15 -070024 * Retrieve implementation properties.
25 * @return properties A Properties structure containing implementation
26 * description and capabilities.
27 */
28 getProperties_1_1() generates (Properties properties);
29
Tomasz Wasilczykba3e2542017-07-17 13:59:21 -070030 /**
31 * Fetch image from radio module.
32 *
33 * This call is meant to make V1_0::MetaData lightweight - instead of
34 * passing image data blob in MetadataType.RAW field, only identifier is
35 * passed, so the client may cache images or even not fetch them.
36 *
37 * Identifier may be any arbitrary number - sequential, sha256 prefix,
38 * or any other unique value selected by the vendor.
39 *
40 * The data should be a valid PNG, JPEG, GIF or BMP file.
41 * Invalid format must be handled gracefully as if the image was missing.
42 *
Tomasz Wasilczykb8a2afe2017-08-01 10:52:18 -070043 * The image identifier may become invalid after some time from passing it
44 * with metadata struct (due to resource cleanup at the HAL implementation).
45 * However, it must remain valid for a currently tuned program at least
46 * until currentProgramInfoChanged or programListChanged is called and
47 * metadata changes for the current program.
48 *
49 * There is still a race condition possible (if the HAL deletes the old
50 * image immediately after notifying about the new one) between
51 * currentProgramInfoChanged callback propagating through the framework and
52 * the HAL implementation removing previous image. In such case, client
53 * application may expect the new currentProgramInfoChanged callback with
54 * updated image identifier.
55 *
Tomasz Wasilczykba3e2542017-07-17 13:59:21 -070056 * @param id Identifier of an image;
57 * value of 0 is reserved and should be treated as invalid image.
58 * @return image A binary blob with image data
59 * or zero-length vector if identifier doesn't exists.
60 */
61 getImage(int32_t id) generates (vec<uint8_t> image);
Tomasz Wasilczyk803301a2017-03-13 14:30:15 -070062};