Update change log and spec for wrt-plugins-tizen_0.4.51
[framework/web/wrt-plugins-tizen.git] / src / WebSetting / plugin_config.cpp
1 //
2 // Tizen Web Device API
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 #include <Commons/FunctionDefinition.h>
20 #include <Commons/FunctionDeclaration.h>
21 #include <Commons/Exception.h>
22 #include <map>
23
24 #include "plugin_config.h"
25
26 #define WEBSETTING_FEATURE_API "http://tizen.org/privilege/websetting"
27 #define WEBSETTING_DEVICE_CAP "websetting"
28
29 using namespace WrtDeviceApis::Commons;
30
31 namespace DeviceAPI
32 {
33 namespace WebSetting
34 {
35
36 static FunctionMapping createWebSettingFunctions();
37 static FunctionMapping WebSettingFunctions = createWebSettingFunctions();
38
39 #pragma GCC visibility push(default)
40
41 DEFINE_FUNCTION_GETTER(WebSetting, WebSettingFunctions);
42
43 #pragma GCC visibility pop
44
45 static FunctionMapping createWebSettingFunctions()
46 {
47     /**
48      * Device capabilities
49      */
50     ACE_CREATE_DEVICE_CAP(DEVICE_CAP_WEBSETTING, WEBSETTING_DEVICE_CAP);
51     ACE_CREATE_DEVICE_CAPS_LIST(DEVICE_LIST_WEBSETTING);
52     ACE_ADD_DEVICE_CAP(DEVICE_LIST_WEBSETTING, DEVICE_CAP_WEBSETTING);
53
54     /**
55      * Api Features
56      */
57     ACE_CREATE_FEATURE(FEATURE_WEBSETTING, WEBSETTING_FEATURE_API);
58     ACE_CREATE_FEATURE_LIST(WEBSETTING_FEATURES);
59     ACE_ADD_API_FEATURE(WEBSETTING_FEATURES, FEATURE_WEBSETTING);
60
61     /**
62      * Functions
63      */
64     FunctionMapping websettingMapping;
65
66     // remove cookies
67     AceFunction removeAllCookiesFunc = ACE_CREATE_FUNCTION(
68                                            FUNCTION_REMOVE_ALL_COOKIES,
69                                            WEB_SETTING_MANAGER_API_REMOVE_ALL_COOKIES,
70                                            WEBSETTING_FEATURES,
71                                            DEVICE_LIST_WEBSETTING);
72
73     websettingMapping.insert(std::make_pair(
74                                  WEB_SETTING_MANAGER_API_REMOVE_ALL_COOKIES,
75                                  removeAllCookiesFunc));
76
77     return websettingMapping;
78 }
79
80 } // WebSetting
81 } // DeviceAPI
82