Tizen 2.0 Release
[framework/osp/media.git] / src / FMedia_CameraEventArg.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_CameraEventArg.h
20  * @brief                       This header file contains the declaration of Tizen::Media namespace.
21  *
22  *
23  */
24
25 #ifndef _FMEDIA_INTERNAL_CAMERA_EVENTARG_H_
26 #define _FMEDIA_INTERNAL_CAMERA_EVENTARG_H_
27
28 #include <FBaseByteBuffer.h>
29 #include <FBaseRtIEventArg.h>
30 #include <FMediaCameraTypes.h>
31
32 namespace Tizen {namespace Media
33 {
34 //@enum _CameraEventType
35 //@brief This represents Camera's event type.
36 enum _CameraEventType
37 {
38         _CAMERA_EVENT_NONE,                                      // Event_None */
39         _CAMERA_EVENT_AUTO_FOCUSED,                              // Auto foucs Event*/
40         _CAMERA_EVENT_CAPTURED,                       // Capture Event*/
41         _CAMERA_EVENT_PREVIEWED_DATA,                   // Preview Event
42         _CAMERA_EVENT_ERROR,                                     // Error event */
43 };
44
45
46 /**
47 * @class        _CameraEventArg
48 * @brief        This class contains the information about the Camera event.
49 *
50 *       This event argument is used in ICameraEventListener's On-methods. It contains time information
51 *       as well as camera instance.
52 *
53 *       @see    Camera, ICameraEventListener
54 *
55 */
56 class _CameraEventArg
57         : public Tizen::Base::Runtime::IEventArg
58         , public Tizen::Base::Object
59 {
60 public:
61         /**
62         *       Constructor
63         */
64         _CameraEventArg(void);
65
66         /**
67         *       Destructor
68         */
69         ~_CameraEventArg(void);
70
71         /**
72          *      Get the event type.
73          *
74          *      @return Camera Event type of this argument.
75          */
76         _CameraEventType GetEventType(void) const;
77
78         /**
79          *      Set the event type.
80          */
81         void SetEventType(_CameraEventType eType);
82
83
84         /**
85         *       Get the data provided by the Camera
86         *
87         *       @return data defined in Camera subsystem.
88         */
89         Tizen::Base::ByteBuffer* GetData(void) const;
90
91         /**
92         *       Set the data provided by the Camera
93         */
94         void SetData(const Tizen::Base::ByteBuffer* data);
95
96         /**
97          *      Get the result.
98          *
99          *      @return Camera result of a aync method.
100          */
101         result GetResult(void) const;
102
103         /**
104          *      Set the result.
105          */
106         void SetResult(result r);
107
108         /**
109          *      Get the error.
110          *
111          *      @return Camera error of this argument.
112          */
113         CameraErrorReason GetError(void) const;
114
115         /**
116          *      Set the error.
117          */
118         void SetError(CameraErrorReason r);
119
120
121 private:
122         _CameraEventArg(const _CameraEventArg& rhs);
123         _CameraEventArg& operator =(const _CameraEventArg& rhs);
124
125         _CameraEventType __cameraEventType;
126
127         Tizen::Base::ByteBuffer* __pCameraData;
128         result __result;
129         CameraErrorReason __error;
130 };
131
132 }}// Tizen::Media
133
134 #endif