mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-19 00:15:21 +01:00
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:
parent
ebaf2ef6a1
commit
6dc2f3e58e
12 changed files with 373 additions and 197 deletions
26
src/wlancredentials.h
Normal file
26
src/wlancredentials.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
#ifndef WLANCREDENTIALS_H
|
||||
#define WLANCREDENTIALS_H
|
||||
|
||||
/*
|
||||
* Interface for wlan credential detection
|
||||
* Use WlanCredentials::instance() to get platform
|
||||
* specific implementation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* Copyright (C) 2023 Raspberry Pi Ltd
|
||||
*/
|
||||
|
||||
#include <QByteArray>
|
||||
|
||||
class WlanCredentials
|
||||
{
|
||||
public:
|
||||
static WlanCredentials *instance();
|
||||
virtual QByteArray getSSID() = 0;
|
||||
virtual QByteArray getPSK() = 0;
|
||||
|
||||
protected:
|
||||
static WlanCredentials *_instance;
|
||||
};
|
||||
|
||||
#endif // WLANCREDENTIALS_H
|
Loading…
Add table
Add a link
Reference in a new issue