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 */ 16package android.hardware.weaver@1.0; 17 18enum WeaverStatus : uint32_t { 19 OK, 20 FAILED, 21}; 22 23struct WeaverConfig { 24 /** The number of slots available. */ 25 uint32_t slots; 26 /** The number of bytes used for a key. */ 27 uint32_t keySize; 28 /** The number of bytes used for a value. */ 29 uint32_t valueSize; 30}; 31 32enum WeaverReadStatus : WeaverStatus { 33 INCORRECT_KEY, 34 THROTTLE, 35}; 36 37struct WeaverReadResponse { 38 /** The time to wait, in milliseconds, before making the next request. */ 39 uint32_t timeout; 40 /** The value read from the slot or empty if the value was not read. */ 41 vec<uint8_t> value; 42}; 43