1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 /** 17 * @addtogroup OH_Camera 18 * @{ 19 * 20 * @brief Provide the definition of the C interface for the camera module. 21 * 22 * @syscap SystemCapability.Multimedia.Camera.Core 23 * 24 * @since 12 25 * @version 1.0 26 */ 27 28 /** 29 * @file camera_device.h 30 * 31 * @brief Declare the camera device concepts. 32 * 33 * @library libohcamera.so 34 * @kit CameraKit 35 * @syscap SystemCapability.Multimedia.Camera.Core 36 * @since 12 37 * @version 1.0 38 */ 39 40 #ifndef NATIVE_INCLUDE_CAMERA_CAMERADEVICE_H 41 #define NATIVE_INCLUDE_CAMERA_CAMERADEVICE_H 42 43 #include <stdint.h> 44 #include <stdio.h> 45 #include "camera.h" 46 47 #ifdef __cplusplus 48 extern "C" { 49 #endif 50 51 /** 52 * @brief Gets the sensor orientation attribute for a camera device. 53 * 54 * @param camera the {@link Camera_Device} which use to get attributes. 55 * @param orientation the sensor orientation attribute if the method call succeeds. 56 * @return {@link #CAMERA_OK} if the method call succeeds. 57 * {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect. 58 * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. 59 * @since 12 60 */ 61 Camera_ErrorCode OH_CameraDevice_GetCameraOrientation(Camera_Device* camera, uint32_t* orientation); 62 63 /** 64 * @brief Gets remote device name attribute for a camera device. 65 * 66 * @param camera the {@link Camera_Device} which use to get attributes. 67 * @param hostDeviceName the remote device name attribute if the method call succeeds. 68 * @return {@link #CAMERA_OK} if the method call succeeds. 69 * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. 70 * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. 71 * @since 15 72 */ 73 Camera_ErrorCode OH_CameraDevice_GetHostDeviceName(Camera_Device* camera, char** hostDeviceName); 74 75 76 /** 77 * @brief Gets the remote device type attribute for a camera device. 78 * 79 * @param camera the {@link Camera_Device} which use to get attributes. 80 * @param hostDeviceType the {@link Camera_HostDeviceType} which remote device type attribute 81 if the method call succeeds. 82 * @return {@link #CAMERA_OK} if the method call succeeds. 83 * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. 84 * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. 85 * @since 15 86 */ 87 Camera_ErrorCode OH_CameraDevice_GetHostDeviceType(Camera_Device* camera, Camera_HostDeviceType* hostDeviceType); 88 89 #ifdef __cplusplus 90 } 91 #endif 92 93 #endif // NATIVE_INCLUDE_CAMERA_CAMERADEVICE_H 94 /** @} */