enable dual camera
[platform/framework/native/media.git] / src / FMedia_RecorderRef.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_RecorderRef.h
20  * @brief                       This header file contains the declarations of the %_RecorderRef class.
21  *
22  */
23
24 #ifndef _FMEDIA_INTERNAL_RECORDER_REF_H_
25 #define _FMEDIA_INTERNAL_RECORDER_REF_H_
26
27 #include <FBaseColIListT.h>
28 #include "FMedia_RecorderTypes.h"
29 #include "FMedia_CamRef.h"
30
31 namespace Tizen { namespace Media
32 {
33
34 /**
35  * @class       _RecorderRef
36  * @brief       This class implements the _RecorderRef class.
37  */
38 class _RecorderRef
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         _RecorderRef(void);
50
51         /**
52          * This is the destructor for this class.
53          */
54         virtual ~_RecorderRef(void);
55
56         /**
57         * Initializes this instance of _RecorderRef.
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, _RecorderDeviceType 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_SYSTEM                Internal error.
75         * @exception    E_INVALID_ARG   The specified input parameter is invalid.
76         * @exception    E_DEVICE_BUSY                   The recorder is under use by other application or already used in this application.
77         */
78         result RegisterRecorder(_RecorderDeviceType deviceType);
79
80         /**
81         * Unregister the specific camera device from the list.
82         *
83         * @param[in]    deviceType      The camera device type
84         * @exception    E_SUCCESS                               The method is successful.
85         * @exception    E_OBJ_NOT_FOUND The specified device type is not found.
86         */
87         void UnRegisterRecorder(_RecorderDeviceType deviceType);
88
89         _RecorderRef(const _RecorderRef& rhs);
90         _RecorderRef& operator =(const _RecorderRef& rhs);
91
92         _RecorderDeviceType __deviceType;
93
94         static void InitSingleton(void);
95         static void DestroySingleton(void);
96         
97         static Tizen::Base::Collection::IListT<_RecorderDeviceType>* __pList;
98 };
99
100 }}// Tizen::Media
101
102 #endif