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