storage/udisks: new plugin
Documentation will follow soon.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
#define UDISKS2_PATH "/org/freedesktop/UDisks2"
|
||||
#define UDISKS2_INTERFACE "org.freedesktop.UDisks2"
|
||||
#define UDISKS2_FILESYSTEM_INTERFACE "org.freedesktop.UDisks2.Filesystem"
|
||||
|
||||
namespace ODBus {
|
||||
class Message;
|
||||
@@ -48,6 +49,16 @@ struct Object {
|
||||
(!drive_id.empty() || !block_id.empty());
|
||||
}
|
||||
|
||||
template<typename I>
|
||||
bool IsId(I &&other) const noexcept {
|
||||
if (!drive_id.empty())
|
||||
return drive_id == std::forward<I>(other);
|
||||
else if (!block_id.empty())
|
||||
return block_id == std::forward<I>(other);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string GetUri() const noexcept {
|
||||
if (!drive_id.empty())
|
||||
return "udisks://" + drive_id;
|
||||
|
Reference in New Issue
Block a user