roo_wifi
API Documentation for roo_wifi
Loading...
Searching...
No Matches
store.h
Go to the documentation of this file.
1#pragma once
2
3#include <inttypes.h>
4
5#include <string>
6#include <vector>
7
8#include "roo_backport.h"
9#include "roo_backport/string_view.h"
10
11namespace roo_wifi {
12
13/// Abstraction for persistently storing Wi-Fi controller data.
14class Store {
15 public:
16 /// Returns whether the Wi-Fi interface is enabled.
17 virtual bool getIsInterfaceEnabled() = 0;
18 /// Sets whether the Wi-Fi interface is enabled.
19 virtual void setIsInterfaceEnabled(bool enabled) = 0;
20 /// Returns the default SSID, if any.
21 virtual std::string getDefaultSSID() = 0;
22 /// Sets the default SSID.
23 virtual void setDefaultSSID(const std::string& ssid) = 0;
24 /// Clears the default SSID.
25 virtual void clearDefaultSSID() = 0;
26 /// Retrieves a stored password for an SSID.
27 virtual bool getPassword(const std::string& ssid, std::string& password) = 0;
28 /// Stores a password for an SSID.
29 virtual void setPassword(const std::string& ssid,
30 roo::string_view password) = 0;
31 /// Clears a stored password for an SSID.
32 virtual void clearPassword(const std::string& ssid) = 0;
33};
34
35} // namespace roo_wifi
Abstraction for persistently storing Wi-Fi controller data.
Definition store.h:14
virtual void clearDefaultSSID()=0
Clears the default SSID.
virtual bool getPassword(const std::string &ssid, std::string &password)=0
Retrieves a stored password for an SSID.
virtual void setPassword(const std::string &ssid, roo::string_view password)=0
Stores a password for an SSID.
virtual bool getIsInterfaceEnabled()=0
Returns whether the Wi-Fi interface is enabled.
virtual std::string getDefaultSSID()=0
Returns the default SSID, if any.
virtual void clearPassword(const std::string &ssid)=0
Clears a stored password for an SSID.
virtual void setDefaultSSID(const std::string &ssid)=0
Sets the default SSID.
virtual void setIsInterfaceEnabled(bool enabled)=0
Sets whether the Wi-Fi interface is enabled.