return tzAppId;
}
+void WidgetDAO::updateTizenAppId(
+ const TizenAppId & fromAppId,
+ const TizenAppId & toAppId)
+{
+ SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
+ {
+ using namespace DPL::DB::ORM;
+ using namespace DPL::DB::ORM::wrt;
+
+ ScopedTransaction transaction(&WrtDatabase::interface());
+ if (!isWidgetInstalled(fromAppId)) {
+ ThrowMsg(WidgetDAOReadOnly::Exception::WidgetNotExist,
+ "Cannot find widget. tzAppId: " << fromAppId);
+ }
+
+ WRT_DB_SELECT(select, WidgetInfo, &WrtDatabase::interface())
+ select->Where(Equals<WidgetInfo::tizen_appid>(fromAppId));
+
+ WidgetInfo::Row row = select->GetSingleRow();
+
+ //WidgetInfo::Row row;
+ row.Set_tizen_appid(toAppId);
+
+ WRT_DB_UPDATE(update, WidgetInfo, &WrtDatabase::interface())
+ update->Where(Equals<WidgetInfo::tizen_appid>(fromAppId));
+ update->Values(row);
+ update->Execute();
+
+ transaction.Commit();
+ }
+ SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to update appid")
+}
+
void WidgetDAO::registerWidgetInternal(
const TizenAppId & tzAppId,
const WidgetRegisterInfo &widgetRegInfo,
const WidgetRegisterInfo &pWidgetRegisterInfo,
const IWidgetSecurity &widgetSecurity);
+ static void updateTizenAppId(const TizenAppId & fromAppId,
+ const TizenAppId & toAppId);
+
/**
* This method re-registers the widget information to the DB when it is
* installed.
static void registerOrUpdateWidget(
const TizenAppId & tzAppId,
const WidgetRegisterInfo &widgetRegInfo,
- const IWidgetSecurity &widgetSecurity);
+ const IWidgetSecurity &widgetSecurity) __attribute__((deprecated));
/* This method backup widget information and update new widget information
* for restore widget information
const TizenAppId & oldAppId,
const TizenAppId & newAppId,
const WidgetRegisterInfo &widgetRegInfo,
- const IWidgetSecurity &widgetSecurity);
+ const IWidgetSecurity &widgetSecurity) __attribute__((deprecated));
static void restoreUpdateWidget(
const TizenAppId & oldAppId,
- const TizenAppId & newAppId);
+ const TizenAppId & newAppId) __attribute__((deprecated));
/**
* This method removes a widget's information from EmDB.
static void updateWidgetAppIdInternal(
const TizenAppId & fromAppId,
- const TizenAppId & toAppId);
+ const TizenAppId & toAppId) __attribute__((deprecated));
static void insertAppControlInfo(DbWidgetHandle handle,
DPL::String src,