2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <Commons/FunctionDefinition.h>
20 #include <Commons/FunctionDeclaration.h>
22 #include <Commons/Exception.h>
23 #include <dpl/exception.h>
26 #include "plugin_config_impl.h"
27 #include "plugin_config.h"
29 #define ALARM_FEATURE_API "http://tizen.org/privilege/alarm"
31 #define ALARM_DEVICE_CAP "alarm"
33 using namespace WrtDeviceApis::Commons;
38 static FunctionMapping createAlarmFunctions();
40 static FunctionMapping AlarmFunctions =
41 createAlarmFunctions();
43 DEFINE_FUNCTION_GETTER(Alarm, AlarmFunctions);
45 static FunctionMapping createAlarmFunctions()
50 ACE_CREATE_DEVICE_CAP(DEVICE_CAP_ALARM, ALARM_DEVICE_CAP);
52 ACE_CREATE_DEVICE_CAPS_LIST(DEVICE_LIST_ALARM);
53 ACE_ADD_DEVICE_CAP(DEVICE_LIST_ALARM, DEVICE_CAP_ALARM);
58 ACE_CREATE_FEATURE(FEATURE_ALARM, ALARM_FEATURE_API);
60 ACE_CREATE_FEATURE_LIST(ALARM_FEATURES);
61 ACE_ADD_API_FEATURE(ALARM_FEATURES, FEATURE_ALARM);
66 FunctionMapping alarmMapping;
69 AceFunction addFunc = ACE_CREATE_FUNCTION(
71 ALARM_FUNCTION_API_ADD,
75 alarmMapping.insert(std::make_pair(
76 ALARM_FUNCTION_API_ADD,
80 AceFunction removeFunc = ACE_CREATE_FUNCTION(
82 ALARM_FUNCTION_API_REMOVE,
86 alarmMapping.insert(std::make_pair(
87 ALARM_FUNCTION_API_REMOVE,
92 AceFunction removeAllFunc = ACE_CREATE_FUNCTION(
94 ALARM_FUNCTION_API_REMOVE_ALL,
98 alarmMapping.insert(std::make_pair(
99 ALARM_FUNCTION_API_REMOVE_ALL,