Ken Van Hoeylandt 42e843b463
C++ conversions (#111)
* Remove version from artifact name
* Target C++ 20 and higher
* Use cpp string
* Better crash implementation
* String utils in cpp style
* Replace parameter methods with start() method
* MutexType to Mutex::Type
* Kernel c to cpp style
* Cleanup event flag
* More cpp conversions
* Test fixes
* Updated ideas docs
2024-12-07 12:24:28 +01:00

38 lines
788 B
C++

#pragma once
#include "service/wifi/Wifi.h"
#include "Mutex.h"
namespace tt::app::wifimanage {
/**
* View's state
*/
class State {
Mutex mutex = Mutex(Mutex::TypeRecursive);
bool scanning;
service::wifi::WifiRadioState radioState;
std::vector<service::wifi::WifiApRecord> apRecords;
std::string connectSsid;
public:
State() {}
void setScanning(bool isScanning);
bool isScanning() const;
void setRadioState(service::wifi::WifiRadioState state);
service::wifi::WifiRadioState getRadioState() const;
void updateApRecords();
const std::vector<service::wifi::WifiApRecord>& lockApRecords() const;
void unlockApRecords() const;
void setConnectSsid(std::string ssid);
std::string getConnectSsid() const;
};
} // namespace