Update wrt-commons_0.2.53
[framework/web/wrt-commons.git] / modules / widget_dao / include / dpl / wrt-dao-ro / global_config.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 /**
17  * @file    global_config.h
18  * @author  Yang Jie (jie2.yang@samsung.com)
19  * @author  Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
20  * @version 1.0
21  * @brief   This file contains global WRT config
22  */
23 #ifndef GLOBAL_CONFIG_H
24 #define GLOBAL_CONFIG_H
25
26 #include <string>
27 #include <list>
28
29 namespace WrtDB {
30 namespace GlobalConfig {
31 /**
32  * WRT database path
33  */
34 inline const char* GetWrtDatabaseFilePath()
35 {
36     return "/opt/dbspace/.wrt.db";
37 }
38
39 /**
40  * WRT origin widget interface database path
41  */
42 inline const char* GetWrtWidgetInterfaceDatabaseFilePath()
43 {
44     return "/usr/share/wrt-plugins-common/widget_interface_db.sql";
45 }
46
47 /**
48  * WRT device plugin path
49  */
50 inline const char* GetDevicePluginPath()
51 {
52     return "/usr/lib/wrt-plugins";
53 }
54
55 /**
56  * WRT factory widgets that are loaded by default
57  */
58 inline const char* GetFactoryInstalledWidgetPath()
59 {
60     return "/opt/apps/widget/system";
61 }
62
63 /**
64  * WRT widgets that are downloaded and installed by user
65  */
66 inline const char* GetUserInstalledWidgetPath()
67 {
68     return "/opt/apps";
69 }
70
71 /**
72  * WRT widgets that are downloaded and installed by user
73  */
74 inline const char* GetWidgetSrcPath()
75 {
76     return "res/wgt";
77 }
78
79 /**
80  * Directory for WebKit local storage files
81  */
82 inline const char* GetPublicVirtualRootPath()
83 {
84     return "/opt/apps/widget/data/Public";
85 }
86
87 /**
88  * Directory for WebKit local storage files
89  */
90 inline const char* GetWidgetLocalStoragePath()
91 {
92     return "data/localStorage";
93 }
94
95 /**
96  * Directory for tests data (such as test widgets wgt)
97  */
98 inline const char* GetTestsDataPath()
99 {
100     return "/opt/apps/widget/tests";
101 }
102
103 /**
104  * widgets exec path
105  */
106 inline const char* GetUserWidgetExecPath()
107 {
108     return "bin";
109 }
110
111 /**
112  * widgets private data path
113  */
114 inline const char* GetWidgetPrivateStoragePath()
115 {
116     return "data";
117 }
118
119
120 /**
121  * widgets desktop files path
122  */
123 inline const char* GetUserWidgetDesktopPath()
124 {
125     return "/opt/share/applications";
126 }
127
128 /**
129  * wrt-client exec path
130  */
131 inline const char* GetWrtClientExec()
132 {
133     return "/usr/bin/wrt-client";
134 }
135
136 /**
137  * widgets desktop icon path
138  */
139 inline const char* GetUserWidgetDesktopIconPath()
140 {
141     return "/opt/share/icons/default/small";
142 }
143
144 /**
145  * widgets default icon file
146  */
147 inline const char* GetUserWidgetDefaultIconFile()
148 {
149     return "/usr/share/wrt-engine/wrt_widget_default_icon.png";
150 }
151
152 /**
153  * WRT downloaded widgets
154  */
155 // KW inline const char* GetDownloadedWidgetPath()
156 // KW {
157 // KW     return "/opt/apps/widget/test-widgets";
158 // KW }
159
160 inline const char* GetSignatureXmlSchema()
161 {
162     //TODO please rename, this filename is not descriptive enough
163     return "/usr/share/wrt-engine/schema.xsd";
164 }
165
166 inline const char* GetWAC20TestRootCAFilePath()
167 {
168     return "/usr/share/wrt-engine/WAC2.0TestRootCA.cert";
169 }
170
171 /**
172  * Name of the w3c geolocation feature
173  */
174 inline const char* GetW3CGeolocationFeatureName()
175 {
176     return "http://www.w3.org/TR/geolocation-API/";
177 }
178
179 /**
180  * Prefix of package name for widgets
181  */
182 inline const char* GetPkgnamePrefix()
183 {
184     return "org.tizen.";
185 }
186
187 /**
188  * Plugin Configuration Metafile name
189  */
190 inline const char* GetPluginMetafileName()
191 {
192     return "config.xml";
193 }
194
195 /**
196  * Plugin .so prefix
197  */
198 inline const char* GetPluginPrefix()
199 {
200     return "libwrt-plugins-";
201 }
202
203 /**
204  * Plugin .so suffix
205  */
206 inline const char* GetPluginSuffix()
207 {
208     return ".so";
209 }
210
211 /**
212  * WRT device plugins installation required
213  * File which indicate that new plugins
214  * are available and should be installed
215  */
216 inline const char* GetPluginInstallInitializerName()
217 {
218     return "/opt/apps/widget/plugin-installation-required";
219 }
220
221 /**
222  * File with certificate fingerprints list.
223  */
224
225 inline const char* GetFingerprintListFile()
226 {
227     return "/usr/share/wrt-engine/fingerprint_list.xml";
228 }
229
230 inline const char* GetFingerprintListSchema()
231 {
232     return "/usr/share/wrt-engine/fingerprint_list.xsd";
233 }
234
235 inline const char* GetVCoreDatabaseFilePath()
236 {
237     return "/opt/dbspace/.vcore.db";
238 }
239
240 /**
241  * widgets cookie database file name
242  */
243 inline const char* GetCookieDatabaseFile()
244 {
245     return ".cookie.db";
246 }
247
248 /**
249  * widget interface database file name
250  */
251 inline const char* GetWidgetInterfaceDatabaseFile()
252 {
253     return ".widget_interface.db";
254 }
255
256 inline const char* GetTmpDirPath()
257 {
258     return "/tmp";
259 }
260
261 inline const char* GetWACVersion()
262 {
263     return "2.0";
264 }
265
266 inline const char* GetTizenVersion()
267 {
268     return "1.0";
269 }
270
271 inline const char* GetShareDirectoryPath()
272 {
273     return "/opt/share";
274 }
275
276 inline const char* GetTempInstallInfoPath()
277 {
278     return "/opt/apps/widget/temp_info";
279 }
280 } // namespace GlobalConfig
281 } // namespace WrtDB
282
283 #endif // GLOBAL_CONFIG_H