forked from openSUSE/imagewriter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PlatformUdisks2.h
27 lines (23 loc) · 873 Bytes
/
PlatformUdisks2.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef __PLATFORMUDISKS2_H__
#define __PLATFORMUDISKS2_H__
#include "PlatformUdisks.h"
class PlatformUdisks2 : public Platform
{
public:
PlatformUdisks2(bool kioskMode = false, bool unsafe = false);
void findDevices();
DeviceItem *getNewDevice(QString newPath);
bool isMounted(QString path);
bool unmountDevice(QString path);
int open(DeviceItem* item);
private:
bool udisk2Enabled();
QString getDrivePath(const QString &blockDevice);
QStringList getPartitionList(const QString &devicePath);
bool isPartitionMounted(const QString &partitionPath);
bool doUnmount(const QString &partitionPath);
QVariantMap getBlockDeviceProperties(const QString &blockDevice);
QVariantMap getDriveProperties(const QString &drivePath);
DeviceItem *buildDevice(QVariantMap &blockProperties, QVariantMap &driveProperties);
};
#endif