tizen 2.3 release
[framework/web/wearable/wrt-plugins-tizen.git] / src / Sensor / plugin_config.h
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2014 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 #ifndef _SENSOR_PLUGIN_CONFIG_H_
20 #define _SENSOR_PLUGIN_CONFIG_H_
21
22 #include <string>
23 #include <Commons/FunctionDeclaration.h>
24 #include <Logger.h>
25
26 namespace DeviceAPI {
27 namespace Sensor {
28
29 // attributes
30 #define SENSOR_ATTRIBUTE_SENSOR_TYPE "sensorType"
31
32 #define TIZEN_SENSOR_TYPE_LIGHT "LIGHT"
33 #define TIZEN_SENSOR_TYPE_PROXIMITY "PROXIMITY"
34 #define TIZEN_SENSOR_TYPE_MAGNETIC "MAGNETIC"
35 #define TIZEN_SENSOR_TYPE_PRESSURE "PRESSURE"
36 #define TIZEN_SENSOR_TYPE_ULTRAVIOLET "ULTRAVIOLET"
37
38 #define TIZEN_LIGHT_DATA_LIGHT_LEVEL "lightLevel"
39 #define TIZEN_PROXIMITY_DATA_PROXIMITY_LEVEL "proximityState"
40 #define TIZEN_PROXIMITY_DATA_MAGNETIC_X "x"
41 #define TIZEN_PROXIMITY_DATA_MAGNETIC_Y "y"
42 #define TIZEN_PROXIMITY_DATA_MAGNETIC_Z "z"
43 #define TIZEN_PROXIMITY_DATA_MAGNETIC_ACCURACY "accuracy"
44 #define TIZEN_PRESSURE_DATA_PRESSURE "pressure"
45 #define TIZEN_ULTRAVIOLET_DATA_ULTRAVIOLET_LEVEL "ultravioletLevel"
46
47 // functions
48 #define SENSOR_SERVICE_API_GET_DEFAULT_SENSOR "getDefaultSensor"
49 #define SENSOR_SERVICE_API_GET_AVAILABLE_SENSOR "getAvailableSensors"
50
51 #define SENSOR_API_START "start"
52 #define SENSOR_API_STOP "stop"
53 #define SENSOR_API_SET_CHANGE_LISTENER "setChangeListener"
54 #define SENSOR_API_UNSET_CHANGE_LISTENER "unsetChangeListener"
55
56 #define SENSOR_API_GET_PROXIMITY_SENSOR_DATA "getProximitySensorData"
57 #define SENSOR_API_GET_LIGHT_SENSOR_DATA "getLightSensorData"
58 #define SENSOR_API_GET_MAGNETIC_SENSOR_DATA "getMagneticSensorData"
59 #define SENSOR_API_GET_PRESSURE_SENSOR_DATA "getPressureSensorData"
60 #define SENSOR_API_GET_ULTRAVIOLET_SENSOR_DATA "getUltravioletSensorData"
61
62 DECLARE_FUNCTION_GETTER(Sensor);
63
64 #define SENSOR_CHECK_ACCESS(functionName) \
65     aceCheckAccess<AceFunctionGetter, DefaultArgsVerifier<> >( \
66     getSensorFunctionData, \
67     functionName)
68
69 }
70 }
71
72 #endif // _SENSOR_PLUGIN_CONFIG_H_