Merge "Fix intApp TC failure" into tizen_2.2
[platform/framework/native/appfw.git] / src / system / FSys_DeviceEventListenerContainer.cpp
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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 /**
18  * @file                FSys_DeviceEventListenerContainer.cpp
19  * @brief               This is the implementation file for _DeviceEventListenerContainer class.
20  */
21
22 #include <FSys_DeviceEventListenerContainer.h>
23
24 using namespace Tizen::Base::Runtime;
25
26 namespace Tizen { namespace System
27 {
28
29 _DeviceEventListenerContainer::_DeviceEventListenerContainer(void)
30         : __bluetoothHeadset(false)
31         , __charger(false)
32         , __usbClient(false)
33         , __tvOut(false)
34         , __wiredHeadset(false)
35         , __wiredHeadphone(false)
36         , __storageCard(false)
37         , __keyboard(false)
38         , __hdmi(false)
39         , __pEvent(null)
40         , __pListener(null)
41 {
42 }
43
44 _DeviceEventListenerContainer::~_DeviceEventListenerContainer(void)
45 {
46         if(__pEvent != null)
47         {
48                 delete __pEvent;
49         }
50 }
51
52 bool
53 _DeviceEventListenerContainer::IsInvalid()
54 {
55         if(__bluetoothHeadset == false && __charger == false
56                 && __usbClient == false && __tvOut == false
57                 && __wiredHeadset == false && __wiredHeadphone == false
58                 && __storageCard == false && __keyboard == false && __hdmi == false)
59         {
60                 return true;
61         }
62         else
63         {
64                 return false;
65         }
66 }
67 } }