X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fwidget_dao%2Finclude%2Fdpl%2Fwrt-dao-ro%2Fwidget_dao_read_only.h;fp=modules_wearable%2Fwidget_dao%2Finclude%2Fdpl%2Fwrt-dao-ro%2Fwidget_dao_read_only.h;h=db2b7896cd3568e53403776a6b3b1c05778f28a6;hb=refs%2Ftags%2Faccepted%2Ftizen%2F2.4%2Fmobile%2F20151029.025055;hp=c82995d6df98c36b41bf6b931f1521de2b73f7f2;hpb=58be0971049907f3166ce56a6ad509769565158f;p=framework%2Fweb%2Fwrt-commons.git diff --git a/modules_wearable/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h similarity index 75% rename from modules_wearable/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h rename to modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h index c82995d..db2b789 100755 --- a/modules_wearable/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h @@ -33,165 +33,13 @@ #include #include #include -#include #include -#include +#include #include #include +#include namespace WrtDB { -enum CertificateSource { - SIGNATURE_AUTHOR = 0, - SIGNATURE_DISTRIBUTOR = 1, - SIGNATURE_DISTRIBUTOR2 = 2, - SIGNATURE_UNKNOWN = 3 -}; - -struct WidgetLocalizedInfo -{ - DPL::OptionalString name; - DPL::OptionalString shortName; - DPL::OptionalString description; - DPL::OptionalString license; - DPL::OptionalString licenseHref; -}; - -/** - * CertificateData - * A structure to hold certificate fingerprints. - */ -struct WidgetCertificateData -{ - enum Owner { AUTHOR, DISTRIBUTOR, DISTRIBUTOR2, UNKNOWN }; - enum Type { ROOT, ENDENTITY }; - - // type of signature: author/distributor - Owner owner; - // indicates whether this is ca certificate - Type type; - - // chain id number: relative BASE, where BASE is signatureBASE.xml - int chainId; - // certificate fingerprint digested by md5 - std::string strMD5Fingerprint; - // certificate fingerprint digestef by sha1 - std::string strSHA1Fingerprint; - // Common name field in certificate - DPL::String strCommonName; - - bool operator== (const WidgetCertificateData& certData) const - { - return certData.chainId == chainId && - certData.owner == owner && - certData.strCommonName == strCommonName && - certData.strMD5Fingerprint == strMD5Fingerprint && - certData.strSHA1Fingerprint == strSHA1Fingerprint; - } -}; - -typedef std::list WidgetCertificateDataList; - -typedef DPL::String Locale; -typedef std::set LocaleSet; -typedef std::list ExternalLocationList; - -/** - * WidgetRegisterInfo - * A structure to hold widget's information needed to be registered. - * @see WidgetConfigurationInfo - */ -struct WidgetRegisterInfo -{ - struct LocalizedIcon : public ConfigParserData::Icon - { - LocalizedIcon(const ConfigParserData::Icon& icon, - const LocaleSet& _availableLocales) : - ConfigParserData::Icon(icon), - availableLocales(_availableLocales) - {} - - LocaleSet availableLocales; - }; - - struct StartFileProperties - { - DPL::String encoding; - DPL::String type; - }; - - typedef std::map StartFilePropertiesForLocalesMap; - struct LocalizedStartFile - { - DPL::String path; - StartFilePropertiesForLocalesMap propertiesForLocales; - }; - - typedef std::list LocalizedIconList; - typedef std::list LocalizedStartFileList; - struct LocalizationData - { - LocalizedIconList icons; - LocalizedStartFileList startFiles; - }; - - //Constructor - WidgetRegisterInfo() : - webAppType(APP_TYPE_UNKNOWN), - configInfo(), - packagingType(PKG_TYPE_UNKNOWN) - {} - - WidgetType webAppType; - DPL::OptionalString guid; - DPL::OptionalString version; - DPL::OptionalString minVersion; - std::string baseFolder; - ConfigParserData configInfo; - LocalizationData localizationData; - - TizenPkgId tzPkgid; - TizenAppId tzAppid; - TizenAppId tzBackupAppid; - - time_t installedTime; - PackagingType packagingType; - EncryptedFileList encryptedFiles; - ExternalLocationList externalLocations; - DPL::OptionalString widgetInstalledPath; -}; - -typedef std::list CertificateChainList; -class IWidgetSecurity -{ - public: - virtual ~IWidgetSecurity(); - - virtual const WidgetCertificateDataList& getCertificateList() const = 0; - - virtual bool isRecognized() const = 0; - - virtual bool isDistributorSigned() const = 0; - - virtual void getCertificateChainList(CertificateChainList& list, - CertificateSource source) const = 0; -}; - -/** - * WidgetAuthorInfo. - * Structure to hold the information of widget's author. - */ -struct WidgetAuthorInfo -{ - DPL::OptionalString name; - DPL::OptionalString email; - DPL::OptionalString href; -}; - -typedef std::list WidgetCertificateCNList; -typedef std::list LanguageTagList; -typedef std::list HostList; -typedef std::list FingerPrintList; class WidgetDAOReadOnly { @@ -251,6 +99,14 @@ class WidgetDAOReadOnly }; typedef std::list LocalizedStartFileList; +#if USE(WEB_PROVIDER) + /* + * This List is to retrive liveBox(es)ID from wrt.db. List is required as + * there might be multiple app-widget tag in config.xml for one widget. + */ + typedef std::list LiveBoxIdList; +#endif + /** * This is a constructor. * @@ -300,26 +156,17 @@ class WidgetDAOReadOnly static std::list getTzAppIdList(const TizenPkgId tzPkgid); /** - * Returns TizenPkgId for the specified widget - * - * @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. + * Returns tizen package id for the specified web application + * @return TizenPkgId */ - - TizenPkgId getTzPkgId() const DPL_DEPRECATED_WITH_MESSAGE("Use getTizenPkgId"); - static TizenPkgId getTzPkgId(const DbWidgetHandle handle) DPL_DEPRECATED_WITH_MESSAGE("Use getTizenPkgId"); - static TizenPkgId getTzPkgId(const TizenAppId tzAppid) DPL_DEPRECATED_WITH_MESSAGE("Use getTizenPkgId"); TizenPkgId getTizenPkgId() const; static TizenPkgId getTizenPkgId(const DbWidgetHandle handle); static TizenPkgId getTizenPkgId(const TizenAppId tzAppid); /** - * This method returns list of tizen package list of installed packages - * @return list of TizenPkgIdList of installed packages + * This method returns list of tizen package list of installed web applications + * @return TizenPkgIdList */ - static TizenPkgIdList getTizenPkgidList() DPL_DEPRECATED_WITH_MESSAGE("Use getTizenPkgIdList"); static TizenPkgIdList getTizenPkgIdList(); /** @@ -501,16 +348,6 @@ class WidgetDAOReadOnly bool hasFeature(const std::string& featureName) const; /** - * This method gets if widget needs webkit plugins enabled - * - * @return true: widget needs webkit plugins enabled - * @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. - */ - bool getWebkitPluginsRequired() const; - - /** * This method returns a list of all the installed widgets. * * @return list of installed widgets. @@ -584,16 +421,6 @@ class WidgetDAOReadOnly */ time_t getInstallTime() const; - /** - * This method gets widget base folder. - * - * @return widget base folder. - * @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. - */ - std::string getBaseFolder() const; - /* This method checks read only flag for given property */ DPL::OptionalInt checkPropertyReadFlag( @@ -691,6 +518,13 @@ class WidgetDAOReadOnly PrivilegeList getWidgetPrivilege() const; WidgetSecurityModelVersion getSecurityModelVersion() const; +#if USE(WEB_PROVIDER) + /** + * @brief Gets list of liveBox(es) ID(s) for a particular widget. + * @param[out] out param to retrive livebox(es) ID(s) as a list of String + */ + void getLiveBoxInfoList(LiveBoxIdList& outLiveBoxIdList) const; +#endif }; } // namespace WrtDB