Initialize Tizen 2.3
[framework/web/wrt-commons.git] / modules_wearable / widget_dao / include / dpl / wrt-dao-ro / widget_dao_read_only.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  * This file contains the declaration of widget dao class.
18  *
19  * @file    widget_dao_read_only.h
20  * @author  Yang Jie (jie2.yang@samsung.com)
21  * @author  Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
22  * @author  Pawel Sikorski (p.sikorski@samsung.com)
23  * @version 1.0
24  * @brief   This file contains the declaration of widget dao
25  */
26
27 #ifndef _WRT_SRC_CONFIGURATION_WIDGET_DAO_READ_ONLY_H_
28 #define _WRT_SRC_CONFIGURATION_WIDGET_DAO_READ_ONLY_H_
29
30 #include <time.h>
31 #include <list>
32 #include <string>
33 #include <dpl/availability.h>
34 #include <dpl/string.h>
35 #include <dpl/exception.h>
36 #include <dpl/db/orm.h>
37 #include <dpl/optional_typedefs.h>
38 #include <dpl/wrt-dao-ro/config_parser_data.h>
39 #include <dpl/wrt-dao-ro/property_dao_read_only.h>
40 #include <dpl/wrt-dao-ro/common_dao_types.h>
41
42 namespace WrtDB {
43 enum CertificateSource {
44     SIGNATURE_AUTHOR = 0,
45     SIGNATURE_DISTRIBUTOR = 1,
46     SIGNATURE_DISTRIBUTOR2 = 2,
47     SIGNATURE_UNKNOWN = 3
48 };
49
50 struct WidgetLocalizedInfo
51 {
52     DPL::OptionalString name;
53     DPL::OptionalString shortName;
54     DPL::OptionalString description;
55     DPL::OptionalString license;
56     DPL::OptionalString licenseHref;
57 };
58
59 /**
60  * CertificateData
61  * A structure to hold certificate fingerprints.
62  */
63 struct WidgetCertificateData
64 {
65     enum Owner { AUTHOR, DISTRIBUTOR, DISTRIBUTOR2, UNKNOWN };
66     enum Type { ROOT, ENDENTITY };
67
68     // type of signature: author/distributor
69     Owner owner;
70     // indicates whether this is ca certificate
71     Type type;
72
73     // chain id number: relative BASE, where BASE is signatureBASE.xml
74     int chainId;
75     // certificate fingerprint digested by md5
76     std::string strMD5Fingerprint;
77     // certificate fingerprint digestef by sha1
78     std::string strSHA1Fingerprint;
79     // Common name field in certificate
80     DPL::String strCommonName;
81
82     bool operator== (const WidgetCertificateData& certData) const
83     {
84         return certData.chainId == chainId &&
85                certData.owner == owner &&
86                certData.strCommonName == strCommonName &&
87                certData.strMD5Fingerprint == strMD5Fingerprint &&
88                certData.strSHA1Fingerprint == strSHA1Fingerprint;
89     }
90 };
91
92 typedef std::list<WidgetCertificateData> WidgetCertificateDataList;
93
94 typedef DPL::String Locale;
95 typedef std::set<Locale> LocaleSet;
96 typedef std::list<std::string> ExternalLocationList;
97
98 /**
99  * WidgetRegisterInfo
100  * A structure to hold widget's information needed to be registered.
101  * @see WidgetConfigurationInfo
102  */
103 struct WidgetRegisterInfo
104 {
105     struct LocalizedIcon : public ConfigParserData::Icon
106     {
107         LocalizedIcon(const ConfigParserData::Icon& icon,
108                       const LocaleSet& _availableLocales) :
109             ConfigParserData::Icon(icon),
110             availableLocales(_availableLocales)
111         {}
112
113         LocaleSet availableLocales;
114     };
115
116     struct StartFileProperties
117     {
118         DPL::String encoding;
119         DPL::String type;
120     };
121
122     typedef std::map<Locale,
123                      StartFileProperties> StartFilePropertiesForLocalesMap;
124     struct LocalizedStartFile
125     {
126         DPL::String path;
127         StartFilePropertiesForLocalesMap propertiesForLocales;
128     };
129
130     typedef std::list<LocalizedIcon> LocalizedIconList;
131     typedef std::list<LocalizedStartFile> LocalizedStartFileList;
132     struct LocalizationData
133     {
134         LocalizedIconList icons;
135         LocalizedStartFileList startFiles;
136     };
137
138     //Constructor
139     WidgetRegisterInfo() :
140         webAppType(APP_TYPE_UNKNOWN),
141         configInfo(),
142         packagingType(PKG_TYPE_UNKNOWN)
143     {}
144
145     WidgetType webAppType;
146     DPL::OptionalString guid;
147     DPL::OptionalString version;
148     DPL::OptionalString minVersion;
149     std::string baseFolder;
150     ConfigParserData configInfo;
151     LocalizationData localizationData;
152
153     TizenPkgId tzPkgid;
154     TizenAppId tzAppid;
155     TizenAppId tzBackupAppid;
156
157     time_t installedTime;
158     PackagingType packagingType;
159     EncryptedFileList encryptedFiles;
160     ExternalLocationList externalLocations;
161     DPL::OptionalString widgetInstalledPath;
162 };
163
164 typedef std::list<std::string> CertificateChainList;
165 class IWidgetSecurity
166 {
167   public:
168     virtual ~IWidgetSecurity();
169
170     virtual const WidgetCertificateDataList& getCertificateList() const = 0;
171
172     virtual bool isRecognized() const = 0;
173
174     virtual bool isDistributorSigned() const = 0;
175
176     virtual void getCertificateChainList(CertificateChainList& list,
177                                          CertificateSource source) const = 0;
178 };
179
180 /**
181  * WidgetAuthorInfo.
182  * Structure to hold the information of widget's author.
183  */
184 struct WidgetAuthorInfo
185 {
186     DPL::OptionalString name;
187     DPL::OptionalString email;
188     DPL::OptionalString href;
189 };
190
191 typedef std::list <std::string> WidgetCertificateCNList;
192 typedef std::list<DPL::String> LanguageTagList;
193 typedef std::list<std::string> HostList;
194 typedef std::list<std::string> FingerPrintList;
195
196 class WidgetDAOReadOnly
197 {
198   public:
199     /**
200      * WidgetDAO Exception classes
201      */
202     class Exception
203     {
204       public:
205         DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
206         DECLARE_EXCEPTION_TYPE(Base, DatabaseError)
207         DECLARE_EXCEPTION_TYPE(Base, ReadOnlyProperty)
208         DECLARE_EXCEPTION_TYPE(Base, GUIDisNull)
209         DECLARE_EXCEPTION_TYPE(Base, UnexpectedEmptyResult)
210         DECLARE_EXCEPTION_TYPE(Base, WidgetNotExist)
211         DECLARE_EXCEPTION_TYPE(Base, AlreadyRegistered)
212     };
213
214   protected:
215     DbWidgetHandle m_widgetHandle;
216
217   public:
218     struct WidgetLocalizedIconRow
219     {
220         int appId;
221         int iconId;
222         DPL::String widgetLocale;
223     };
224     typedef std::list<WidgetLocalizedIconRow> WidgetLocalizedIconList;
225
226     struct WidgetIconRow
227     {
228         int iconId;
229         int appId;
230         DPL::String iconSrc;
231         DPL::OptionalInt iconWidth;
232         DPL::OptionalInt iconHeight;
233     };
234     typedef std::list<WidgetIconRow> WidgetIconList;
235
236     struct WidgetStartFileRow
237     {
238         int startFileId;
239         int appId;
240         DPL::String src;
241     };
242     typedef std::list<WidgetStartFileRow> WidgetStartFileList;
243
244     struct WidgetLocalizedStartFileRow
245     {
246         int startFileId;
247         int appId;
248         DPL::String widgetLocale;
249         DPL::String type;
250         DPL::String encoding;
251     };
252     typedef std::list<WidgetLocalizedStartFileRow> LocalizedStartFileList;
253
254     /**
255      * This is a constructor.
256      *
257      * @param[in] widgetHandle application id of widget.
258      */
259     WidgetDAOReadOnly(DbWidgetHandle widgetHandle);
260     WidgetDAOReadOnly(DPL::OptionalString widgetGUID);
261     WidgetDAOReadOnly(WrtDB::TizenAppId tzAppid);
262
263     /**
264      * Destructor
265      */
266     virtual ~WidgetDAOReadOnly();
267
268     /**
269      * This method returns widget handle(m_widgetHandle).
270      *
271      * @return widget handle(m_widgetHandle).
272      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
273      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
274      * DB table.
275      */
276     DbWidgetHandle getHandle() const;
277     static DbWidgetHandle getHandle(const WidgetGUID GUID);
278     static DbWidgetHandle getHandle(const DPL::String tzAppId);
279     static DbWidgetHandle getHandleByPkgId(const DPL::String pkgId);
280
281     /**
282      * This method Returns tizen application id for the specified web application
283      * @return TizenAppId
284      */
285     TizenAppId getTzAppId() const DPL_DEPRECATED_WITH_MESSAGE("Use getTizenAppId");
286     static TizenAppId getTzAppId(const WidgetGUID GUID) DPL_DEPRECATED_WITH_MESSAGE("Use getTizenAppId");
287     static TizenAppId getTzAppId(const DbWidgetHandle handle) DPL_DEPRECATED_WITH_MESSAGE("Use getTizenAppId");
288     static TizenAppId getTzAppId(const TizenPkgId tizenPkgId) DPL_DEPRECATED_WITH_MESSAGE("Use getTizenAppId");
289     TizenAppId getTizenAppId() const;
290     static TizenAppId getTizenAppId(const WidgetGUID GUID);
291     static TizenAppId getTizenAppId(const DbWidgetHandle handle);
292     static TizenAppId getTizenAppId(const TizenPkgId tizenPkgId);
293
294     /**
295      * This method returns list of installed tizen application id
296      * @return TizenAppIdList
297      */
298     static TizenAppIdList getTizenAppidList() DPL_DEPRECATED_WITH_MESSAGE("Use getTizenAppIdList");
299     static TizenAppIdList getTizenAppIdList();
300     static std::list<TizenAppId> getTzAppIdList(const TizenPkgId tzPkgid);
301
302     /**
303      * Returns TizenPkgId for the specified widget
304      *
305      * @return TizenPkgId;
306      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
307      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
308      * DB table.
309      */
310
311     TizenPkgId getTzPkgId() const DPL_DEPRECATED_WITH_MESSAGE("Use getTizenPkgId");
312     static TizenPkgId getTzPkgId(const DbWidgetHandle handle) DPL_DEPRECATED_WITH_MESSAGE("Use getTizenPkgId");
313     static TizenPkgId getTzPkgId(const TizenAppId tzAppid) DPL_DEPRECATED_WITH_MESSAGE("Use getTizenPkgId");
314     TizenPkgId getTizenPkgId() const;
315     static TizenPkgId getTizenPkgId(const DbWidgetHandle handle);
316     static TizenPkgId getTizenPkgId(const TizenAppId tzAppid);
317
318     /**
319      * This method returns list of tizen package list of installed packages
320      * @return list of TizenPkgIdList of installed packages
321      */
322     static TizenPkgIdList getTizenPkgidList() DPL_DEPRECATED_WITH_MESSAGE("Use getTizenPkgIdList");
323     static TizenPkgIdList getTizenPkgIdList();
324
325     /**
326      * This method returns the root directory of widget resource.
327      *
328      * @return path name of root directory.
329      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
330      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
331      * DB table.
332      */
333     virtual DPL::String getPath() const;
334
335     DPL::String getFullPath() const;
336
337     /**
338      * This method returns the preferred size of the widget,
339      * including width and height.
340      *
341      * @see DbWidgetSize
342      * @return An structure type variable to hold widget's size.
343      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
344      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching
345      *                                          DB table.
346      */
347     DbWidgetSize getPreferredSize() const;
348
349     /**
350      * This method returns the type of the widget.
351      *
352      * @return WidgetType
353      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
354      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching
355      *                                          records in DB table.
356      */
357     WidgetType getWidgetType() const;
358
359     /**
360      * This method returns the id of the widget.
361      *
362      * @return widget id
363      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
364      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
365      *  DB table.
366      */
367     WidgetGUID getGUID() const;
368
369     /**
370      * This method returns the defaultlocale for the widget.
371      *
372      * @return defaultlocale
373      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
374      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
375      *  DB table.
376      */
377     DPL::OptionalString getDefaultlocale() const;
378
379     /**
380      * This method returns list of localized icons files;
381      *
382      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
383      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
384      *  DB table.
385      */
386     WidgetLocalizedIconList getLocalizedIconList() const;
387
388     /**
389      * This method returns list of icons files;
390      *
391      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
392      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
393      *  DB table.
394      */
395     WidgetIconList getIconList() const;
396
397     /**
398      * This method returns list of localized start files;
399      *
400      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
401      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
402      *  DB table.
403      */
404     LocalizedStartFileList getLocalizedStartFileList() const;
405
406     /**
407      * This method returns list of start files;
408      *
409      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
410      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
411      *  DB table.
412      */
413     WidgetStartFileList getStartFileList() const;
414
415     /**
416      * @param[out] outAccessInfoList list filled with access info structures
417      */
418     void getWidgetAccessInfo(WidgetAccessInfoList& outAccessInfoList) const;
419     void getWidgetAllowNavigationInfo(
420         WidgetAllowNavigationInfoList& allowNavigationInfoList) const;
421
422     /**
423      * This method returns window mode of widget.
424      *
425      * @return window modes of widget
426      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
427      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
428      *  DB table.
429      */
430     WindowModeList getWindowModes() const;
431
432     /**
433      * This method returns the version of the widget.
434      *
435      * @return version of widget
436      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
437      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
438      *  DB table.
439      */
440     DPL::OptionalString getVersion() const;
441
442     /**
443      * This method is used as a getter for csp policy of widget. It should be
444      * provided in configuration file.
445      * @return global csp policy for widget
446      */
447     DPL::OptionalString getCspPolicy() const;
448
449     /**
450      * This method is used as a getter for report only csp policy of widget.
451      * It may be provided in configuration file.
452      * @return global csp report only policy for widget
453      */
454     DPL::OptionalString getCspPolicyReportOnly() const;
455
456     /**
457      * This method returns list filed with Common Name entries from certificate.
458      *
459      * @return Common Name of Distribuotor End Entity certificate.
460      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
461      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
462      *  DB table.
463      */
464     WidgetCertificateCNList getKeyCommonNameList(
465         WidgetCertificateData::Owner owner,
466         WidgetCertificateData::Type type) const;
467
468     /**
469      * given a certificate owner (author / distributor) and type of certificate
470      * (end entity / ca)
471      * function returns list of matching fingerprints
472      */
473     FingerPrintList getKeyFingerprints(
474         WidgetCertificateData::Owner owner,
475         WidgetCertificateData::Type type) const;
476
477     /*
478      *  This method gets certificate data list for a widget from database.
479      */
480     WidgetCertificateDataList getCertificateDataList() const;
481
482     /**
483      * This method returns a list of widget features.
484      *
485      * @see WidgetFeature
486      * @see FreeFeatureList()
487      * @return list of widget features, type of list element is structure
488      *  WidgetFeature
489      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
490      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
491      *  DB table.
492      */
493     DbWidgetFeatureSet getFeaturesList() const;
494
495     /**
496      * This method checks whether widget has specified feature.
497      *
498      * @return true if has, false if has not
499      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
500      */
501     bool hasFeature(const std::string& featureName) const;
502
503     /**
504      * This method gets if widget needs webkit plugins enabled
505      *
506      * @return true: widget needs webkit plugins enabled
507      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
508      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
509      *  DB table.
510      */
511     bool getWebkitPluginsRequired() const;
512
513     /**
514      * This method returns a list of all the installed widgets.
515      *
516      * @return list of installed widgets.
517      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
518      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
519      *  DB table.
520      */
521     static DbWidgetDAOReadOnlyList getWidgetList();
522
523     /**
524      * This method gets author's infomation of a widget which is parsed from
525      *  configiration document.
526      *
527      * @see WidgetAuthorInfo
528      * @param[out] pAuthorInfo
529      * @return true if succeed, false if fail.
530      */
531     WidgetAuthorInfo getAuthorInfo() const;
532
533     /**
534      * This method gets author's name of a widget which is parsed from
535      *  configiration document.
536      *
537      * @param[out] pAuthorInfo
538      * @return author's name.
539      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
540      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
541      *  DB table.
542      */
543     DPL::OptionalString getAuthorName() const;
544
545     /**
546      * This method gets author's email of a widget which is parsed from
547      *  configiration document.
548      *
549      * @param[out] pAuthorInfo
550      * @return author's email.
551      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
552      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
553      *  DB table.
554      */
555     DPL::OptionalString getAuthorEmail() const;
556
557     /**
558      * This method gets author's email of a widget which is parsed from
559      *  configiration document.
560      *
561      * @param[out] pAuthorInfo
562      * @return author's email.
563      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
564      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
565      *  DB table.
566      */
567     DPL::OptionalString getAuthorHref() const;
568
569     /**
570      * This method returns minimum version of WAC that WRT has to be compliant
571      *  to to run this widget
572      *
573      * @return Minimum version
574      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
575      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
576      *  DB table.
577      */
578     DPL::OptionalString getMinimumWacVersion() const;
579
580     /**
581      * This method get widget installed time
582      *
583      * @return time_t : return widget's install time
584      */
585     time_t getInstallTime() const;
586
587     /**
588      * This method gets widget base folder.
589      *
590      * @return widget base folder.
591      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
592      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
593      *  DB table.
594      */
595     std::string getBaseFolder() const;
596
597     /* This method checks read only flag for given property
598      */
599     DPL::OptionalInt checkPropertyReadFlag(
600         const PropertyDAOReadOnly::WidgetPropertyKey &key) const;
601
602     /* This method gets widget property key list
603      */
604     PropertyDAOReadOnly::WidgetPropertyKeyList getPropertyKeyList() const;
605
606     /* This method gets widget property list
607      */
608     PropertyDAOReadOnly::WidgetPreferenceList getPropertyList() const;
609
610     /* This method get widget property value
611      */
612     PropertyDAOReadOnly::WidgetPropertyValue getPropertyValue(
613         const PropertyDAOReadOnly::WidgetPropertyKey &key) const;
614
615     LanguageTagList getLanguageTags() const;
616     LanguageTagList getIconLanguageTags() const;
617
618     WidgetLocalizedInfo getLocalizedInfo(const DPL::String& languageTag) const;
619
620     bool getBackSupported() const;
621
622     static bool isWidgetInstalled(DbWidgetHandle handle);
623     static bool isWidgetInstalled(const TizenAppId & tzAppId);
624
625     /* This method get path of the splash image.
626      *
627      * @return path of the widget's splash image
628      */
629     DPL::OptionalString getSplashImgSrc() const;
630
631     ExternalLocationList getWidgetExternalLocations() const;
632
633     /*
634      * Default value is required to keep compatibility with
635      * wrt-installer and wrt.
636      */
637     CertificateChainList getWidgetCertificate(
638         CertificateSource source = SIGNATURE_DISTRIBUTOR) const;
639
640     void getWidgetSettings(WidgetSettings& outWidgetSettings) const;
641
642     /**
643      * This method gets application control list that define AUL value
644      *
645      * @return See above comment
646      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
647      */
648     void getAppControlList(
649         WidgetAppControlList& outAppControlList) const;
650
651     /**
652      * This method returns the type of the package.
653      *
654      * @return PackagingType
655      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
656      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching
657      *                                          records in DB table.
658      */
659     PackagingType getPackagingType() const;
660
661     void getEncryptedFileList(EncryptedFileList& filesList) const;
662
663     /**
664      * This method returns widget's background page filename.
665      *
666      * @return Name of file containing background page
667      */
668     DPL::OptionalString getBackgroundPage() const;
669
670     /**
671      * @brief generateTizenId generates new package id
672      *
673      * If widget do not supplies it's own tizen package id, this method can be
674      * used,
675      * although it should be removed in future.
676      *
677      * @return new tizen package id
678      */
679     static TizenPkgId generatePkgId();
680     static TizenPkgId generateTizenId()
681     {
682         return generatePkgId();
683     }
684
685     /**
686      * This method returns widget's installed path
687      *
688      * @return path of widget installed
689      */
690     DPL::OptionalString getWidgetInstalledPath() const;
691     PrivilegeList getWidgetPrivilege() const;
692     WidgetSecurityModelVersion getSecurityModelVersion() const;
693
694 };
695 } // namespace WrtDB
696
697 #endif // _WRT_SRC_CONFIGURATION_WIDGET_DAO_READ_ONLY_H_
698