1 /* 2 * Copyright 2016 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 __vts_libdatatype_hal_camera_h__ 18 #define __vts_libdatatype_hal_camera_h__ 19 20 #include <hardware/camera.h> 21 #include <hardware/camera_common.h> 22 #include <hardware/hardware.h> 23 24 #include "test/vts/proto/ComponentSpecificationMessage.pb.h" 25 26 namespace android { 27 namespace vts { 28 29 // Generates a camera_module_callbacks data structure. 30 extern camera_module_callbacks_t* GenerateCameraModuleCallbacks(); 31 32 // Return the pointer to a camera_notify_callback function. 33 extern camera_notify_callback GenerateCameraNotifyCallback(); 34 35 // Return the pointer to a camera_data_callback function. 36 extern camera_data_callback GenerateCameraDataCallback(); 37 38 // Return the pointer to a camera_data_timestamp_callback function. 39 extern camera_data_timestamp_callback GenerateCameraDataTimestampCallback(); 40 41 // Return the pointer to a camera_request_memory function. 42 extern camera_request_memory GenerateCameraRequestMemory(); 43 44 // Generates a camera_info data structure. 45 extern camera_info_t* GenerateCameraInfo(); 46 47 // Generates a camera_info data structure using a given protobuf msg's values. 48 extern camera_info_t* GenerateCameraInfoUsingMessage( 49 const VariableSpecificationMessage& msg); 50 51 // Converts camera_info to a protobuf message. 52 extern bool ConvertCameraInfoToProtobuf(camera_info_t* raw, 53 VariableSpecificationMessage* msg); 54 55 } // namespace vts 56 } // namespace android 57 58 #endif 59