tizen beta release
[framework/web/wrt-plugins-common.git] / src / modules / API / DEPRACATED / Device / EventClamshellStateChange.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 #ifndef WRTPLUGINS_DEVICE_EVENTCLAMSHELLSTATECHANGE_H_
17 #define WRTPLUGINS_DEVICE_EVENTCLAMSHELLSTATECHANGE_H_
18
19 #include <dpl/shared_ptr.h>
20 #include <platform/commons/ListenerEvent.h>
21 #include <platform/commons/ListenerEventEmitter.h>
22 #include "Enums.h"
23
24 namespace WrtPlugins {
25 namespace Api {
26 namespace Device {
27 /**
28  * Event emitted when screen orientation changes.
29  */
30 class EventClamshellStateChange : public Platform::ListenerEvent<
31         EventClamshellStateChange>
32 {
33   public:
34     EventClamshellStateChange();
35     virtual ~EventClamshellStateChange();
36
37     /**
38      * Gets clamshell's state.
39      * @return State of the clamshell.
40      */
41     ClamshellState getState() const;
42
43     /**
44      * Sets clamshell's state.
45      * @param state State of the clamshell.
46      */
47     void setState(ClamshellState state);
48
49   protected:
50     ClamshellState m_state;
51 };
52
53 typedef DPL::SharedPtr<EventClamshellStateChange> EventClamshellStateChangePtr;
54 typedef Platform::ListenerEventEmitter<EventClamshellStateChange>
55 EventClamshellStateChangeEmitter;
56 typedef DPL::SharedPtr<EventClamshellStateChangeEmitter>
57 EventClamshellStateChangeEmitterPtr;
58 } // Device
59 } // Api
60 } // WrtPlugins
61
62 #endif // WRTPLUGINS_DEVICE_EVENTCLAMSHELLSTATECHANGE_H_