retro-imager/linux/udisks2api.h
Floris Bos 86f893388c Shift+Ctrl+X for advanced users that likes to customize the image
- Adds "hidden" shift+ctrl+X shortcut for eXpert image customization
  options.

Allows one to set certain options on RPI OS images, namely:

* disable overscan
* set hostname
* enable ssh and
  - set Pi user password if using password authentication
  OR
  - set authorized_keys
    (if running Imager on Linux/Mac this will
     have contents of ~/.ssh/id_rsa.pub prefilled)
* configure wifi settings
  (if computer running Imager is connected by wifi it will
  prefill wifi SSID and if on Windows also PSK).
* set time zone and keyboard layout

  Related to feature requests/issues:
  Ref #127
  Ref #86
  Ref #102
  Ref #73
  Ref #68
  Ref #25
  Ref #12

- Option Window also allows setting a couple other general settings:

* Adds option for audible notification (beep) when imaging completes.
  Closes #46

* Adds option not to eject media when done.
  Closes #144

- No longer suspends a number of Windows services during Imaging
  (We want Windows to detect the drive and mount it, or we may
   not be able to alter files on FAT partition).
2021-01-17 17:43:17 +01:00

31 lines
695 B
C++

#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);
QString mountDevice(const QString &device);
void unmountDrive(const QString &device);
protected:
QString _resolveDevice(const QString &device);
void _unmountDrive(const QString &driveDbusPath);
signals:
public slots:
};
#endif // UDISKS2API_H