mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 07:55:21 +01:00
Qt/QML edition
This commit is contained in:
commit
d7b361ba44
2168 changed files with 721948 additions and 0 deletions
29
linux/udisks2api.h
Normal file
29
linux/udisks2api.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
#ifndef UDISKS2API_H
|
||||
#define UDISKS2API_H
|
||||
|
||||
/*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* Copyright (C) 2020 Raspberry Pi (Trading) Limited
|
||||
*/
|
||||
|
||||
#include <QObject>
|
||||
#include <QFile>
|
||||
|
||||
class UDisks2Api : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit UDisks2Api(QObject *parent = nullptr);
|
||||
int authOpen(const QString &device, const QString &mode = "rw");
|
||||
bool formatDrive(const QString &device, bool mountAfterwards = true);
|
||||
|
||||
protected:
|
||||
QString _resolveDevice(const QString &device);
|
||||
void _unmountDrive(const QString &driveDbusPath);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // UDISKS2API_H
|
Loading…
Add table
Add a link
Reference in a new issue