c87200a80d
- Create `Include/` folder for all main projects - Fix some issues here and there (found while moving things) - All includes are now in `Tactility/` subfolder and must be included with that prefix. This fixes issues with clashing POSIX headers (e.g. `<semaphore.h>` versus Tactility's `Semaphore.h`)
42 lines
770 B
C++
42 lines
770 B
C++
#pragma once
|
|
|
|
#include "./View.h"
|
|
#include "./State.h"
|
|
|
|
#include "Tactility/app/App.h"
|
|
|
|
#include <Tactility/PubSub.h>
|
|
#include <Tactility/Mutex.h>
|
|
#include <Tactility/service/wifi/Wifi.h>
|
|
|
|
namespace tt::app::wifimanage {
|
|
|
|
class WifiManage : public App {
|
|
|
|
private:
|
|
|
|
PubSub::SubscriptionHandle wifiSubscription = nullptr;
|
|
Mutex mutex;
|
|
Bindings bindings = { };
|
|
State state;
|
|
View view = View(&bindings, &state);
|
|
bool isViewEnabled = false;
|
|
|
|
public:
|
|
|
|
WifiManage();
|
|
|
|
void lock();
|
|
void unlock();
|
|
|
|
void onShow(AppContext& app, lv_obj_t* parent) override;
|
|
void onHide(AppContext& app) override;
|
|
|
|
Bindings& getBindings() { return bindings; }
|
|
State& getState() { return state; }
|
|
|
|
void requestViewUpdate();
|
|
};
|
|
|
|
} // namespace
|