View Source VintageNetWizard.BackendServer (vintage_net_wizard v0.4.17)
Server for managing a VintageNet.Backend implementation
Summary
Functions
List out access points
Apply the configurations saved in the backend to the system.
Returns a specification to start this module under a supervisor.
Get the current state of the WiFi configuration
Get the current configuration status
Get a list of the current configurations
Delete the configuration by ssid
Return information about the device for the web page's footer
Reset the backend to an initial default state.
Save a network configuration to the backend
Pass list of SSIDs (priority_order
), sort the configurations
to match that order.
Start scanning for WiFi access points
Stop scanning for WiFi access points
Subscribe to messages from the backend
Functions
@spec access_points() :: [VintageNetWiFi.AccessPoint.t()]
List out access points
@spec apply() :: :ok | {:error, :no_configurations}
Apply the configurations saved in the backend to the system.
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec complete() :: :ok
@spec configuration_state() :: map()
Get the current state of the WiFi configuration
@spec configuration_status() :: any()
Get the current configuration status
@spec configurations() :: [map()]
Get a list of the current configurations
@spec delete_configuration(String.t()) :: :ok
Delete the configuration by ssid
Return information about the device for the web page's footer
@spec reset() :: :ok
Reset the backend to an initial default state.
Save a network configuration to the backend
The network configuration is a map that can be included in the :network
field of a VintageNetWiFi
configuration.
@spec set_priority_order([String.t()]) :: :ok
Pass list of SSIDs (priority_order
), sort the configurations
to match that order.
@spec start_link(backend :: module(), VintageNet.ifname(), [ VintageNetWizard.Backend.opt() ]) :: GenServer.on_start()
@spec start_scan() :: :ok
Start scanning for WiFi access points
@spec stop_scan() :: :ok
Stop scanning for WiFi access points
@spec subscribe() :: :ok
Subscribe to messages from the backend