27212143ec15f80f87579262236200f7af70d3ff
[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     return "/usr/apps";
69 }
70
71 /**
72  * WRT widgets that are downloaded and installed by user
73  */
74 inline const char* GetWidgetUserDataPath()
75 {
76     return "/opt/usr/apps";
77 }
78
79 /**
80  * WRT widgets that are downloaded and installed by user
81  */
82 inline const char* GetWidgetSrcPath()
83 {
84     return "/res/wgt";
85 }
86
87 /**
88  * Directory for WebKit local storage files
89  */
90 inline const char* GetPublicVirtualRootPath()
91 {
92     return "/opt/share/widget/data/Public";
93 }
94
95 /**
96  * Directory for WebKit local storage files
97  */
98 inline const char* GetWidgetLocalStoragePath()
99 {
100     return "data/localStorage";
101 }
102
103 /**
104  * Directory for tests data (such as test widgets wgt)
105  */
106 inline const char* GetTestsDataPath()
107 {
108     return "/opt/share/widget/tests";
109 }
110
111 /**
112  * widgets exec path
113  */
114 inline const char* GetUserWidgetExecPath()
115 {
116     return "/bin";
117 }
118
119 /**
120  * widgets private data path
121  */
122 inline const char* GetWidgetPrivateStoragePath()
123 {
124     return "data";
125 }
126
127 /**
128  * widgets share directory path
129  */
130 inline const char* GetWidgetSharePath()
131 {
132     return "share";
133 }
134
135 /**
136  * widgets desktop files path
137  */
138 inline const char* GetUserWidgetDesktopPath()
139 {
140     return "/opt/share/applications";
141 }
142
143 /**
144  * wrt-client exec path
145  */
146 inline const char* GetWrtClientExec()
147 {
148     return "/usr/bin/wrt-client";
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 inline const char* GetWAC20TestRootCAFilePath()
174 {
175     return "/usr/share/wrt-engine/WAC2.0TestRootCA.cert";
176 }
177
178 /**
179  * Name of the w3c geolocation feature
180  */
181 inline const char* GetW3CGeolocationFeatureName()
182 {
183     return "http://www.w3.org/TR/geolocation-API/";
184 }
185
186 /**
187  * Prefix of package name for widgets
188  */
189 inline const char* GetPkgnamePrefix()
190 {
191     return "org.tizen.";
192 }
193
194 /**
195  * Plugin Configuration Metafile name
196  */
197 inline const char* GetPluginMetafileName()
198 {
199     return "config.xml";
200 }
201
202 /**
203  * Plugin .so prefix
204  */
205 inline const char* GetPluginPrefix()
206 {
207     return "libwrt-plugins-";
208 }
209
210 /**
211  * Plugin .so suffix
212  */
213 inline const char* GetPluginSuffix()
214 {
215     return ".so";
216 }
217
218 /**
219  * WRT device plugins installation required
220  * File which indicate that new plugins
221  * are available and should be installed
222  */
223 inline const char* GetPluginInstallInitializerName()
224 {
225     return "/opt/share/widget/plugin-installation-required";
226 }
227
228 /**
229  * File with certificate fingerprints list.
230  */
231
232 inline const char* GetFingerprintListFile()
233 {
234     return "/usr/share/wrt-engine/fingerprint_list.xml";
235 }
236
237 inline const char* GetFingerprintListSchema()
238 {
239     return "/usr/share/wrt-engine/fingerprint_list.xsd";
240 }
241
242 inline const char* GetVCoreDatabaseFilePath()
243 {
244     return "/opt/dbspace/.cert_svc_vcore.db";
245 }
246
247 /**
248  * widgets cookie database file name
249  */
250 inline const char* GetCookieDatabaseFile()
251 {
252     return ".cookie.db";
253 }
254
255 /**
256  * widget interface database file name
257  */
258 inline const char* GetWidgetInterfaceDatabaseFile()
259 {
260     return ".widget_interface.db";
261 }
262
263 inline const char* GetTmpDirPath()
264 {
265     return "/tmp";
266 }
267
268 inline const char* GetWACVersion()
269 {
270     return "2.0";
271 }
272
273 inline const char* GetTizenVersion()
274 {
275     return "1.0";
276 }
277
278 inline const char* GetShareDirectoryPath()
279 {
280     return "/opt/share";
281 }
282
283 inline const char* GetTempInstallInfoPath()
284 {
285     return "/opt/share/widget/temp_info";
286 }
287 } // namespace GlobalConfig
288 } // namespace WrtDB
289
290 #endif // GLOBAL_CONFIG_H