Merge "seek expection handling bug" into tizen_2.2
[platform/framework/native/media.git] / src / FMedia_CamRef.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_CamRef.h
20  * @brief                       This header file contains the declarations of the %_CamRef class.
21  *
22  */
23
24 #ifndef _FMEDIA_INTERNAL_CAM_REF_H_
25 #define _FMEDIA_INTERNAL_CAM_REF_H_
26
27 #include <FBaseColIList.h>
28 #include <FBaseObject.h>
29
30 namespace Tizen { namespace Media
31 {
32
33 /**
34  * @class       _CamRef
35  * @brief       This class implements the _CamRef class.
36  */
37 class _CamRef
38         : public Tizen::Base::Object
39 {
40 public:
41         /**
42          * This is the default constructor for this class.
43          *
44          * @remarks             After creating an instance of this class, the Construct() method must be called explicitly to
45          * initialize this instance.
46          * @see                 Construct()
47          */
48         _CamRef(void);
49
50         /**
51          * This is the destructor for this class.
52          */
53         virtual ~_CamRef(void);
54
55         /**
56         * Initializes this instance of _CamRef.
57         *
58         * @return               An error code
59         * @param[in]    obj                     The object
60         * @exception    E_SUCCESS                               The method is successful.
61         * @exception    E_INVALID_ARG   The specified input parameter is invalid.
62         */
63         result Construct(const Tizen::Base::Object& obj);
64
65         /**
66         * Check the object is alive
67         *
68         * @return               The pointer of Object instance
69         * @param[in]    obj                     The object
70         * @exception    E_SUCCESS                               The method is successful.
71         * @exception    E_OBJ_NOT_FOUND The specified obj is not found.
72         */
73         static bool IsAlive(const Tizen::Base::Object& obj);
74 private:
75         /**
76         * Register an instance of Object to the list.
77         *
78         * @return               An error code
79         * @param[in]    obj                     The object pointer
80         * @exception    E_SUCCESS                               The method is successful.
81         * @exception    E_INVALID_ARG   The specified input parameter is invalid.
82         */
83         result RegisterObject(const Tizen::Base::Object& obj);
84
85         /**
86         * Unregister the specific instance of Object from the list.
87         *
88         * @param[in]    obj                     The object pointer
89         * @exception    E_SUCCESS                               The method is successful.
90         * @exception    E_OBJ_NOT_FOUND The specified obj is not found.
91         */
92         void UnRegisterObject(const Tizen::Base::Object& obj);
93
94         _CamRef(const _CamRef& rhs);
95         _CamRef& operator =(const _CamRef& rhs);
96
97         Tizen::Base::Object* __pObj;
98
99         static void InitSingleton(void);
100         static void DestroySingleton(void);
101         
102         static Tizen::Base::Collection::IList* __pList;
103 };
104
105 }}// Tizen::Media
106
107 #endif