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 photo_native.h
30  *
31  * @brief Declare the camera photo 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_PHOTO_NATIVE_H
41 #define NATIVE_INCLUDE_PHOTO_NATIVE_H
42 
43 #include <stdint.h>
44 #include <stdio.h>
45 #include "camera.h"
46 #include "image/image_native.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 /**
53  * @brief Camera photo object
54  *
55  * A pointer can be created using {@link OH_PhotoNative} method.
56  *
57  * @since 12
58  * @version 1.0
59  */
60 typedef struct OH_PhotoNative OH_PhotoNative;
61 
62 /**
63  * @brief Get main image.
64  *
65  * @param photo the {@link OH_PhotoNative} instance.
66  * @param mainImage the {@link OH_ImageNative} which use to get main image.
67  * @return {@link #CAMERA_OK} if the method call succeeds.
68  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
69  * @since 12
70  * @version 1.0
71  */
72 Camera_ErrorCode OH_PhotoNative_GetMainImage(OH_PhotoNative* photo, OH_ImageNative** mainImage);
73 
74 /**
75  * @brief Release camera photo.
76  *
77  * @param photo the {@link OH_PhotoNative} instance to released.
78  * @return {@link #CAMERA_OK} if the method call succeeds.
79  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
80  * @since 12
81  * @version 1.0
82  */
83 Camera_ErrorCode OH_PhotoNative_Release(OH_PhotoNative* photo);
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif // NATIVE_INCLUDE_PHOTO_NATIVE_H
90 /** @} */