Documentation ¶
Index ¶
Constants ¶
View Source
const ( Unknown = iota Initializing Locked Disabled Disabling Enabling Enabled Searching Registered Disconnecting Connecting Connected Failed = -1 )
Possible values of State.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectOption ¶
type ConnectOption interface {
// contains filtered or unexported methods
}
ConnectOption is used to specify options during connection.
func WithAllowRoaming ¶
func WithAllowRoaming(allow bool) ConnectOption
WithAllowRoaming inidicates whether roaming should be allowed on the modem.
func WithUserAndPassword ¶
func WithUserAndPassword(user, password string) ConnectOption
WithUserAndPassword sets the user and password required by the network, if necessary.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a wrapper around the ModemManager DBus interface.
func (*Manager) Connect ¶
func (m *Manager) Connect(apn string, opts ...ConnectOption) error
Connect connects the modem managed by Manager using the required APN, and additional ConnectOptions if supplied.
func (*Manager) CurrentAPN ¶
CurrentAPN returns the APN that the modem is configured with.
Click to show internal directories.
Click to hide internal directories.