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_mobile/20150612.133019^2~2^2~94
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60cea9a62308abe4782ecf86fbbfde04c9dd4625;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 8dc72733..794553c1 100644
--- a/src/systemsetting/systemsetting_instance.cc
+++ b/src/systemsetting/systemsetting_instance.cc
@@ -28,6 +28,7 @@ using namespace extension::systemsetting;
SystemSettingInstance::SystemSettingInstance()
{
+ LoggerD("Enter");
using std::placeholders::_1;
using std::placeholders::_2;
@@ -42,11 +43,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();
@@ -56,10 +58,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 {
@@ -76,6 +80,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;
@@ -116,7 +121,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();
@@ -129,10 +134,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 {
@@ -149,6 +156,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(