Refactor WLAN PSK retrieval code

- Reduce platform specific code in ImageWriter class,
  and move that to seperate classes.
- Use API calls to get current SSID on Windows and Linux instead
  of launching command line utilities.
This commit is contained in:
Floris Bos 2023-03-10 18:37:22 +01:00
parent ebaf2ef6a1
commit 6dc2f3e58e
12 changed files with 373 additions and 197 deletions

View file

@ -6,17 +6,17 @@
* Copyright (C) 2022 Raspberry Pi Ltd
*/
#include <QObject>
#include "wlancredentials.h"
class NetworkManagerApi : public QObject
class NetworkManagerApi : public WlanCredentials
{
Q_OBJECT
public:
explicit NetworkManagerApi(QObject *parent = nullptr);
QString getPSK();
signals:
NetworkManagerApi();
virtual QByteArray getSSID();
virtual QByteArray getPSK();
protected:
QByteArray _getSSIDofInterface(const QByteArray &iface);
};
#endif // NETWORKMANAGERAPI_H