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