merge with master
[platform/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 widgets that are downloaded and installed by user
57  */
58 inline const char* GetUserInstalledWidgetPath()
59 {
60     return "/opt/usr/apps";
61 }
62
63 /**
64  * WRT widgets that are preloaded
65  */
66 inline const char* GetUserPreloadedWidgetPath()
67 {
68     // temp
69     // return "/usr/apps";
70
71     return "/opt/usr/apps";
72 }
73
74 /**
75  * WRT widgets that are downloaded and installed by user
76  */
77 inline const char* GetWidgetUserDataPath()
78 {
79     return "/opt/usr/apps";
80 }
81
82 /**
83  * WRT widgets that are downloaded and installed by user
84  */
85 inline const char* GetWidgetSrcPath()
86 {
87     return "/res/wgt";
88 }
89
90 /**
91  * Directory for WebKit local storage files
92  */
93 inline const char* GetPublicVirtualRootPath()
94 {
95     return "/opt/share/widget/data/Public";
96 }
97
98 /**
99  * Directory for WebKit local storage files
100  */
101 inline const char* GetWidgetLocalStoragePath()
102 {
103     return "data/localStorage";
104 }
105
106 /**
107  * Directory for tests data (such as test widgets wgt)
108  */
109 inline const char* GetTestsDataPath()
110 {
111     return "/opt/share/widget/tests";
112 }
113
114 /**
115  * widgets exec path
116  */
117 inline const char* GetUserWidgetExecPath()
118 {
119     return "/bin";
120 }
121
122 /**
123  * widgets private data path
124  */
125 inline const char* GetWidgetPrivateStoragePath()
126 {
127     return "data";
128 }
129
130 /**
131  * widgets share directory path
132  */
133 inline const char* GetWidgetSharePath()
134 {
135     return "share";
136 }
137
138 /**
139  * widgets desktop files path
140  */
141 inline const char* GetUserWidgetDesktopPath()
142 {
143     return "/opt/share/applications";
144 }
145
146 /**
147  * wrt-client exec path
148  */
149 inline const char* GetWrtClientExec()
150 {
151     return "/usr/bin/wrt-client";
152 }
153
154 /**
155  * widgets desktop icon path
156  */
157 inline const char* GetUserWidgetDesktopIconPath()
158 {
159     return "/opt/share/icons/default/small";
160 }
161
162 /**
163  * widgets default icon file
164  */
165 inline const char* GetUserWidgetDefaultIconFile()
166 {
167     return "/usr/share/wrt-engine/wrt_widget_default_icon.png";
168 }
169
170 inline const char* GetSignatureXmlSchema()
171 {
172     //TODO please rename, this filename is not descriptive enough
173     return "/usr/share/wrt-engine/schema.xsd";
174 }
175
176 inline const char* GetWAC20TestRootCAFilePath()
177 {
178     return "/usr/share/wrt-engine/WAC2.0TestRootCA.cert";
179 }
180
181 /**
182  * Name of the w3c geolocation feature
183  */
184 inline const char* GetW3CGeolocationFeatureName()
185 {
186     return "http://www.w3.org/TR/geolocation-API/";
187 }
188
189 /**
190  * Prefix of package name for widgets
191  */
192 inline const char* GetPkgnamePrefix()
193 {
194     return "org.tizen.";
195 }
196
197 /**
198  * Plugin Configuration Metafile name
199  */
200 inline const char* GetPluginMetafileName()
201 {
202     return "config.xml";
203 }
204
205 /**
206  * Plugin .so prefix
207  */
208 inline const char* GetPluginPrefix()
209 {
210     return "libwrt-plugins-";
211 }
212
213 /**
214  * Plugin .so suffix
215  */
216 inline const char* GetPluginSuffix()
217 {
218     return ".so";
219 }
220
221 /**
222  * WRT device plugins installation required
223  * File which indicate that new plugins
224  * are available and should be installed
225  */
226 inline const char* GetPluginInstallInitializerName()
227 {
228     return "/opt/share/widget/plugin-installation-required";
229 }
230
231 /**
232  * File with certificate fingerprints list.
233  */
234
235 inline const char* GetFingerprintListFile()
236 {
237     return "/usr/share/wrt-engine/fingerprint_list.xml";
238 }
239
240 inline const char* GetFingerprintListSchema()
241 {
242     return "/usr/share/wrt-engine/fingerprint_list.xsd";
243 }
244
245 inline const char* GetVCoreDatabaseFilePath()
246 {
247     return "/opt/dbspace/.cert_svc_vcore.db";
248 }
249
250 /**
251  * widgets cookie database file name
252  */
253 inline const char* GetCookieDatabaseFile()
254 {
255     return ".cookie.db";
256 }
257
258 /**
259  * widget interface database file name
260  */
261 inline const char* GetWidgetInterfaceDatabaseFile()
262 {
263     return ".widget_interface.db";
264 }
265
266 inline const char* GetTmpDirPath()
267 {
268     return "/tmp";
269 }
270
271 inline const char* GetWACVersion()
272 {
273     return "2.0";
274 }
275
276 inline const char* GetTizenVersion()
277 {
278     return "2.1";
279 }
280
281 inline const char* GetShareDirectoryPath()
282 {
283     return "/opt/share";
284 }
285
286 inline const char* GetTempInstallInfoPath()
287 {
288     return "/opt/share/widget/temp_info";
289 }
290
291 inline const char* GetVconfKeyPrefixPath()
292 {
293     return "file/private";
294 }
295
296 inline const char* GetVconfKeyPopupUsagePath()
297 {
298     return "/popup_usage";
299 }
300
301 inline const char* GetVconfKeyGeolocationUsagePath()
302 {
303     return "/geolocation_usage";
304 }
305
306 inline const char* GetVconfKeyWebNotificationUsagePath()
307 {
308     return "/web_notification_usage";
309 }
310
311 inline const char* GetVconfKeyWebDatabaseUsagePath()
312 {
313     return "/web_database_usage";
314 }
315
316 inline const char* GetVconfKeyFilesystemUsagePath()
317 {
318     return "/filesystem_usage";
319 }
320
321 inline const char* GetVconfKeyMemorySavingModePath()
322 {
323     return "/memory_saving_mode";
324 }
325 } // namespace GlobalConfig
326 } // namespace WrtDB
327
328 #endif // GLOBAL_CONFIG_H