Update wrt-commons_0.2.67
[framework/web/wrt-commons.git] / modules / 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/string.h>
34 #include <dpl/exception.h>
35 #include <dpl/db/orm.h>
36 #include <dpl/optional_typedefs.h>
37 #include <dpl/wrt-dao-ro/config_parser_data.h>
38 #include <dpl/wrt-dao-ro/property_dao_read_only.h>
39 #include <dpl/wrt-dao-ro/common_dao_types.h>
40
41 namespace WrtDB {
42
43 /**
44  * Widget's signature enum.
45  * This enumerates signature type of widget.
46  */
47 enum WidgetSignatureType
48 {
49     SIGNATURE_TYPE_CARRIER = 0,
50     SIGNATURE_TYPE_IDENTIFIED,
51     SIGNATURE_TYPE_UNIDENTIFIED
52 };
53
54 enum CertificateSource {
55     SIGNATURE_DISTRIBUTOR = 0,
56     SIGNATURE_AUTHOR = 1
57 };
58
59 typedef std::list<DPL::String> StringList;
60
61 struct WidgetLocalizedInfo
62 {
63     DPL::OptionalString name;
64     DPL::OptionalString shortName;
65     DPL::OptionalString description;
66     DPL::OptionalString license;
67     DPL::OptionalString licenseHref;
68 };
69
70 /**
71  * CertificateData
72  * A structure to hold certificate fingerprints.
73  */
74 struct WidgetCertificateData
75 {
76     enum Owner { AUTHOR, DISTRIBUTOR, UNKNOWN };
77     enum Type { ROOT, ENDENTITY };
78
79     // type of signature: author/distributor
80     Owner owner;
81     // indicates whether this is ca certificate
82     Type type;
83
84     // chain id number: relative BASE, where BASE is signatureBASE.xml
85     int chainId;
86     // certificate fingerprint digested by md5
87     std::string strMD5Fingerprint;
88     // certificate fingerprint digestef by sha1
89     std::string strSHA1Fingerprint;
90     // Common name field in certificate
91     DPL::String strCommonName;
92
93     bool operator== (const WidgetCertificateData& certData) const {
94         return certData.chainId == chainId &&
95            certData.owner == owner &&
96            certData.strCommonName == strCommonName &&
97            certData.strMD5Fingerprint == strMD5Fingerprint &&
98            certData.strSHA1Fingerprint == strSHA1Fingerprint;
99     }
100 };
101
102 typedef std::list<WidgetCertificateData> WidgetCertificateDataList;
103
104 typedef DPL::String Locale;
105 typedef std::set<Locale> LocaleSet;
106
107 /**
108  * WidgetRegisterInfo
109  * A structure to hold widget's information needed to be registered.
110  * @see WidgetConfigurationInfo
111  */
112 struct WidgetRegisterInfo
113 {
114     struct LocalizedIcon : public ConfigParserData::Icon
115     {
116         LocalizedIcon(const ConfigParserData::Icon& icon,
117                 const LocaleSet& _availableLocales) :
118             ConfigParserData::Icon(icon),
119             availableLocales(_availableLocales)
120         {
121         }
122
123         LocaleSet availableLocales;
124     };
125
126     struct StartFileProperties
127     {
128         DPL::String encoding;
129         DPL::String type;
130     };
131
132     typedef std::map<Locale,
133                      StartFileProperties> StartFilePropertiesForLocalesMap;
134     struct LocalizedStartFile
135     {
136         DPL::String path;
137         StartFilePropertiesForLocalesMap propertiesForLocales;
138     };
139
140     typedef std::list<LocalizedIcon> LocalizedIconList;
141     typedef std::list<LocalizedStartFile> LocalizedStartFileList;
142     struct LocalizationData
143     {
144         LocalizedIconList icons;
145         LocalizedStartFileList startFiles;
146     };
147
148     enum SecurityDomain
149     {
150         Untrusted,
151         Trusted,
152         Operator,
153         None
154     };
155
156     //Constructor
157     WidgetRegisterInfo() :
158         type(APP_TYPE_UNKNOWN),
159         signatureType(SIGNATURE_TYPE_UNIDENTIFIED),
160         isFactoryWidget(0),
161         isTestWidget(0),
162         configInfo(),
163         pType(PKG_TYPE_UNKNOWN)
164     {
165     }
166
167     WidgetType type;
168     DPL::OptionalString guid;
169     DPL::OptionalString version;
170     DPL::OptionalString minVersion;
171     std::string shareHref;
172     std::string baseFolder;
173     WidgetSignatureType signatureType;
174     int isFactoryWidget;
175     int isTestWidget;
176     ConfigParserData configInfo;
177     LocalizationData localizationData;
178     DPL::OptionalString pkgname;
179     time_t installedTime;
180     PkgType pType;
181     EncryptedFileList encryptedFiles;
182 };
183
184 typedef std::list<std::string> CertificateChainList;
185 class IWacSecurity
186 {
187   public:
188     virtual ~IWacSecurity();
189
190     virtual const WidgetCertificateDataList& getCertificateList() const = 0;
191
192     virtual bool isRecognized() const = 0;
193
194     virtual bool isDistributorSigned() const = 0;
195
196     virtual bool isWacSigned() const = 0;
197
198     virtual void getCertificateChainList(CertificateChainList& list,
199             CertificateSource source) const = 0;
200 };
201
202 /**
203  * WidgetAuthorInfo.
204  * Structure to hold the information of widget's author.
205  */
206 struct WidgetAuthorInfo
207 {
208     DPL::OptionalString name;
209     DPL::OptionalString email;
210     DPL::OptionalString href;
211 };
212
213 /**
214  * Widget update policy
215  */
216 enum WidgetUpdatePolicy
217 {
218     WIDGET_UPDATE_MONTHLY = 0,  //< monthly update
219     WIDGET_UPDATE_WEEKLY,       //< weekly update
220     WIDGET_UPDATE_DAILY,        //< daily update
221     WIDGET_UPDATE_STARTUP,      //< update when cell phone boots
222     WIDGET_UPDATE_NEVER         //< never update
223 };
224
225 typedef std::list <std::string> WidgetCertificateCNList;
226 typedef std::list<DPL::String> LanguageTagList;
227 typedef std::list<std::string> HostList;
228 typedef std::list<std::string> FingerPrintList;
229 typedef std::list<std::string> ResourceAttributeList;
230 typedef std::list<std::string> ExternalLocationList; //TODO: if there will be many files registered std::set is better
231
232 class WidgetDAOReadOnly
233 {
234   public:
235     /**
236      * WidgetDAO Exception classes
237      */
238     class Exception
239     {
240       public:
241         DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
242         DECLARE_EXCEPTION_TYPE(Base, DatabaseError)
243         DECLARE_EXCEPTION_TYPE(Base, ReadOnlyProperty)
244         DECLARE_EXCEPTION_TYPE(Base, GUIDisNull)
245         DECLARE_EXCEPTION_TYPE(Base, UnexpectedEmptyResult)
246         DECLARE_EXCEPTION_TYPE(Base, WidgetNotExist)
247         DECLARE_EXCEPTION_TYPE(Base, AlreadyRegistered)
248     };
249
250   protected:
251     DbWidgetHandle m_widgetHandle;
252
253   public:
254     struct WidgetLocalizedIconRow
255     {
256         int appId;
257         int iconId;
258         DPL::String widgetLocale;
259     };
260     typedef std::list<WidgetLocalizedIconRow> WidgetLocalizedIconList;
261
262     struct WidgetIconRow
263     {
264         int iconId;
265         int appId;
266         DPL::String iconSrc;
267         DPL::OptionalInt iconWidth;
268         DPL::OptionalInt iconHeight;
269     };
270     typedef std::list<WidgetIconRow> WidgetIconList;
271
272     struct WidgetStartFileRow
273     {
274         int startFileId;
275         int appId;
276         DPL::String src;
277     };
278     typedef std::list<WidgetStartFileRow> WidgetStartFileList;
279
280     struct WidgetLocalizedStartFileRow
281     {
282         int startFileId;
283         int appId;
284         DPL::String widgetLocale;
285         DPL::String type;
286         DPL::String encoding;
287     };
288     typedef std::list<WidgetLocalizedStartFileRow> LocalizedStartFileList;
289
290     /**
291      * This is a constructor.
292      *
293      * @param[in] widgetHandle application id of widget.
294      */
295     WidgetDAOReadOnly(DbWidgetHandle widgetHandle);
296     WidgetDAOReadOnly(DPL::OptionalString widgetGUID);
297     WidgetDAOReadOnly(DPL::String pkgName);
298
299     /**
300      * Destructor
301      */
302     virtual ~WidgetDAOReadOnly();
303
304     /**
305      * This method returns widget handle(m_widgetHandle).
306      *
307      * @return widget handle(m_widgetHandle).
308      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
309      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in DB table.
310      */
311     DbWidgetHandle getHandle() const;
312     static DbWidgetHandle getHandle(const WidgetGUID GUID);
313     static DbWidgetHandle getHandle(const DPL::String pkgName);
314
315     /**
316      * This method returns the root directory of widget resource.
317      *
318      * @return path name of root directory.
319      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
320      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
321      * DB table.
322      */
323     DPL::String getPath() const;
324
325     DPL::String getFullPath() const;
326
327     /**
328      * This method returns the preferred size of the widget,
329      * including width and height.
330      *
331      * @see DbWidgetSize
332      * @return An structure type variable to hold widget's size.
333      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
334      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching
335      *                                          DB table.
336      */
337     DbWidgetSize getPreferredSize() const;
338
339     /**
340      * This method returns the type of the widget.
341      *
342      * @return WidgetType
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                                                 records in DB table.
346      */
347     WidgetType getWidgetType() const;
348
349     /**
350      * This method returns the id of the widget.
351      *
352      * @return widget id
353      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
354      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
355      *  DB table.
356      */
357     WidgetGUID getGUID() const;
358
359     /**
360      * This method returns the Package name of the widget.
361      *
362      * @return pkgname
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 DB table.
365      */
366     DPL::OptionalString getPkgname() const;
367
368     /**
369      * This method returns the defaultlocale for the widget.
370      *
371      * @return defaultlocale
372      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
373      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
374      *  DB table.
375      */
376     DPL::OptionalString getDefaultlocale() const;
377
378     /**
379      * This method returns list of localized icons files;
380      *
381      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
382      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
383      *  DB table.
384      */
385     WidgetLocalizedIconList getLocalizedIconList() const;
386
387     /**
388      * This method returns list of icons files;
389      *
390      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
391      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
392      *  DB table.
393      */
394     WidgetIconList getIconList() const;
395
396     /**
397      * This method returns list of localized start files;
398      *
399      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
400      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
401      *  DB table.
402      */
403     LocalizedStartFileList getLocalizedStartFileList() const;
404
405     /**
406      * This method returns list of start files;
407      *
408      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
409      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
410      *  DB table.
411      */
412     WidgetStartFileList getStartFileList() const;
413
414     /**
415      * @param[out] outAccessInfoList list filled with access info structures
416      */
417     void getWidgetAccessInfo(WidgetAccessInfoList& outAccessInfoList) const;
418
419     /**
420      * WAC 2.0 extension
421      * @return recognized status
422      */
423     bool isRecognized() const;
424
425     /**
426      * WAC 2.0 extension
427      * @return
428      */
429     bool isWacSigned() const;
430
431     /**
432      * WAC 2.0 extension
433      * @return
434      */
435     bool isDistributorSigned() const;
436
437     /**
438      * WAC 2.0 extension
439      * @return trusted status
440      */
441     bool isTrusted() const;
442
443     /**
444      * WAC 2.0 extension
445      * @return is WAC test widget
446      */
447     bool isTestWidget() const;
448
449     /**
450      * This method returns window mode of widget.
451      *
452      * @return window modes of widget
453      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
454      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
455      *  DB table.
456      */
457     WindowModeList getWindowModes() const;
458
459     /**
460      * This method returns the version of the widget.
461      *
462      * @return version of widget
463      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
464      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
465      *  DB table.
466      */
467     DPL::OptionalString getVersion() const;
468
469     /**
470      * This method returns list filed with Common Name entries from certificate.
471      *
472      * @return Common Name of Distribuotor End Entity certificate.
473      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
474      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
475      *  DB table.
476      */
477     WidgetCertificateCNList getKeyCommonNameList(
478             WidgetCertificateData::Owner owner,
479             WidgetCertificateData::Type type) const;
480
481     /**
482      * given a certificate owner (author / distributor) and type of certificate
483      * (end entity / ca)
484      * function returns list of matching fingerprints
485      */
486     FingerPrintList getKeyFingerprints(
487             WidgetCertificateData::Owner owner,
488             WidgetCertificateData::Type type) const;
489
490     /*
491      *  This method gets certificate data list for a widget from database.
492      */
493     WidgetCertificateDataList getCertificateDataList() const;
494
495     /**
496      * This method returns a list of widget features.
497      *
498      * @see WidgetFeature
499      * @see FreeFeatureList()
500      * @return list of widget features, type of list element is structure
501      *  WidgetFeature
502      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
503      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
504      *  DB table.
505      */
506     DbWidgetFeatureSet getFeaturesList() const;
507
508     static WidgetParamMap getFeatureParams(int widgetFeatureId);
509     /**
510      * This method checks whether widget has specified feature.
511      *
512      * @return true if has, false if has not
513      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
514      */
515     bool hasFeature(const std::string& featureName) const;
516
517     /**
518      * This method gets host list that widget can connect to.
519      *
520      * @return See above comment
521      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
522      */
523     HostList getAccessHostList() const;
524
525     /**
526      * This method gets widget's access on network: true or false.
527      *
528      * @return true: widget can access network; false: widget can not access
529      *  network.
530      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
531      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
532      *  DB table.
533      */
534     bool getAccessNetworkMode() const;
535
536     /**
537      * This method gets if widget needs webkit plugins enabled
538      *
539      * @return true: widget needs webkit plugins enabled
540      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
541      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
542      *  DB table.
543      */
544     bool getWebkitPluginsRequired() const;
545
546     /**
547      * This method returns a list of all the installed widgets' app id.
548      *
549      * @return list of installed widgets' app id.
550      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
551      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
552      *  DB table.
553      */
554     static DbWidgetHandleList getHandleList();
555
556     /**
557      * This method returns a list of all the installed widgets.
558      *
559      * @return list of installed widgets.
560      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
561      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
562      *  DB table.
563      */
564     static DbWidgetDAOReadOnlyList getWidgetList();
565
566    /**
567      * This method removes a widget's information from EmDB.
568      *
569      * @see RegisterWidget()
570      * @param[in] widgetHandle    widget's app id
571      * @return true if succeed, false if fail.
572      */
573     static void unregisterWidget(DbWidgetHandle widgetHandle);
574
575     /**
576      * This method gets author's infomation of a widget which is parsed from
577      *  configiration document.
578      *
579      * @see WidgetAuthorInfo
580      * @param[out] pAuthorInfo
581      * @return true if succeed, false if fail.
582      */
583     WidgetAuthorInfo getAuthorInfo() const;
584
585     /**
586      * This method gets author's name of a widget which is parsed from
587      *  configiration document.
588      *
589      * @param[out] pAuthorInfo
590      * @return author's name.
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     DPL::OptionalString getAuthorName() const;
596
597     /**
598      * This method gets author's email of a widget which is parsed from
599      *  configiration document.
600      *
601      * @param[out] pAuthorInfo
602      * @return author's email.
603      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
604      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
605      *  DB table.
606      */
607     DPL::OptionalString getAuthorEmail() const;
608
609     /**
610      * This method gets author's email of a widget which is parsed from
611      *  configiration document.
612      *
613      * @param[out] pAuthorInfo
614      * @return author's email.
615      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
616      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
617      *  DB table.
618      */
619     DPL::OptionalString getAuthorHref() const;
620
621     /**
622      * This method returns minimum version of WAC that WRT has to be compliant
623      *  to to run this widget
624      *
625      * @return Minimum version
626      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
627      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
628      *  DB table.
629      */
630     DPL::OptionalString getMinimumWacVersion() const;
631
632     /* This method get widget' share href.
633      *
634      * @return widget's share href
635      */
636     std::string getShareHref() const;
637
638     /**
639      * This method checks whether specified widget is a factory widget.
640      *
641      * @param[in] widgetHandle    widget's app id
642      * @return true if yes, false if no.
643      */
644     bool isFactory() const;
645
646     /**
647      * This method get widget installed time
648      *
649      * @return time_t : return widget's install time
650      */
651     time_t getInstallTime() const;
652
653     /**
654      * This method gets widget base folder.
655      *
656      * @return widget base folder.
657      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
658      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
659      *  DB table.
660      */
661     std::string getBaseFolder() const;
662
663     /**
664      * This method gets deletable property of widget.
665      *
666      * @return true: can be deleted; false: can not be deleted
667      * @exception WRT_CONF_ERR_GCONF_FAILURE
668      * @exception WRT_CONF_ERR_EMDB_FAILURE
669      * @exception WRT_CONF_ERR_EMDB_NO_RECORD
670      */
671     bool isDeletable() const;
672
673     /* This method gets the parameter list for resource.
674      */
675     ResourceAttributeList getResourceAttribute(
676             const std::string &resourceId) const;
677
678     /* This method checks read only flag for given property
679      */
680     DPL::OptionalInt checkPropertyReadFlag(
681             const PropertyDAOReadOnly::WidgetPropertyKey &key) const;
682
683     /* This method gets widget property key list
684      */
685     PropertyDAOReadOnly::WidgetPropertyKeyList getPropertyKeyList() const;
686
687     /* This method gets widget property list
688      */
689     PropertyDAOReadOnly::WidgetPreferenceList getPropertyList() const;
690
691     /* This method get widget property value
692      */
693     PropertyDAOReadOnly::WidgetPropertyValue getPropertyValue(
694             const PropertyDAOReadOnly::WidgetPropertyKey &key) const;
695
696     LanguageTagList getLanguageTags() const;
697     LanguageTagList getIconLanguageTags() const;
698
699
700
701     WidgetLocalizedInfo getLocalizedInfo(const DPL::String& languageTag) const;
702     std::string getCookieDatabasePath() const;
703     // Local storage
704     std::string getPrivateLocalStoragePath() const;
705
706     bool getBackSupported() const;
707
708     static bool isWidgetInstalled(DbWidgetHandle handle);
709     static bool isWidgetInstalled(DPL::String pkgName);
710
711     /* This method get path of the splash image.
712      *
713      * @return path of the widget's splash image
714      */
715     DPL::OptionalString getSplashImgSrc() const;
716
717     ExternalLocationList getWidgetExternalLocations() const;
718
719     /*
720      * Default value is required to keep compatibility with
721      * wrt-installer and wrt.
722      */
723     CertificateChainList getWidgetCertificate(
724             CertificateSource source = SIGNATURE_DISTRIBUTOR) const;
725
726     void getWidgetSettings(WidgetSettings& outWidgetSettings) const;
727
728     /**
729      * This method gets application service list that define AUL value
730      *
731      * @return See above comment
732      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
733      */
734     void getAppServiceList(
735             WidgetApplicationServiceList& outAppServiceList) const;
736
737     /**
738      * This method returns the type of the package.
739      *
740      * @return PkgType
741      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
742      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching
743                                                 records in DB table.
744      */
745     PkgType getPkgType() const;
746
747     void getEncryptedFileList(EncryptedFileList& filesList) const;
748
749     /**
750      * This method returns widget's background page filename.
751      *
752      * @return Name of file containing background page
753      */
754     DPL::OptionalString getBackgroundPage() const;
755 };
756
757 } // namespace WrtDB
758
759 #endif // _WRT_SRC_CONFIGURATION_WIDGET_DAO_READ_ONLY_H_
760