#include <dpl/wrt-dao-ro/common_dao_types.h>
namespace WrtDB {
-
/**
* Widget's signature enum.
* This enumerates signature type of widget.
// Common name field in certificate
DPL::String strCommonName;
- bool operator== (const WidgetCertificateData& certData) const {
+ bool operator== (const WidgetCertificateData& certData) const
+ {
return certData.chainId == chainId &&
- certData.owner == owner &&
- certData.strCommonName == strCommonName &&
- certData.strMD5Fingerprint == strMD5Fingerprint &&
- certData.strSHA1Fingerprint == strSHA1Fingerprint;
+ certData.owner == owner &&
+ certData.strCommonName == strCommonName &&
+ certData.strMD5Fingerprint == strMD5Fingerprint &&
+ certData.strSHA1Fingerprint == strSHA1Fingerprint;
}
};
struct LocalizedIcon : public ConfigParserData::Icon
{
LocalizedIcon(const ConfigParserData::Icon& icon,
- const LocaleSet& _availableLocales) :
+ const LocaleSet& _availableLocales) :
ConfigParserData::Icon(icon),
availableLocales(_availableLocales)
- {
- }
+ {}
LocaleSet availableLocales;
};
WidgetRegisterInfo() :
webAppType(APP_TYPE_UNKNOWN),
signatureType(SIGNATURE_TYPE_UNIDENTIFIED),
- isTestWidget(0),
configInfo(),
packagingType(PKG_TYPE_UNKNOWN)
- {
- }
+ {}
WidgetType webAppType;
- WidgetType type; // TODO : This type will be removed.
DPL::OptionalString guid;
DPL::OptionalString version;
DPL::OptionalString minVersion;
std::string shareHref;
std::string baseFolder;
WidgetSignatureType signatureType;
- int isTestWidget;
ConfigParserData configInfo;
LocalizationData localizationData;
- DPL::OptionalString pkgname;
- WidgetPkgName pkgName;
TizenPkgId tzPkgid;
TizenAppId tzAppid;
};
typedef std::list<std::string> CertificateChainList;
-class IWacSecurity
+class IWidgetSecurity
{
public:
- virtual ~IWacSecurity();
+ virtual ~IWidgetSecurity();
virtual const WidgetCertificateDataList& getCertificateList() const = 0;
virtual bool isDistributorSigned() const = 0;
- virtual bool isWacSigned() const = 0;
-
virtual void getCertificateChainList(CertificateChainList& list,
- CertificateSource source) const = 0;
+ CertificateSource source) const = 0;
};
/**
*/
WidgetDAOReadOnly(DbWidgetHandle widgetHandle);
WidgetDAOReadOnly(DPL::OptionalString widgetGUID);
- WidgetDAOReadOnly(DPL::String tzAppid);
+ WidgetDAOReadOnly(WrtDB::TizenAppId tzAppid);
/**
* Destructor
*
* @return widget handle(m_widgetHandle).
* @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.
+ * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
+ * DB table.
*/
DbWidgetHandle getHandle() const;
static DbWidgetHandle getHandle(const WidgetGUID GUID);
*
* @return tzAppid;
* @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.
+ * @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching records in
+ * DB table.
*/
TizenAppId getTzAppId() const;
static TizenAppId getTzAppId(const WidgetGUID GUID);
static TizenAppId getTzAppId(const DbWidgetHandle handle);
+ 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.
+ * @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.
* @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;
* @return WidgetType
* @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.
+ * records in DB table.
*/
WidgetType getWidgetType() const;
*/
WidgetGUID getGUID() const;
-
/**
- * This method returns the App id of the widget.
- *
- * @return appid
- * @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.
- */
+ * This method returns the App id of the widget.
+ *
+ * @return appid
+ * @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.
+ */
DPL::OptionalString getTizenAppId() const;
/**
* @param[out] outAccessInfoList list filled with access info structures
*/
void getWidgetAccessInfo(WidgetAccessInfoList& outAccessInfoList) const;
+ void getWidgetAllowNavigationInfo(
+ WidgetAllowNavigationInfoList& allowNavigationInfoList) const;
/**
* WAC 2.0 extension
* WAC 2.0 extension
* @return
*/
- bool isWacSigned() const;
-
- /**
- * WAC 2.0 extension
- * @return
- */
bool isDistributorSigned() const;
/**
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
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.
* DB table.
*/
WidgetCertificateCNList getKeyCommonNameList(
- WidgetCertificateData::Owner owner,
- WidgetCertificateData::Type type) const;
+ WidgetCertificateData::Owner owner,
+ WidgetCertificateData::Type type) const;
/**
* given a certificate owner (author / distributor) and type of certificate
* function returns list of matching fingerprints
*/
FingerPrintList getKeyFingerprints(
- WidgetCertificateData::Owner owner,
- WidgetCertificateData::Type type) const;
+ WidgetCertificateData::Owner owner,
+ WidgetCertificateData::Type type) const;
/*
* This method gets certificate data list for a widget from database.
*/
DbWidgetFeatureSet getFeaturesList() const;
- static WidgetParamMap getFeatureParams(int widgetFeatureId);
/**
* This method checks whether widget has specified feature.
*
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.
*/
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.
*/
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(
- const PropertyDAOReadOnly::WidgetPropertyKey &key) const;
+ const PropertyDAOReadOnly::WidgetPropertyKey &key) const;
/* This method gets widget property key list
*/
/* This method get widget property value
*/
PropertyDAOReadOnly::WidgetPropertyValue getPropertyValue(
- const PropertyDAOReadOnly::WidgetPropertyKey &key) const;
+ const PropertyDAOReadOnly::WidgetPropertyKey &key) const;
LanguageTagList getLanguageTags() const;
LanguageTagList getIconLanguageTags() const;
-
-
WidgetLocalizedInfo getLocalizedInfo(const DPL::String& languageTag) const;
std::string getCookieDatabasePath() const;
// Local storage
* wrt-installer and wrt.
*/
CertificateChainList getWidgetCertificate(
- CertificateSource source = SIGNATURE_DISTRIBUTOR) const;
+ CertificateSource source = SIGNATURE_DISTRIBUTOR) const;
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.
* @return PackagingType
* @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.
+ * records in DB table.
*/
PackagingType getPackagingType() const;
/**
* @brief generateTizenId generates new package id
*
- * If widget do not supplies it's own tizen package id, this method can be used,
+ * If widget do not supplies it's own tizen package id, this method can be
+ * used,
* although it should be removed in future.
*
* @return new tizen package id
*/
static TizenPkgId generatePkgId();
- static TizenPkgId generateTizenId() {
+ static TizenPkgId generateTizenId()
+ {
return generatePkgId();
}
SettingsType getGeolocationUsage() const;
SettingsType getWebNotificationUsage() const;
SettingsType getWebDatabaseUsage() const;
- SettingsType getFileSystemUsage() const;
/**
* This method returns widget's installed path
* @return tizen package id
*/
TizenPkgId getTizenPkgId() const;
-};
+ PrivilegeList getWidgetPrivilege() const;
+ WidgetSecurityModelVersion getSecurityModelVersion() const;
+};
} // namespace WrtDB
#endif // _WRT_SRC_CONFIGURATION_WIDGET_DAO_READ_ONLY_H_