#include <dpl/wrt-dao-rw/property_dao.h>
namespace WrtDB {
-
class WidgetDAO : public WidgetDAOReadOnly
{
public:
WidgetDAO(DbWidgetHandle handle);
WidgetDAO(DPL::OptionalString widgetGUID);
- WidgetDAO(DPL::String pkgName);
+ WidgetDAO(DPL::String tzAppId);
/**
* Destructor
virtual ~WidgetDAO();
/**
- * This method registers the widget information in the DB when it is installed.
+ * This method registers the widget information in the DB when it is
+ * installed.
*
* @see WidgetRegisterInfo
* @see UnRegisterWidget()
- * @param[in] widgetPkgname Widget Pkgname that will be registered.
- * @param[in] pWidgetRegisterInfo Specified the widget's information needed to be registered.
- * @param[in] wacSecurity Widget's security certificates.
+ * @param[in] TizenAppId Widget app id that will be registered.
+ * @param[in] pWidgetRegisterInfo Specified the widget's information
+ * needed to be registered.
+ * @param[in] widgetSecurity Widget's security certificates.
*/
static void registerWidget(
- const WidgetPkgName & widgetPkgname,
- const WidgetRegisterInfo &widgetRegInfo,
- const IWacSecurity &wacSecurity);
+ const TizenAppId& tzAppId,
+ const WidgetRegisterInfo &widgetRegInfo,
+ const IWidgetSecurity &widgetSecurity);
static DbWidgetHandle registerWidget(
- const WidgetRegisterInfo &pWidgetRegisterInfo,
- const IWacSecurity &wacSecurity) __attribute__((deprecated));
+ const WidgetRegisterInfo &pWidgetRegisterInfo,
+ const IWidgetSecurity &widgetSecurity) __attribute__((deprecated));
/**
- * @brief registerWidgetGenerateTizenId Registers widget with auto-generated tizen id
+ * @brief registerWidgetGenerateTizenId Registers widget with auto-generated
+ * tizen id
*
* This function is disadviced and should be used only in tests.
* Function is not thread-safe.
*
* @param pWidgetRegisterInfo registeration information
- * @param wacSecurity Widget's security certificates.
- * @return pkgname generated
- */
- static WidgetPkgName registerWidgetGenerateTizenId(
- const WidgetRegisterInfo &pWidgetRegisterInfo,
- const IWacSecurity &wacSecurity);
-
- /**
- * This method re-registers the widget information to the DB when it is installed.
- *
- * It performs unregistration and new registration of widget in db in one transaction.
- *
- * @see WidgetRegisterInfo
- * @param[in] widgetName Widget pkgname that will be registered.
- * @param[in] pWidgetRegisterInfo Specified the widget's information needed to be registered.
- * @param[in] wacSecurity Widget's security certificates.
+ * @param widgetSecurity Widget's security certificates.
+ * @return tzAppId generated
*/
- static void registerOrUpdateWidget(
- const WidgetPkgName & widgetName,
- const WidgetRegisterInfo &widgetRegInfo,
- const IWacSecurity &wacSecurity);
-
- static void registerWidget(
- WrtDB::DbWidgetHandle handle,
- const WidgetRegisterInfo &widgetRegInfo,
- const IWacSecurity &wacSecurity) __attribute__((deprecated));
+ static TizenAppId registerWidgetGeneratePkgId(
+ const WidgetRegisterInfo &pWidgetRegisterInfo,
+ const IWidgetSecurity &widgetSecurity);
+ static void updateTizenAppId(const TizenAppId & fromAppId,
+ const TizenAppId & toAppId);
/**
* This method removes a widget's information from EmDB.
*
* @see RegisterWidget()
- * @param[in] pkgName widgets name to be unregistered
+ * @param[in] tzAppId widgets name to be unregistered
*/
- static void unregisterWidget(const WidgetPkgName & pkgName);
-
- static void unregisterWidget(WrtDB::DbWidgetHandle handle) __attribute__((deprecated));
+ static void unregisterWidget(const TizenAppId & tzAppId);
/* This method removes widget property
*/
void removeProperty(const PropertyDAOReadOnly::WidgetPropertyKey &key);
/**
- * @brief registerExternalLocations Removes rows from WidgetExternalLocations
+ * @brief registerExternalLocations Removes rows from
+ * WidgetExternalLocations
*/
void unregisterAllExternalLocations();
/* This method sets widget property
*/
void setProperty(const PropertyDAOReadOnly::WidgetPropertyKey &key,
- const PropertyDAOReadOnly::WidgetPropertyValue &value,
- bool readOnly = false);
+ const PropertyDAOReadOnly::WidgetPropertyValue &value,
+ bool readOnly = false);
- /* set PkgName
+ /* set tzAppId
*/
- void setPkgName(const DPL::OptionalString& pkgName);
-
- void setPkgName_NOTNULL(const DPL::String& pkgName);
+ void setTizenAppId(const DPL::OptionalString& tzAppId);
/* This function will update of api-feature status.
* If status is true (feature rejected) plugin connected with this
*/
void updateFeatureRejectStatus(const DbWidgetFeature &widgetFeature);
- /*
- * This method change security settings value
- */
+ /*
+ * This method change security settings value
+ */
void setSecurityPopupUsage(const SettingsType value);
void setGeolocationUsage(const SettingsType value);
void setWebNotificationUsage(const SettingsType value);
void setWebDatabaseUsage(const SettingsType value);
- void setFileSystemUsage(const SettingsType value);
private:
//Methods used during widget registering
static DbWidgetHandle registerWidgetInfo(
- const WidgetPkgName & widgetName,
- const WidgetRegisterInfo ®Info,
- const IWacSecurity &wacSecurity,
- const DPL::Optional<DbWidgetHandle> handle = DPL::Optional<DbWidgetHandle>());
+ const TizenAppId & widgetName,
+ const WidgetRegisterInfo ®Info,
+ const IWidgetSecurity &widgetSecurity,
+ const DPL::Optional<DbWidgetHandle> handle =
+ DPL::Optional<DbWidgetHandle>());
static void registerWidgetExtendedInfo(
- DbWidgetHandle widgetHandle,
- const WidgetRegisterInfo ®Info);
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
static void registerWidgetLocalizedInfo(
- DbWidgetHandle widgetHandle,
- const WidgetRegisterInfo ®Info);
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
static void registerWidgetIcons(
- DbWidgetHandle widgetHandle,
- const WidgetRegisterInfo ®Info);
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
static void registerWidgetStartFile(
- DbWidgetHandle widgetHandle,
- const WidgetRegisterInfo ®Info);
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
static void registerWidgetPreferences(
- DbWidgetHandle widgetHandle,
- const WidgetRegisterInfo ®Info);
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
static void registerWidgetFeatures(
- DbWidgetHandle widgetHandle,
- const WidgetRegisterInfo ®Info);
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
+ static void registerWidgetPrivilege(
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
static void registerWidgetWindowModes(
- DbWidgetHandle widgetHandle,
- const WidgetRegisterInfo ®Info);
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
static void registerWidgetWarpInfo(
- DbWidgetHandle widgetHandle,
- const WidgetRegisterInfo ®Info);
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
+ static void registerWidgetAllowNavigationInfo(
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
static void registerWidgetCertificates(
- DbWidgetHandle widgetHandle,
- const IWacSecurity &wacSecurity);
+ DbWidgetHandle widgetHandle,
+ const IWidgetSecurity &widgetSecurity);
static void registerCertificatesChains(
- DbWidgetHandle widgetHandle,
- CertificateSource certificateSource,
- const CertificateChainList &list);
+ DbWidgetHandle widgetHandle,
+ CertificateSource certificateSource,
+ const CertificateChainList &list);
static void registerWidgetSettings(
- DbWidgetHandle widgetHandle,
- const WidgetRegisterInfo ®Info);
- static void registerAppService(
- DbWidgetHandle widgetHandle,
- const WidgetRegisterInfo ®Info);
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
+ static void registerAppControl(
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
static void registerEncryptedResouceInfo(
- DbWidgetHandle widgetHandle,
- const WidgetRegisterInfo ®Info);
+ DbWidgetHandle widgetHandle,
+ const WidgetRegisterInfo ®Info);
/**
- * @brief registerExternalLocations Inserts new rows to WidgetExternalLocations
+ * @brief registerExternalLocations Inserts new rows to
+ * WidgetExternalLocations
* @param externals list of files
*/
- static void registerExternalLocations(DbWidgetHandle widgetHandle,
- const ExternalLocationList & externals);
+ static void registerExternalLocations(
+ DbWidgetHandle widgetHandle,
+ const ExternalLocationList &
+ externals);
static void registerWidgetSecuritySettings(DbWidgetHandle widgetHandle);
-
static void registerWidgetInternal(
- const WidgetPkgName & widgetName,
- const WidgetRegisterInfo &widgetRegInfo,
- const IWacSecurity &wacSecurity,
- const DPL::Optional<DbWidgetHandle> handle = DPL::Optional<DbWidgetHandle>());
- static void unregisterWidgetInternal(
- const WidgetPkgName & pkgName);
+ const TizenAppId & tzAppId,
+ const WidgetRegisterInfo &widgetRegInfo,
+ const IWidgetSecurity &widgetSecurity,
+ const DPL::Optional<DbWidgetHandle> handle =
+ DPL::Optional<DbWidgetHandle>());
+ static void unregisterWidgetInternal(const TizenAppId & tzAppId);
+ static void insertAppControlInfo(DbWidgetHandle handle,
+ DPL::String src,
+ DPL::String operation,
+ DPL::String uri,
+ DPL::String mime,
+ unsigned index,
+ unsigned disposition);
};
-
} // namespace WrtDB
#endif // WIDGET_DAO_H