void RemoveProperty(DbWidgetHandle widgetHandle,
const PropertyDAOReadOnly::WidgetPropertyKey &key)
{
- RemoveProperty(WidgetDAOReadOnly::getPkgName(widgetHandle),key);
+ RemoveProperty(WidgetDAOReadOnly::getTzAppId(widgetHandle),key);
}
-void RemoveProperty(WidgetPkgName pkgName,
+void RemoveProperty(TizenAppId tzAppid,
const PropertyDAOReadOnly::WidgetPropertyKey &key)
{
//TODO below there are two queries.
// First query asks if given property can be removed,
// Second removes it. Maybe it should be combined two one.
- LogDebug("Removing Property. pkgName: " << pkgName << ", key: " << key);
+ LogDebug("Removing Property. appid: " << tzAppid << ", key: " << key);
Try {
DPL::DB::ORM::wrt::ScopedTransaction transaction(&WrtDatabase::interface());
DPL::OptionalInt readonly = PropertyDAOReadOnly::CheckPropertyReadFlag(
- pkgName,
+ tzAppid,
key);
if (!readonly.IsNull() && *readonly == 1) {
LogError("'" << key <<
using namespace DPL::DB::ORM::wrt;
WRT_DB_DELETE(del, WidgetPreference, &WrtDatabase::interface())
del->Where(And(
- Equals<WidgetPreference::pkgname>(pkgName),
+ Equals<WidgetPreference::tizen_appid>(tzAppid),
Equals<WidgetPreference::key_name>(key)));
del->Execute();
const PropertyDAOReadOnly::WidgetPropertyValue &value,
bool readOnly)
{
- SetProperty(WidgetDAOReadOnly::getPkgName(widgetHandle),key,value,readOnly);
+ SetProperty(WidgetDAOReadOnly::getTzAppId(widgetHandle),key,value,readOnly);
}
-void SetProperty(WidgetPkgName pkgName,
+void SetProperty(TizenAppId tzAppid,
const PropertyDAOReadOnly::WidgetPropertyKey &key,
const PropertyDAOReadOnly::WidgetPropertyValue &value,
bool readOnly)
{
- LogDebug("Setting/updating Property. pkgName: " << pkgName <<
+ LogDebug("Setting/updating Property. appid: " << tzAppid <<
", key: " << key);
Try {
using namespace DPL::DB::ORM;
DPL::DB::ORM::wrt::ScopedTransaction transaction(&WrtDatabase::interface());
DPL::OptionalInt readonly = PropertyDAOReadOnly::CheckPropertyReadFlag(
- pkgName,
+ tzAppid,
key);
if (!readonly.IsNull() && *readonly == 1) {
LogError("'" << key <<
if (readonly.IsNull()) {
WidgetPreference::Row row;
- row.Set_pkgname(pkgName);
+ row.Set_tizen_appid(tzAppid);
row.Set_key_name(key);
row.Set_key_value(value);
row.Set_readonly(readOnly ? 1 : 0);
WRT_DB_UPDATE(update, WidgetPreference, &WrtDatabase::interface())
update->Where(And(
- Equals<WidgetPreference::pkgname>(pkgName),
+ Equals<WidgetPreference::tizen_appid>(tzAppid),
Equals<WidgetPreference::key_name>(key)));
update->Values(row);
void RegisterProperties(DbWidgetHandle widgetHandle,
const WidgetRegisterInfo ®Info)
{
- RegisterProperties(WidgetDAOReadOnly::getPkgName(widgetHandle),regInfo);
+ RegisterProperties(WidgetDAOReadOnly::getTzAppId(widgetHandle),regInfo);
}
-void RegisterProperties(WidgetPkgName pkgName,
+void RegisterProperties(TizenAppId tzAppid,
const WidgetRegisterInfo ®Info)
{
- LogDebug("Registering proferences for widget. pkgName: " << pkgName);
+ LogDebug("Registering proferences for widget. appid: " << tzAppid);
// Try-Catch in WidgetDAO
{
{ // Insert into table Widget Preferences
WidgetPreference::Row row;
- row.Set_pkgname(pkgName);
+ row.Set_tizen_appid(tzAppid);
row.Set_key_name(it->name);
row.Set_key_value(it->value);
int readonly = true == it->readonly ? 1 : 0;