LogAndReturnTizenError(result, ("iotcon_resource_interfaces_create() failed"));
}
- std::unique_ptr<std::remove_pointer<iotcon_resource_interfaces_h>::type, void(*)(iotcon_resource_interfaces_h)> ptr{interfaces, &iotcon_resource_interfaces_destroy};
+ std::unique_ptr<std::remove_pointer<iotcon_resource_interfaces_h>::type, int(*)(iotcon_resource_interfaces_h)> ptr{interfaces, &iotcon_resource_interfaces_destroy};
for (const auto& iter : i) {
if (!iter.is<std::string>()) {
LogAndReturnTizenError(result, ("iotcon_resource_types_create() failed"));
}
- std::unique_ptr<std::remove_pointer<iotcon_resource_types_h>::type, void(*)(iotcon_resource_types_h)> ptr{resource_types, &iotcon_resource_types_destroy};
+ std::unique_ptr<std::remove_pointer<iotcon_resource_types_h>::type, int(*)(iotcon_resource_types_h)> ptr{resource_types, &iotcon_resource_types_destroy};
for (const auto& iter : types) {
if (!iter.is<std::string>()) {
if (!result) {
LogAndReturnTizenError(result, ("iotcon_query_create() failed"));
}
- std::unique_ptr<std::remove_pointer<iotcon_query_h>::type, void(*)(iotcon_query_h)>
+ std::unique_ptr<std::remove_pointer<iotcon_query_h>::type, int(*)(iotcon_query_h)>
query_ptr(query, &iotcon_query_destroy); // automatically release the memory
{
// resourceType
LogAndReturnTizenError(result, ("iotcon_representation_create() failed"));
}
- std::unique_ptr<std::remove_pointer<iotcon_representation_h>::type, void(*)(iotcon_representation_h)> ptr{representation, &iotcon_representation_destroy};
+ std::unique_ptr<std::remove_pointer<iotcon_representation_h>::type, int(*)(iotcon_representation_h)> ptr{representation, &iotcon_representation_destroy};
{
char* uri_path = nullptr;
LogAndReturnTizenError(result, ("iotcon_attributes_create() failed"));
}
- std::unique_ptr<std::remove_pointer<iotcon_attributes_h>::type, void(*)(iotcon_attributes_h)> ptr{attributes, &iotcon_attributes_destroy};
+ std::unique_ptr<std::remove_pointer<iotcon_attributes_h>::type, int(*)(iotcon_attributes_h)> ptr{attributes, &iotcon_attributes_destroy};
for (const auto& property : s) {
const auto& key = property.first;
LogAndReturnTizenError(result, ("iotcon_list_create() failed"));
}
- std::unique_ptr<std::remove_pointer<iotcon_list_h>::type, void(*)(iotcon_list_h)> ptr{list, &iotcon_list_destroy};
+ std::unique_ptr<std::remove_pointer<iotcon_list_h>::type, int(*)(iotcon_list_h)> ptr{list, &iotcon_list_destroy};
int position = 0;
LogAndReturnTizenError(result, ("iotcon_options_create() failed"));
}
- std::unique_ptr<std::remove_pointer<iotcon_options_h>::type, void(*)(iotcon_options_h)> ptr{options, &iotcon_options_destroy};
+ std::unique_ptr<std::remove_pointer<iotcon_options_h>::type, int(*)(iotcon_options_h)> ptr{options, &iotcon_options_destroy};
// we ignore values with incorrect types
// TODO: should we convert them in JS?
LogAndReturnTizenError(result, ("iotcon_representation_create() failed"));
}
- std::unique_ptr<std::remove_pointer<iotcon_representation_h>::type, void(*)(iotcon_representation_h)> ptr{representation, &iotcon_representation_destroy};
+ std::unique_ptr<std::remove_pointer<iotcon_representation_h>::type, int(*)(iotcon_representation_h)> ptr{representation, &iotcon_representation_destroy};
{
const auto& uri_path = r.find(kUriPath);