Documentation ¶
Overview ¶
Package mojo provides functions to access the bluetooth mojo interface defined in cros_bluetooth_config.mojom
Index ¶
- Constants
- func PollForBluetoothSystemState(ctx context.Context, btmojo chrome.JSObject, exp BluetoothSystemState) error
- func SetBluetoothEnabledState(ctx context.Context, btmojo chrome.JSObject, enabled bool) error
- type BTConn
- func (*BTConn) PostTest(ctx context.Context, s *testing.FixtTestState)
- func (*BTConn) PreTest(ctx context.Context, s *testing.FixtTestState)
- func (m *BTConn) Reset(ctx context.Context) error
- func (m *BTConn) SetUp(ctx context.Context, s *testing.FixtState) interface{}
- func (m *BTConn) TearDown(ctx context.Context, s *testing.FixtState)
- type BluetoothModificationState
- type BluetoothSystemProperties
- type BluetoothSystemState
Constants ¶
View Source
const BTConfigJS = `` /* 806-byte string literal not displayed */
BTConfigJS is javascript code that initializes the config object and defines some additional functions
Variables ¶
This section is empty.
Functions ¶
func PollForBluetoothSystemState ¶
func PollForBluetoothSystemState(ctx context.Context, btmojo chrome.JSObject, exp BluetoothSystemState) error
PollForBluetoothSystemState polls BluetoothSystemProperties until expected SystemState is received or timeout occurs.
Types ¶
type BluetoothModificationState ¶
type BluetoothModificationState int32
BluetoothModificationState represents the state of whether Bluetooth can be modified.
const ( // the current session may belong to a secondary user, or the screen is locked. CannotModifyBluetooth BluetoothModificationState = iota // CanModifyBluetooth means Bluetooth settings can be modified as part of the current session. CanModifyBluetooth )
type BluetoothSystemProperties ¶
type BluetoothSystemProperties struct { SystemState BluetoothSystemState ModificationState BluetoothModificationState }
BluetoothSystemProperties describes the high-level status of system Bluetooth.
type BluetoothSystemState ¶
type BluetoothSystemState int32
BluetoothSystemState represents the state of Bluetooth on the device.
const ( BluetoothSystemState = iota // Disabled means Bluetooth is turned off. Disabled // Disabling means Bluetooth is in the process of turning off. Disabling // Enabled means Bluetooth is turned on. Enabled BluetoothSystemState = 3 // Enabling means Bluetooth is in the process of turning on. Enabling )Unavailable
Click to show internal directories.
Click to hide internal directories.