1 /*
2  * Copyright (c) 2020-2021 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 MultiMedia_CameraInfo
18  * @{
19  *
20  * @brief Defines the camera info set for applications to achieve and access the info.
21  *
22  * @since 2.0
23  * @version 2.0
24  */
25 
26 /**
27  * @file camera_info.h
28  *
29  * @brief Declares functions of the <b>CameraInfo</b> class.
30  *
31  *
32  * @since 2.0
33  * @version 2.0
34  */
35 
36 #ifndef OHOS_CAMERA_INFO_H
37 #define OHOS_CAMERA_INFO_H
38 
39 #include "media_log.h"
40 #include "meta_data.h"
41 
42 namespace OHOS {
43 namespace Media {
44 typedef enum {
45     /* Wide angle camera */
46     WIDE_ANGLE,
47     /* Fisheye camera */
48     FISH_EYE,
49     /* Depth camera */
50     TRUE_DEPTH,
51     /* Other camera */
52     OTHER_TYPE
53 } CameraType;
54 
55 typedef enum {
56     /* front */
57     CAMERA_FACING_FRONT,
58     /* back */
59     CAMERA_FACING_BACK,
60     /* other */
61     CAMERA_FACING_OTHERS
62 } FacingType;
63 
64 class CameraInfo {
65 public:
66     /**
67      * @brief A constructor used to create a <b>CameraInfo</b> instance.
68      *
69      */
70     CameraInfo() = default;
71 
72     /**
73      * @brief A destructor used to delete the <b>CameraInfo</b> instance.
74      *
75      */
76     virtual ~CameraInfo() = default;
77 
78     /**
79      * @brief Obtains the camera type.
80      *
81      * @return Returns the camera type, whick can be {@link CameraType}.
82      */
GetCameraType()83     virtual int32_t GetCameraType() const
84     {
85         return -1;
86     }
87 
88     /**
89      * @brief Obtains the camera type.
90      *
91      * @return Returns the camera type, whick can be {@link FacingType}.
92      */
GetCameraFacingType()93     virtual int32_t GetCameraFacingType() const
94     {
95         return -1;
96     }
97 };
98 } // namespace Media
99 } // namespace OHOS
100 #endif // OHOS_CAMERA_INFO_H
101