Tomasz Wasilczyk | f679e8b | 2017-09-14 09:43:35 -0700 | [diff] [blame] | 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 { |
Tomasz Wasilczyk | 45491be | 2017-09-18 22:18:07 -0700 | [diff] [blame^] | 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 | * 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 Wasilczyk | f679e8b | 2017-09-14 09:43:35 -0700 | [diff] [blame] | 68 | }; |