Initialize Tizen 2.3
[framework/web/wrt-commons.git] / modules_wearable / 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 device plugin path
41  */
42 inline const char* GetDevicePluginPath()
43 {
44     return "/usr/lib/wrt-plugins";
45 }
46
47 /**
48  * WRT widgets that are downloaded and installed by user
49  */
50 inline const char* GetUserInstalledWidgetPath()
51 {
52     return "/opt/usr/apps";
53 }
54
55 /**
56  * WRT widgets that are preloaded
57  */
58 inline const char* GetUserPreloadedWidgetPath()
59 {
60     return "/usr/apps";
61 }
62
63 /**
64  * WRT widgets that are downloaded and installed by user
65  */
66 inline const char* GetWidgetUserDataPath()
67 {
68     return "/opt/usr/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/share/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/share/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  * widgets private temp data path
121  */
122 inline const char* GetWidgetPrivateTempStoragePath()
123 {
124     return "tmp";
125 }
126
127 /**
128  * widgets desktop files path
129  */
130 inline const char* GetUserWidgetDesktopPath()
131 {
132     return "/opt/share/applications";
133 }
134
135 /**
136  * wrt-client exec path
137  */
138 inline const char* GetWrtClientExec()
139 {
140     return "/usr/bin/wrt-client";
141 }
142
143 /**
144  * wrt-service exec path
145  */
146 inline const char* GetWrtServiceExec()
147 {
148     return "/usr/bin/wrt-service";
149 }
150
151 /**
152  * widgets desktop icon path
153  */
154 inline const char* GetUserWidgetDesktopIconPath()
155 {
156     return "/opt/share/icons/default/small";
157 }
158
159 /**
160  * widgets default icon file
161  */
162 inline const char* GetUserWidgetDefaultIconFile()
163 {
164     return "/usr/share/wrt-engine/wrt_widget_default_icon.png";
165 }
166
167 inline const char* GetSignatureXmlSchema()
168 {
169     //TODO please rename, this filename is not descriptive enough
170     return "/usr/share/wrt-engine/schema.xsd";
171 }
172
173 /**
174  * Name of the w3c geolocation feature
175  */
176 inline const char* GetW3CGeolocationFeatureName()
177 {
178     return "http://www.w3.org/TR/geolocation-API/";
179 }
180
181 /**
182  * Prefix of package name for widgets
183  */
184 inline const char* GetPkgnamePrefix()
185 {
186     return "org.tizen.";
187 }
188
189 /**
190  * Plugin Configuration Metafile name
191  */
192 inline const char* GetPluginMetafileName()
193 {
194     return "config.xml";
195 }
196
197 /**
198  * Plugin .so prefix
199  */
200 inline const char* GetPluginPrefix()
201 {
202     return "libwrt-plugins-";
203 }
204
205 /**
206  * Plugin .so suffix
207  */
208 inline const char* GetPluginSuffix()
209 {
210     return ".so";
211 }
212
213 /**
214  * WRT device plugins installation required
215  * File which indicate that new plugins
216  * are available and should be installed
217  */
218 inline const char* GetPluginInstallInitializerName()
219 {
220     return "/opt/share/widget/plugin-installation-required";
221 }
222
223 /**
224  * File with certificate fingerprints list.
225  */
226
227 inline const char* GetFingerprintListFile()
228 {
229     return "/usr/share/wrt-engine/fingerprint_list.xml";
230 }
231
232 inline const char* GetFingerprintListSchema()
233 {
234     return "/usr/share/wrt-engine/fingerprint_list.xsd";
235 }
236
237 inline const char* GetVCoreDatabaseFilePath()
238 {
239     return "/opt/dbspace/.cert_svc_vcore.db";
240 }
241
242 /**
243  * widgets cookie database file name
244  */
245 inline const char* GetCookieDatabaseFile()
246 {
247     return ".cookie.db";
248 }
249
250 inline const char* GetTmpDirPath()
251 {
252     return "/tmp";
253 }
254
255 inline const char* GetTizenVersion()
256 {
257     return "2.2";
258 }
259
260 inline const char* GetShareDirectoryPath()
261 {
262     return "/opt/share";
263 }
264
265 inline const char* GetTempInstallInfoPath()
266 {
267     return "/opt/share/widget/temp_info";
268 }
269
270 inline const char* GetWidgetSharedPath()
271 {
272     return "/shared";
273 }
274
275 inline const char* GetWidgetDataPath()
276 {
277     return "/data";
278 }
279
280 inline const char* GetWidgetTrustedPath()
281 {
282     return "/trusted";
283 }
284
285 inline const char* GetWidgetResPath()
286 {
287     return "/res";
288 }
289
290 inline const char* GetNPRuntimePluginsPath()
291 {
292 #ifdef __arm__
293     return "plugins/arm";
294 #else
295     return "plugins/x86";
296 #endif
297 }
298
299 inline const char* GetBackupDatabaseSuffix()
300 {
301     return ".backup";
302 }
303
304 inline const char* GetManifestPath()
305 {
306     return "/opt/share/packages";
307 }
308
309 inline const char* GetPreloadManifestPath()
310 {
311     return "/usr/share/packages";
312 }
313
314 inline const char* GetRecoveryStatusPath()
315 {
316     return "/usr/share/packages/.recovery/wgt";
317 }
318 } // namespace GlobalConfig
319 } // namespace WrtDB
320
321 #endif // GLOBAL_CONFIG_H