37d984fdc2aa7aa533e57541691b95c67c47406f
[framework/web/wrt-plugins-common.git] / src / modules / API / Orientation / EventGetCurrentOrientation.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 /*
17  * @file          EventGetCurrentOrientation.h
18  * @author      Qi Xiangguo (xiangguo.qi@samsung.com)
19  * @version     0.1
20  * @brief
21  */
22
23 #ifndef WRTDEVICEAPIS_ORIENTATION_EVENT_GET_CURRENT_ORIENTATION_H_
24 #define WRTDEVICEAPIS_ORIENTATION_EVENT_GET_CURRENT_ORIENTATION_H_
25
26 #include <dpl/shared_ptr.h>
27 #include <Commons/IEvent.h>
28 #include <Orientation/OrientationProperties.h>
29 #include <Orientation/IOrientation.h>
30
31 namespace WrtDeviceApis {
32 namespace Orientation {
33 namespace Api {
34
35 class EventGetCurrentOrientation :
36     public Commons::IEvent<EventGetCurrentOrientation>
37 {
38   private:
39     OrientationProperties m_props;
40   public:
41     void setAlpha(double alpha)
42     {
43         m_props.alpha = alpha;
44     }
45     void setBeta(double beta)
46     {
47         m_props.beta = beta;
48     }
49     void setGamma(double gamma)
50     {
51         m_props.gamma = gamma;
52     }
53
54     double getAlpha() const
55     {
56         return m_props.alpha;
57     }
58     double getBeta() const
59     {
60         return m_props.beta;
61     }
62     double getGamma() const
63     {
64         return m_props.gamma;
65     }
66
67     OrientationProperties getOrientationProperties() const
68     {
69         return m_props;
70     }
71
72     EventGetCurrentOrientation()
73     {
74     }
75 };
76
77 typedef DPL::SharedPtr<EventGetCurrentOrientation>
78 EventGetCurrentOrientationPtr;
79 } // Orientation
80 } // Api
81 } // WrtDeviceApis
82
83 #endif // WRTDEVICEAPIS_ORIENTATION_EVENT_GET_CURRENT_ORIENTATION_H_