[IotCon] apply native api change(ACR-762) 37/88637/2
authorjk.pu <jk.pu@samsung.com>
Tue, 20 Sep 2016 05:30:55 +0000 (14:30 +0900)
committerjk.pu <jk.pu@samsung.com>
Tue, 20 Sep 2016 05:46:16 +0000 (14:46 +0900)
iotcon_remote_resource_get/set_time_interval ->iotcon_remote_resource_get/set_checking_interval

Change-Id: If400a2b62f90f098b4122b573cfb2427b48a835d
Signed-off-by: jk.pu <jk.pu@samsung.com>
packaging/webapi-plugins.spec
src/iotcon/iotcon_instance.cc

index 861613c1c9beb7f2e0d267c54507ea5193040aad..f24446b8486c5de0aa673a6257eb7a7371bc6f9a 100644 (file)
@@ -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
index 057c7a554608c275ea6f559089d8ba2f0a898d9f..c71da5214b71ce9187eadfec5b63a8d56a8097ca 100644 (file)
@@ -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<double>(time_interval))};
@@ -1135,17 +1134,15 @@ common::TizenResult IotconInstance::RemoteResourceSetTimeInterval(const picojson
 
   int time_interval = static_cast<int>(IotconUtils::GetArg(args, kTimeInterval).get<double>());
 
-/* 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