906faa67b2491b801ee3f89d5be1e2df08d2921f
[platform/framework/native/uix.git] / src / FUixSensorLightSensorData.cpp
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     FUixSensorLightSensorData.cpp
20  * @brief    This is the implementation file for the %LightSensorData class.
21  *
22  * This files contains implementation of the %LightSensorData class.
23  */
24
25 // Includes
26 #include <FBaseErrors.h>
27 #include <FBaseSysLog.h>
28
29 #include <FUixSensorLightSensorData.h>
30
31 namespace Tizen { namespace Uix { namespace Sensor
32 {
33 namespace
34 {
35 static const wchar_t W_MSG_INVALID_SENSOR_DATA_KEY[] = L"A data matching the specified key and data type cannot be found.";
36 } // Anonymous
37
38 LightSensorData::LightSensorData(void)
39         : level(0.0F)
40 {
41
42 }
43
44 LightSensorData::~LightSensorData(void)
45 {
46
47 }
48
49 result
50 LightSensorData::GetValue(SensorDataKey dataKey, long& value) const
51 {
52         SysLogException(NID_UIX, E_INVALID_ARG, "[%s] %ls", GetErrorMessage(E_INVALID_ARG), W_MSG_INVALID_SENSOR_DATA_KEY);
53         return E_INVALID_ARG;
54 }
55
56 result
57 LightSensorData::GetValue(SensorDataKey dataKey, float& value) const
58 {
59         SysLogException(NID_UIX, E_INVALID_ARG, "[%s] %ls", GetErrorMessage(E_INVALID_ARG), W_MSG_INVALID_SENSOR_DATA_KEY);
60         return E_INVALID_ARG;
61 }
62
63 result
64 LightSensorData::GetValue(SensorDataKey dataKey, bool& value) const
65 {
66         SysLogException(NID_UIX, E_INVALID_ARG, "[%s] %ls", GetErrorMessage(E_INVALID_ARG), W_MSG_INVALID_SENSOR_DATA_KEY);
67         return E_INVALID_ARG;
68 }
69 } } }// Tizen::Uix::Sensor