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))};
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