2 // Tizen Web Device API
3 // Copyright (c) 2014 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.h"
28 #define BADGE_FEATURE_API_BADGE "http://tizen.org/privilege/notification"
30 #define BADGE_DEVICE_CAP_BADGE "notification"
32 using namespace WrtDeviceApis::Commons;
37 static FunctionMapping createBadgeFunctions();
39 static FunctionMapping BadgeFunctions =
40 createBadgeFunctions();
42 DEFINE_FUNCTION_GETTER(BADGE, BadgeFunctions);
44 static FunctionMapping createBadgeFunctions()
49 ACE_CREATE_DEVICE_CAP(DEVICE_CAP_BADGE, BADGE_DEVICE_CAP_BADGE);
51 ACE_CREATE_DEVICE_CAPS_LIST(EMPTY_DEVICE_LIST);
53 ACE_CREATE_DEVICE_CAPS_LIST(DEVICE_LIST_BADGE);
54 ACE_ADD_DEVICE_CAP(DEVICE_LIST_BADGE, DEVICE_CAP_BADGE);
59 ACE_CREATE_FEATURE(FEATURE_BADGE, BADGE_FEATURE_API_BADGE);
61 ACE_CREATE_FEATURE_LIST(BADGE_FEATURES_BADGE);
62 ACE_ADD_API_FEATURE(BADGE_FEATURES_BADGE, FEATURE_BADGE);
68 FunctionMapping BadgeMapping;
70 AceFunction BadgeFunc = ACE_CREATE_FUNCTION(
76 BadgeMapping.insert(std::make_pair(