neighbor/udisks: move code to class UDisks2::ParseObjects(ReadMessageIter)

This commit is contained in:
Max Kellermann
2018-06-04 21:41:51 +02:00
parent 0150131984
commit 9626523420
3 changed files with 27 additions and 6 deletions

View File

@@ -231,12 +231,9 @@ UdisksNeighborExplorer::OnListNotify(ODBus::Message reply) noexcept
return;
}
ForEachInterface(i.Recurse(), [this](const char *path, auto &&j){
UDisks2::Object o(path);
UDisks2::ParseObject(o, std::move(j));
if (o.IsValid())
Insert(std::move(o));
});
ParseObjects(i.Recurse(),
std::bind(&UdisksNeighborExplorer::Insert,
this, std::placeholders::_1));
}
inline DBusHandlerResult