blob: cc966fcb8f28c765905418ed33ade208bcbc7374 [file] [log] [blame]
Tomasz Wasilczykf679e8b2017-09-14 09:43:35 -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.2;
18
19import @1.1::ITuner;
20
21interface ITuner extends @1.1::ITuner {
Tomasz Wasilczyk45491be2017-09-18 22:18:07 -070022 /**
23 * Generic method for setting vendor-specific parameter values.
24 * The framework does not interpret the parameters, they are passed
25 * in an opaque manner between a vendor application and HAL.
26 *
27 * Framework does not make any assumptions on the keys or values, other than
28 * ones stated in VendorKeyValue documentation (a requirement of key
29 * prefixes).
30 *
31 * Results vector may not contain a result for each parameter being set,
32 * it can even be empty.
33 *
34 * Application and HAL must not use keys with unknown prefix. In particular,
35 * it must not place a key-value pair in results vector for unknown key from
36 * parameters vector - instead, an unknown key should simply be ignored.
37 * In other words, results vector may contain a subset of parameter keys
38 * (however, the framework doesn't enforce a strict subset - the only
39 * formal requirement is vendor domain prefix for keys).
40 *
41 * @param parameters Vendor-specific key-value pairs.
42 * @return results Operation completion status for parameters being set.
43 * Value format for result status is vendor-specific.
44 */
45 setParameters(vec<VendorKeyValue> parameters)
46 generates (vec<VendorKeyValue> results);
47
48 /**
49 * Generic method for retrieving vendor-specific parameter values.
50 * The framework does not interpret the parameters, they are passed
51 * in an opaque manner between a vendor application and HAL.
52 *
53 * Framework does not cache set/get requests, so it's allowed for
54 * getParameter to return a different value than previous setParameter call.
55 *
56 * The syntax and semantics of keys are up to the vendor (as long as prefix
57 * rules are obeyed). For instance, vendors may include some form of
58 * wildcard support. In such case, result vector may be of different size
59 * than requested keys vector. However, wildcards are not recognized by
60 * framework and they are passed as-is to the HAL implementation.
61 *
62 * Unknown keys must be ignored and not placed into results vector.
63 *
64 * @param keys Parameter keys to fetch.
65 * @return parameters Vendor-specific key-value pairs.
66 */
67 getParameters(vec<string> keys) generates (vec<VendorKeyValue> parameters);
Tomasz Wasilczykf679e8b2017-09-14 09:43:35 -070068};