enable dual camera
[platform/framework/native/media.git] / src / FMedia_CameraRef.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file                        FMedia_CameraRef.h
20  * @brief                       This header file contains the declarations of the %_CameraRef class.
21  *
22  */
23
24 #ifndef _FMEDIA_INTERNAL_CAMERA_REF_H_
25 #define _FMEDIA_INTERNAL_CAMERA_REF_H_
26
27 #include <FBaseColIListT.h>
28 #include "FMedia_CameraTypes.h"
29 #include "FMedia_CamRef.h"
30
31 namespace Tizen { namespace Media
32 {
33
34 /**
35  * @class       _CameraRef
36  * @brief       This class implements the _CameraRef class.
37  */
38 class _CameraRef
39         : public _CamRef
40 {
41 public:
42         /**
43          * This is the default constructor for this class.
44          *
45          * @remarks             After creating an instance of this class, the Construct() method must be called explicitly to
46          * initialize this instance.
47          * @see                 Construct()
48          */
49         _CameraRef(void);
50
51         /**
52          * This is the destructor for this class.
53          */
54         virtual ~_CameraRef(void);
55
56         /**
57         * Initializes this instance of _CameraRef.
58         *
59         * @return               An error code
60         * @param[in]    obj                     The object
61         * @param[in]    deviceType      The camera device type
62         * @exception    E_SUCCESS                               The method is successful.
63         * @exception    E_INVALID_ARG   The specified input parameter is invalid.
64         */
65         result Construct(const Tizen::Base::Object& obj, _CameraDeviceType deviceType);
66
67 private:
68         /**
69         * Register a camera device to the list.
70         *
71         * @return               An error code
72         * @param[in]    deviceType      The camera device type
73         * @exception    E_SUCCESS                               The method is successful.
74         * @exception    E_INVALID_ARG   The specified input parameter is invalid.
75         * @exception    E_DEVICE_BUSY                   The camera is under use by other application or already used in this application.
76         */
77         result RegisterCamera(_CameraDeviceType deviceType);
78
79         /**
80         * Unregister the specific camera device from the list.
81         *
82         * @param[in]    deviceType      The camera device type
83         * @exception    E_SUCCESS                               The method is successful.
84         * @exception    E_OBJ_NOT_FOUND The specified device type is not found.
85         */
86         void UnRegisterCamera(_CameraDeviceType deviceType);
87
88         _CameraRef(const _CameraRef& rhs);
89         _CameraRef& operator =(const _CameraRef& rhs);
90
91         _CameraDeviceType __deviceType;
92
93         static void InitSingleton(void);
94         static void DestroySingleton(void);
95         
96         static Tizen::Base::Collection::IListT<_CameraDeviceType>* __pList;
97 };
98
99 }}// Tizen::Media
100
101 #endif