diff options
Diffstat (limited to 'broadcastradio/1.2/ITuner.hal')
-rw-r--r-- | broadcastradio/1.2/ITuner.hal | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/broadcastradio/1.2/ITuner.hal b/broadcastradio/1.2/ITuner.hal new file mode 100644 index 00000000..ba97ea0c --- /dev/null +++ b/broadcastradio/1.2/ITuner.hal | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
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 | |||
17 | package android.hardware.broadcastradio@1.2; | ||
18 | |||
19 | import @1.1::ITuner; | ||
20 | |||
21 | interface ITuner extends @1.1::ITuner { | ||
22 | /** | ||
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 | * 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. | ||
36 | * | ||
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. | ||
46 | */ | ||
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); | ||
70 | }; | ||