modemfwd

package
v0.0.0-...-683b059 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package modemfwd interacts with modemfwd D-Bus service.

Index

Constants

View Source
const (

	// JobName is the name of the modemfwd process
	JobName = "modemfwd"
	// DisableAutoUpdatePref disables auto update on modemfwd
	DisableAutoUpdatePref = "/var/lib/modemfwd/disable_auto_update"
)

Variables

This section is empty.

Functions

func DisableAutoUpdate

func DisableAutoUpdate(ctx context.Context) (func(), error)

DisableAutoUpdate sets the modemfwd pref value to 1, to disable auto updates. The function returns a closure to restore the pref to its original state.

func GetAutoUpdatePrefValue

func GetAutoUpdatePrefValue(ctx context.Context) bool

GetAutoUpdatePrefValue Gets the pref value of DisableAutoUpdatePref. True if the file exists and it's set to 1, false otherwise.

func StartAndWaitForQuiescence

func StartAndWaitForQuiescence(ctx context.Context) error

StartAndWaitForQuiescence starts the modemfwd job and waits for the initial sequence to complete or until an error is logged.

func WatchUpdateFirmwareCompleted

func WatchUpdateFirmwareCompleted(ctx context.Context) (*dbusutil.SignalWatcher, error)

WatchUpdateFirmwareCompleted returns a SignalWatcher to observe the "UpdateFirmwareCompleted" signal.

Types

type Modemfwd

type Modemfwd struct {
	*dbusutil.DBusObject
}

Modemfwd is used to interact with the modemfwd process over D-Bus. For detailed spec of each D-Bus method, please find src/platform2/modemfwd/dbus_bindings/org.chromium.Modemfwd.xml

func New

func New(ctx context.Context) (*Modemfwd, error)

New connects to modemfwd via D-Bus and returns a Modemfwd object.

func (*Modemfwd) ForceFlash

func (m *Modemfwd) ForceFlash(ctx context.Context, device string, options map[string]string) error

ForceFlash calls modemfwd's ForceFlash D-Bus method.

type UpdateFirmwareCompletedSignal

type UpdateFirmwareCompletedSignal struct {
	// contains filtered or unexported fields
}

UpdateFirmwareCompletedSignal holds values created from the MemoryPressureChrome D-Bus signal.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL