sync with tizen_2.0
[platform/framework/native/appfw.git] / inc / FSysIDeviceEventListener.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        FSysIDeviceEventListener.h
20  * @brief       This is the header file for the %IDeviceEventListener interface.
21  *
22  * This header file contains the declarations of the %IDeviceEventListener interface.
23  */
24
25 #ifndef _FSYS_IDEVICE_EVENT_LISTENER_H_
26 #define _FSYS_IDEVICE_EVENT_LISTENER_H_
27
28 #include <FBaseResult.h>
29 #include <FBaseRtIEventListener.h>
30 #include <FSysDeviceManager.h>
31
32 namespace Tizen { namespace System
33 {
34
35 /**
36  * @interface   IDeviceEventListener
37  * @brief       This interface is the listener of the device state changes.
38  *
39  * @since       2.0
40  *
41  * The %IDeviceEventListener interface must be registered and implemented by an application to receive device events from the system.
42  *
43  * @see DeviceManager
44  */
45 class _OSP_EXPORT_ IDeviceEventListener
46         : public virtual Tizen::Base::Runtime::IEventListener
47 {
48 public:
49         /**
50          * This is the destructor for this class. This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
51          *
52          * @since       2.0
53          */
54         virtual ~IDeviceEventListener(void) {}
55
56         /**
57         * Called when a device state is changed.
58         *
59         * @since        2.0
60         *
61         * @param[in]    deviceType      The types of a device
62         * @param[in]    state           The device state of type Tizen::Base::String
63         */
64         virtual void OnDeviceStateChanged(DeviceType deviceType, const Tizen::Base::String& state) = 0;
65
66 protected:
67         //
68         // This method is for internal use only.
69         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
70         //
71         // @since 2.0
72         virtual void OnIDeviceEventListener_Reserved1(void) {}
73
74         //
75         // This method is for internal use only.
76         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
77         //
78         // @since 2.0
79         virtual void OnIDeviceEventListener_Reserved2(void) {}
80
81         //
82         // This method is for internal use only.
83         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
84         //
85         // @since 2.0
86         virtual void OnIDeviceEventListener_Reserved3(void) {}
87
88 }; // IDeviceEventListener
89
90 } } // Tizen::System
91
92 #endif // _FSYS_IDEVICE_EVENT_LISTENER_H_