[Release] wrt-commons_0.2.145
[framework/web/wrt-commons.git] / modules / widget_dao / include / dpl / wrt-dao-ro / widget_dao_read_only.h
index c2b1de2..56178d4 100644 (file)
@@ -157,7 +157,6 @@ struct WidgetRegisterInfo
     WidgetRegisterInfo() :
         webAppType(APP_TYPE_UNKNOWN),
         signatureType(SIGNATURE_TYPE_UNIDENTIFIED),
-        isTestWidget(0),
         configInfo(),
         packagingType(PKG_TYPE_UNKNOWN)
     {}
@@ -169,7 +168,6 @@ struct WidgetRegisterInfo
     std::string shareHref;
     std::string baseFolder;
     WidgetSignatureType signatureType;
-    int isTestWidget;
     ConfigParserData configInfo;
     LocalizationData localizationData;
 
@@ -184,10 +182,10 @@ struct WidgetRegisterInfo
 };
 
 typedef std::list<std::string> CertificateChainList;
-class IWacSecurity
+class IWidgetSecurity
 {
   public:
-    virtual ~IWacSecurity();
+    virtual ~IWidgetSecurity();
 
     virtual const WidgetCertificateDataList& getCertificateList() const = 0;
 
@@ -195,8 +193,6 @@ class IWacSecurity
 
     virtual bool isDistributorSigned() const = 0;
 
-    virtual bool isWacSigned() const = 0;
-
     virtual void getCertificateChainList(CertificateChainList& list,
                                          CertificateSource source) const = 0;
 };
@@ -295,7 +291,7 @@ class WidgetDAOReadOnly
      */
     WidgetDAOReadOnly(DbWidgetHandle widgetHandle);
     WidgetDAOReadOnly(DPL::OptionalString widgetGUID);
-    WidgetDAOReadOnly(DPL::String tzAppid);
+    WidgetDAOReadOnly(WrtDB::TizenAppId tzAppid);
 
     /**
      * Destructor
@@ -329,17 +325,17 @@ class WidgetDAOReadOnly
     static TizenAppId getTzAppId(const TizenPkgId tzPkgid);
 
     /**
-     * Returns WidgetPkgName for the specified widget
+     * Returns TizenPkgId for the specified widget
      *
-     * @return pkgName;
+     * @return TizenPkgId;
      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
      * DB table.
      */
 
-    WidgetPkgName getPkgName() const;
-    static WidgetPkgName getPkgName(const WidgetGUID GUID);
-    static WidgetPkgName getPkgName(const DbWidgetHandle handle);
+    TizenPkgId getTzPkgId() const;
+    static TizenPkgId getTzPkgId(const DbWidgetHandle handle);
+    static TizenPkgId getTzPkgId(const TizenAppId tzAppid);
 
     /**
      * This method returns the root directory of widget resource.
@@ -349,7 +345,7 @@ class WidgetDAOReadOnly
      * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
      * DB table.
      */
-    DPL::String getPath() const;
+    virtual DPL::String getPath() const;
 
     DPL::String getFullPath() const;
 
@@ -445,6 +441,8 @@ class WidgetDAOReadOnly
      * @param[out] outAccessInfoList list filled with access info structures
      */
     void getWidgetAccessInfo(WidgetAccessInfoList& outAccessInfoList) const;
+    void getWidgetAllowNavigationInfo(
+        WidgetAllowNavigationInfoList& allowNavigationInfoList) const;
 
     /**
      * WAC 2.0 extension
@@ -456,12 +454,6 @@ class WidgetDAOReadOnly
      * WAC 2.0 extension
      * @return
      */
-    bool isWacSigned() const;
-
-    /**
-     * WAC 2.0 extension
-     * @return
-     */
     bool isDistributorSigned() const;
 
     /**
@@ -471,12 +463,6 @@ class WidgetDAOReadOnly
     bool isTrusted() const;
 
     /**
-     * WAC 2.0 extension
-     * @return is WAC test widget
-     */
-    bool isTestWidget() const;
-
-    /**
      * This method returns window mode of widget.
      *
      * @return window modes of widget
@@ -504,6 +490,13 @@ class WidgetDAOReadOnly
     DPL::OptionalString getCspPolicy() const;
 
     /**
+     * This method is used as a getter for report only csp policy of widget.
+     * It may be provided in configuration file.
+     * @return global csp report only policy for widget
+     */
+    DPL::OptionalString getCspPolicyReportOnly() const;
+
+    /**
      * This method returns list filed with Common Name entries from certificate.
      *
      * @return Common Name of Distribuotor End Entity certificate.
@@ -542,7 +535,6 @@ class WidgetDAOReadOnly
      */
     DbWidgetFeatureSet getFeaturesList() const;
 
-    static WidgetParamMap getFeatureParams(int widgetFeatureId);
     /**
      * This method checks whether widget has specified feature.
      *
@@ -591,11 +583,16 @@ class WidgetDAOReadOnly
     static DbWidgetHandleList getHandleList();
 
     /**
-     * This method returns list of pkgname of installed packages
-     * @return list of pkgname of installed packages
+     * This method returns list of tizen application list of installed packages
+     * @return list of TizenAppIdList of installed packages
      */
     static TizenAppIdList getTizenAppidList();
-    static WidgetPkgNameList getPkgnameList();
+
+    /**
+     * This method returns list of tizen package list of installed packages
+     * @return list of TizenPkgIdList of installed packages
+     */
+    static TizenPkgIdList getTizenPkgidList();
 
     /**
      * This method returns a list of all the installed widgets.
@@ -608,15 +605,6 @@ class WidgetDAOReadOnly
     static DbWidgetDAOReadOnlyList getWidgetList();
 
     /**
-     * This method removes a widget's information from EmDB.
-     *
-     * @see RegisterWidget()
-     * @param[in] widgetHandle    widget's app id
-     * @return true if succeed, false if fail.
-     */
-    static void unregisterWidget(DbWidgetHandle widgetHandle);
-
-    /**
      * This method gets author's infomation of a widget which is parsed from
      *  configiration document.
      *
@@ -696,11 +684,6 @@ class WidgetDAOReadOnly
      */
     std::string getBaseFolder() const;
 
-    /* This method gets the parameter list for resource.
-     */
-    ResourceAttributeList getResourceAttribute(
-        const std::string &resourceId) const;
-
     /* This method checks read only flag for given property
      */
     DPL::OptionalInt checkPropertyReadFlag(
@@ -750,13 +733,13 @@ class WidgetDAOReadOnly
     void getWidgetSettings(WidgetSettings& outWidgetSettings) const;
 
     /**
-     * This method gets application service list that define AUL value
+     * This method gets application control list that define AUL value
      *
      * @return See above comment
      * @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
      */
-    void getAppServiceList(
-        WidgetApplicationServiceList& outAppServiceList) const;
+    void getAppControlList(
+        WidgetAppControlList& outAppControlList) const;
 
     /**
      * This method returns the type of the package.
@@ -805,7 +788,6 @@ class WidgetDAOReadOnly
     SettingsType getGeolocationUsage() const;
     SettingsType getWebNotificationUsage() const;
     SettingsType getWebDatabaseUsage() const;
-    SettingsType getFileSystemUsage() const;
 
     /**
      * This method returns widget's installed path
@@ -820,6 +802,9 @@ class WidgetDAOReadOnly
      * @return tizen package id
      */
     TizenPkgId getTizenPkgId() const;
+    PrivilegeList getWidgetPrivilege() const;
+    WidgetSecurityModelVersion getSecurityModelVersion() const;
+
 };
 } // namespace WrtDB