From: Piotr Kosko
Date: Wed, 27 May 2015 12:11:48 +0000 (+0200)
Subject: [Systemsetting] Added logs in methods onEntered and onReturn
X-Git-Tag: submit/tizen_tv/20150603.064601^2~35
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba94bc340b6bac5dfb8108abc002031fe4558ba3;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
[Systemsetting] Added logs in methods onEntered and onReturn
Change-Id: I08736a1ad30e2363998c01cd01725a6bce416b54
Signed-off-by: Piotr Kosko
---
diff --git a/src/systemsetting/systemsetting_instance.cc b/src/systemsetting/systemsetting_instance.cc
index d6be5f4d..f6f35950 100644
--- a/src/systemsetting/systemsetting_instance.cc
+++ b/src/systemsetting/systemsetting_instance.cc
@@ -40,6 +40,7 @@ using namespace extension::systemsetting;
SystemSettingInstance::SystemSettingInstance()
{
+ LoggerD("Enter");
using std::placeholders::_1;
using std::placeholders::_2;
@@ -54,11 +55,12 @@ SystemSettingInstance::SystemSettingInstance()
SystemSettingInstance::~SystemSettingInstance()
{
+ LoggerD("Enter");
}
void SystemSettingInstance::getProperty(const picojson::value& args, picojson::object& out)
{
- LoggerD("");
+ LoggerD("Enter");
const double callback_id = args.get("callbackId").get();
const std::string& type = args.get("type").get();
@@ -68,10 +70,12 @@ void SystemSettingInstance::getProperty(const picojson::value& args, picojson::o
LoggerD("Getting platform value");
picojson::value result = picojson::value(picojson::object());
PlatformResult status = getPlatformPropertyValue(type, &result);
- if(status.IsSuccess())
+ if(status.IsSuccess()) {
ReportSuccess(result, response->get());
- else
+ } else {
+ LoggerE("Failed: getPlatformPropertyValue()");
ReportError(status, &response->get());
+ }
};
auto get_response = [this, callback_id](const std::shared_ptr& response) -> void {
@@ -88,6 +92,7 @@ void SystemSettingInstance::getProperty(const picojson::value& args, picojson::o
PlatformResult SystemSettingInstance::getPlatformPropertyValue(
const std::string& settingType,
picojson::value* out) {
+ LoggerD("Enter");
picojson::object& result_obj = out->get();
int ret;
@@ -129,7 +134,7 @@ PlatformResult SystemSettingInstance::getPlatformPropertyValue(
void SystemSettingInstance::setProperty(const picojson::value& args, picojson::object& out)
{
- LoggerD("");
+ LoggerD("Enter");
const double callback_id = args.get("callbackId").get();
@@ -142,10 +147,12 @@ void SystemSettingInstance::setProperty(const picojson::value& args, picojson::o
auto get = [this, type, value](const std::shared_ptr& response) -> void {
LoggerD("Setting platform value");
PlatformResult status = setPlatformPropertyValue(type, value);
- if (status.IsSuccess())
+ if (status.IsSuccess()) {
ReportSuccess(response->get());
- else
+ } else {
+ LoggerE("Failed: setPlatformPropertyValue()");
ReportError(status, &response->get());
+ }
};
auto get_response = [this, callback_id](const std::shared_ptr& response) -> void {
@@ -162,6 +169,7 @@ void SystemSettingInstance::setProperty(const picojson::value& args, picojson::o
PlatformResult SystemSettingInstance::setPlatformPropertyValue(
const std::string& settingType,
const std::string& settingValue) {
+ LoggerD("Enter");
int ret;
if (settingType == SETTING_HOME_SCREEN) {
ret = system_settings_set_value_string(