#include <stddef.h>
#include <dpl/wrt-dao-rw/property_dao.h>
#include <dpl/wrt-dao-ro/widget_dao_read_only.h>
-#include <dpl/log/log.h>
+#include <dpl/log/wrt_log.h>
#include <dpl/foreach.h>
#include <dpl/wrt-dao-ro/webruntime_database.h>
#include <dpl/wrt-dao-ro/WrtDatabase.h>
// First query asks if given property can be removed,
// Second removes it. Maybe it should be combined two one.
- LogDebug("Removing Property. appid: " << tzAppid << ", key: " << key);
+ WrtLogD("Removing Property. appid: %ls, key: %ls",
+ tzAppid.c_str(), key.c_str());
Try {
DPL::DB::ORM::wrt::ScopedTransaction transaction(
&WrtDatabase::interface());
DPL::OptionalInt readonly = PropertyDAOReadOnly::CheckPropertyReadFlag(
tzAppid,
key);
- if (!readonly.IsNull() && *readonly == 1) {
- LogError("'" << key <<
- "' key is readonly. Cannot remove property !");
+ if (!!readonly && *readonly == 1) {
+ WrtLogE("'%ls' key is readonly. Cannot remove property !",
+ key.c_str());
ThrowMsg(PropertyDAOReadOnly::Exception::ReadOnlyProperty,
"Property is readonly");
}
const PropertyDAOReadOnly::WidgetPropertyValue &value,
bool readOnly)
{
- LogDebug("Setting/updating Property. appid: " << tzAppid <<
- ", key: " << key);
+ WrtLogD("Setting/updating Property. appid: %ls, key: %ls",
+ tzAppid.c_str(), key.c_str());
Try {
using namespace DPL::DB::ORM;
using namespace DPL::DB::ORM::wrt;
DPL::OptionalInt readonly = PropertyDAOReadOnly::CheckPropertyReadFlag(
tzAppid,
key);
- if (!readonly.IsNull() && *readonly == 1) {
- LogError("'" << key <<
- "' key is readonly. Cannot remove property !");
+ if (!!readonly && *readonly == 1) {
+ WrtLogE("'%ls' key is readonly. Cannot remove property !",
+ key.c_str());
ThrowMsg(PropertyDAOReadOnly::Exception::ReadOnlyProperty,
"Property is readonly");
}
DbWidgetHandle widgetHandle(WidgetDAOReadOnly::getHandle(tzAppid));
- if (readonly.IsNull()) {
+ if (!readonly) {
WidgetPreference::Row row;
row.Set_app_id(widgetHandle);
row.Set_tizen_appid(tzAppid);
void RegisterProperties(DbWidgetHandle widgetHandle, TizenAppId tzAppid,
const WidgetRegisterInfo ®Info)
{
- LogDebug("Registering proferences for widget. appid: " << tzAppid);
+ WrtLogD("Registering proferences for widget. appid: %ls", tzAppid.c_str());
// Try-Catch in WidgetDAO