From 271c4b74498caa3b44c523f8d51b4104ea790884 Mon Sep 17 00:00:00 2001 From: "jk.pu" Date: Tue, 20 Sep 2016 14:30:55 +0900 Subject: [PATCH] [IotCon] apply native api change(ACR-762) iotcon_remote_resource_get/set_time_interval ->iotcon_remote_resource_get/set_checking_interval Change-Id: If400a2b62f90f098b4122b573cfb2427b48a835d Signed-off-by: jk.pu --- packaging/webapi-plugins.spec | 2 +- src/iotcon/iotcon_instance.cc | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec index 861613c1..f24446b8 100644 --- a/packaging/webapi-plugins.spec +++ b/packaging/webapi-plugins.spec @@ -10,7 +10,7 @@ %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions} Name: webapi-plugins -Version: 1.27 +Version: 1.28 Release: 0 License: Apache-2.0 and BSD-2.0 and MIT Group: Development/Libraries diff --git a/src/iotcon/iotcon_instance.cc b/src/iotcon/iotcon_instance.cc index 057c7a55..c71da521 100644 --- a/src/iotcon/iotcon_instance.cc +++ b/src/iotcon/iotcon_instance.cc @@ -1110,18 +1110,17 @@ common::TizenResult IotconInstance::RemoteResourceGetTimeInterval(const picojson CHECK_PRIVILEGE(kPrivilegeIotcon); -/* TODO Uncomment when the interface of the function iotcon_remote_resource_get_time_interval is changed FoundRemoteInfoPtr ptr; auto res = IotconUtils::RemoteResourceFromJson(args, &ptr); if (!res) { LogAndReturnTizenError(res, ("Failed to build resource using json data")); } -*/ + int time_interval = 0; - auto res = IotconUtils::ConvertIotconError(iotcon_remote_resource_get_time_interval(&time_interval)); + res = IotconUtils::ConvertIotconError(iotcon_remote_resource_get_checking_interval(ptr->handle, &time_interval)); if (!res) { - LogAndReturnTizenError(res, ("iotcon_remote_resource_set_time_interval() failed")); + LogAndReturnTizenError(res, ("iotcon_remote_resource_get_checking_interval() failed")); } return common::TizenSuccess{picojson::value(static_cast(time_interval))}; @@ -1135,17 +1134,15 @@ common::TizenResult IotconInstance::RemoteResourceSetTimeInterval(const picojson int time_interval = static_cast(IotconUtils::GetArg(args, kTimeInterval).get()); -/* TODO Uncomment when the interface of the function iotcon_remote_resource_set_time_interval is changed FoundRemoteInfoPtr ptr; auto res = IotconUtils::RemoteResourceFromJson(args, &ptr); if (!res) { LogAndReturnTizenError(res, ("Failed to build resource using json data")); } -*/ - auto res = IotconUtils::ConvertIotconError(iotcon_remote_resource_set_time_interval(time_interval)); + res = IotconUtils::ConvertIotconError(iotcon_remote_resource_set_checking_interval(ptr->handle, time_interval)); if (!res) { - LogAndReturnTizenError(res, ("iotcon_remote_resource_set_time_interval() failed")); + LogAndReturnTizenError(res, ("iotcon_remote_resource_set_checking_interval() failed")); } // TODO Uncomment when the interface of the function iotcon_remote_resource_set_time_interval is changed -- 2.34.1