}
}
-void GlobalDAO::SetCookieSharingMode(bool mode)
-{
- LogDebug("updating Cookie Sharing mode to:" << mode);
- Try {
- using namespace DPL::DB::ORM;
- using namespace DPL::DB::ORM::wrt;
- GlobalProperties::Row row;
- row.Set_cookie_sharing_mode(mode);
-
- WRT_DB_UPDATE(update, GlobalProperties, &WrtDatabase::interface())
- update->Values(row);
- update->Execute();
- }
- Catch(DPL::DB::SqlConnection::Exception::Base){
- ReThrowMsg(GlobalDAO::Exception::DatabaseError,
- "Failed to update Cookie Sharing Mode");
- }
-}
} // namespace WrtDB
}
}
-bool GlobalDAOReadOnly::GetCookieSharingMode()
-{
- LogDebug("Getting Cookie Sharing mode");
- Try {
- using namespace DPL::DB::ORM;
- using namespace DPL::DB::ORM::wrt;
- WRT_DB_SELECT(select, GlobalProperties, &WrtDatabase::interface())
- return select->GetSingleValue<GlobalProperties::cookie_sharing_mode>();
- }
- Catch(DPL::DB::SqlConnection::Exception::Base){
- ReThrowMsg(GlobalDAOReadOnly::Exception::DatabaseError,
- "Failed to get Cookie Sharing mode");
- }
-}
} // namespace WrtDB
public:
- static bool GetCookieSharingMode() DPL_DEPRECATED;
enum NetworkAccessMode
{
*/
static void SetRoamingDataUsage(NetworkAccessMode newMode) DPL_DEPRECATED;
- static void SetCookieSharingMode(bool mode) DPL_DEPRECATED;
-
private:
DPL_DEPRECATED GlobalDAO()
{}
)
CREATE_TABLE(GlobalProperties)
COLUMN_NOT_NULL(roaming_data_usage, TINYINT, DEFAULT 1)
- COLUMN_NOT_NULL(cookie_sharing_mode, INT, DEFAULT 0)
CREATE_TABLE_END()
SQL(