12 #include "storage/IStorageProvider.h" 81 std::string m_DeviceKitUDI;
82 std::string m_MountPath;
83 std::string m_FileSystem;
90 bool m_isSystemInternal;
92 int64_t m_PartitionSize;
101 void Initialize()
override;
102 void Stop()
override { }
104 void GetLocalDrives(VECSOURCES &localDrives)
override { GetDisks(localDrives,
false); }
105 void GetRemovableDrives(VECSOURCES &removableDrives)
override { GetDisks(removableDrives,
true); }
107 bool Eject(
const std::string& mountpath)
override;
109 std::vector<std::string> GetDiskUsage()
override;
113 static bool HasUDisks();
115 typedef std::map<std::string, CUDiskDevice *> DeviceMap;
116 typedef std::pair<std::string, CUDiskDevice *> DevicePair;
122 std::vector<std::string> EnumerateDisks();
124 void GetDisks(VECSOURCES& devices,
bool EnumerateRemovable);
128 DeviceMap m_AvailableDevices;
std::string GetMountPoint() const
Get the device mount point.
Definition: UDisksProvider.cpp:176
Definition: DBusUtil.h:38
MEDIA_DETECT::STORAGE::Type GetStorageType() const
Get the storage type of this device.
Definition: UDisksProvider.cpp:158
Definition: UDisksProvider.h:95
bool IsMounted() const
Check if the device is mounted.
Definition: UDisksProvider.cpp:166
bool IsOptical() const
Check if the device is optical.
Definition: UDisksProvider.cpp:153
CMediaSource ToMediaShare() const
Get a representation of the device as a media share.
Definition: UDisksProvider.cpp:126
Definition: IStorageProvider.h:65
std::string GetDisplayName() const
Get the device display name/label.
Definition: UDisksProvider.cpp:171
bool IsApproved() const
Check if the device is approved/whitelisted.
Definition: UDisksProvider.cpp:147
Definition: UDisksProvider.h:17
MEDIA_DETECT::STORAGE::StorageDevice ToStorageDevice() const
Get a representation of the device as a storage device abstraction.
Definition: UDisksProvider.cpp:186
std::string ToString() const
Get a representation of the device as a readable string.
Definition: UDisksProvider.cpp:197
bool IsSystemInternal() const
Check if the device is internal to the system.
Definition: UDisksProvider.cpp:181
Definition: IStorageProvider.h:44