vintage_net_wizard v0.3.0 VintageNetWizard.Backend behaviour View Source
Backends define the boundaries of getting access points, handling incoming messages, and scanning the network
Link to this section Summary
Callbacks
Get all the access points that the backend knowns about
Apply the WiFi configurations
Perform final completion steps.
Return the configuration status of a configuration that has been applied
Return information about the device for populating the web UI footer
Handle any message the is received by another process
Do any initialization work like subscribing to messages
Apply any actions required to set the backend back to an initial default state
Start scanning for WiFi access points
Stop the scan for WiFi access points
Link to this section Types
Specs
configuration_status() :: :not_configured | :good | :bad
Link to this section Callbacks
Specs
access_points(state :: any()) :: [VintageNetWiFi.AccessPoint.t()]
Get all the access points that the backend knowns about
Specs
apply([VintageNetWizard.WiFiConfiguration.t()], state :: any()) :: {:ok, state :: any()} | {:error, :invalid_state}
Apply the WiFi configurations
Specs
complete([VintageNetWizard.WiFiConfiguration.t()], state :: any()) :: {:ok, state :: any()}
Perform final completion steps.
Specs
configuration_status(state :: any()) :: configuration_status()
Return the configuration status of a configuration that has been applied
Specs
Return information about the device for populating the web UI footer
Specs
Handle any message the is received by another process
If you want the socket to send data to the client
return {:reply, message, state}
, otherwise return
{:noreply, state}
Specs
init() :: state :: any()
Do any initialization work like subscribing to messages
Specs
reset() :: state :: any()
Apply any actions required to set the backend back to an initial default state
Specs
Start scanning for WiFi access points
Specs
Stop the scan for WiFi access points