#include <WifiStorage.h>
|
| static void | unmount () |
| | Explicitly unmounts the filesystem.
|
| |
| void | setPath (const String &path) |
| | Sets the file path, ensuring it starts with "/".
|
| |
| CBORObject | mCbor |
| | The CBOR object used for data serialization/deserialization.
|
| |
| Bytes | mData |
| | The byte array containing the data to be stored or the loaded data.
|
| |
| String | mPath |
| | The file path where data is stored.
|
| |
◆ WifiStorage()
| uniot::WifiStorage::WifiStorage |
( |
| ) |
|
|
inline |
Construct a new WifiStorage object.
Initializes the storage with the filename "wifi.cbor"
◆ clean()
| virtual bool uniot::WifiStorage::clean |
( |
| ) |
|
|
inlineoverridevirtual |
Clear stored WiFi credentials.
Resets SSID and password to empty strings and cleans the storage.
- Return values
-
| true | Clean operation was successful |
| false | Clean operation failed (e.g., file system error) |
Reimplemented from uniot::CBORStorage.
◆ getPassword()
| const String & uniot::WifiStorage::getPassword |
( |
| ) |
const |
|
inline |
Get the stored WiFi password.
- Return values
-
| String& | The stored password |
◆ getSsid()
| const String & uniot::WifiStorage::getSsid |
( |
| ) |
const |
|
inline |
Get the stored WiFi SSID.
- Return values
-
◆ isCredentialsValid()
| bool uniot::WifiStorage::isCredentialsValid |
( |
| ) |
|
|
inline |
Check if stored credentials are valid.
Checks if SSID is not empty, which is considered a minimum requirement for valid credentials.
- Return values
-
◆ restore()
| virtual bool uniot::WifiStorage::restore |
( |
| ) |
|
|
inlineoverridevirtual |
Restore WiFi credentials from persistent storage.
Loads the CBOR object from storage and extracts SSID and password.
- Return values
-
| true | Restore operation was successful |
| false | Restore operation failed (e.g., file system error) |
Reimplemented from uniot::CBORStorage.
◆ setCredentials()
| void uniot::WifiStorage::setCredentials |
( |
const String & | ssid, |
|
|
const String & | password ) |
|
inline |
Set WiFi credentials.
- Parameters
-
| ssid | The WiFi network name |
| password | The WiFi network password |
◆ store()
| virtual bool uniot::WifiStorage::store |
( |
| ) |
|
|
inlineoverridevirtual |
Store WiFi credentials to persistent storage.
Stores the SSID and password to the CBOR object and persists it to storage.
- Return values
-
| true | Storage operation was successful |
| false | Storage operation failed (e.g., file system error) |
Reimplemented from uniot::CBORStorage.
The documentation for this class was generated from the following file: