1 /* 2 * Copyright (C) 2019 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 #ifndef HARDWARE_GOOGLE_CAMERA_HAL_SESSION_DATA_DEFS_H 18 #define HARDWARE_GOOGLE_CAMERA_HAL_SESSION_DATA_DEFS_H 19 20 namespace android { 21 namespace google_camera_hal { 22 23 // The session data API is a generic low-overhead mechanism for 24 // internal data exchange across the (user-mode) driver stack. It 25 // allows any component to set a key/value per a device session 26 // and any other component to get that value in that session. It 27 // does not care about the semantics of the key/value pair: it is 28 // up to the usage parties (i.e. setters/getters) to agree on 29 // the semantics, including the life cycle and validity of the 30 // values. This is acceptable since this API is intended for 31 // internal communication and therefore, it's expected that its 32 // usage is part of a design where the assumptions / expectations 33 // and roles of the parties are clearly defined. 34 // Since there is no "type" associated with the keys, it is a 35 // good practice to include hints about the type in the key name. 36 // 37 // The keys defined in here are visible across GCH and HWL. The 38 // keys that are only visible within the HWL should be defined 39 // in HWL but extend below key domain (i.e. respect the defined 40 // range to avoid clashes.) 41 42 enum SessionDataKey : uint64_t { 43 kSessionDataKeyInvalidKey = 0, 44 // Add HAL-visible keys here (visible to GCH and HWL). 45 // A pointer to an int variable that indicates current 46 // Eis frame delay number. 47 // The pointer will be valid for the entire session. 48 kSessionDataKeyEisFrameDelayIntPtr, 49 kSessionDataKeyBeginHwlKeys = 0xFFFFFFFF 50 }; 51 52 } // namespace google_camera_hal 53 } // namespace android 54 55 #endif // HARDWARE_GOOGLE_CAMERA_HAL_SESSION_DATA_DEFS_H