blob: ba97ea0c0acf1d967c3df43b91d84b788e3859ab [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 *
Tomasz Wasilczykd64fe222017-11-13 14:11:55 -080031 * For each pair in the result vector, the key must be one of the keys
32 * contained in the input (possibly with wildcards expanded), and the value
33 * must be a vendor-specific result status (i.e. the string "OK" or an error
34 * code). The implementation may choose to return an empty vector, or only
35 * return a status for a subset of the provided inputs, at its discretion.
Tomasz Wasilczyk45491be2017-09-18 22:18:07 -070036 *
37 * Application and HAL must not use keys with unknown prefix. In particular,
38 * it must not place a key-value pair in results vector for unknown key from
39 * parameters vector - instead, an unknown key should simply be ignored.
40 * In other words, results vector may contain a subset of parameter keys
41 * (however, the framework doesn't enforce a strict subset - the only
42 * formal requirement is vendor domain prefix for keys).
43 *
44 * @param parameters Vendor-specific key-value pairs.
45 * @return results Operation completion status for parameters being set.
Tomasz Wasilczyk45491be2017-09-18 22:18:07 -070046 */
47 setParameters(vec<VendorKeyValue> parameters)
48 generates (vec<VendorKeyValue> results);
49
50 /**
51 * Generic method for retrieving vendor-specific parameter values.
52 * The framework does not interpret the parameters, they are passed
53 * in an opaque manner between a vendor application and HAL.
54 *
55 * Framework does not cache set/get requests, so it's allowed for
56 * getParameter to return a different value than previous setParameter call.
57 *
58 * The syntax and semantics of keys are up to the vendor (as long as prefix
59 * rules are obeyed). For instance, vendors may include some form of
60 * wildcard support. In such case, result vector may be of different size
61 * than requested keys vector. However, wildcards are not recognized by
62 * framework and they are passed as-is to the HAL implementation.
63 *
64 * Unknown keys must be ignored and not placed into results vector.
65 *
66 * @param keys Parameter keys to fetch.
67 * @return parameters Vendor-specific key-value pairs.
68 */
69 getParameters(vec<string> keys) generates (vec<VendorKeyValue> parameters);
Tomasz Wasilczykf679e8b2017-09-14 09:43:35 -070070};