devicestate

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIDeviceStateManagerGetDeviceStateInfo             = binder.FirstCallTransaction + 0
	TransactionIDeviceStateManagerRegisterCallback               = binder.FirstCallTransaction + 1
	TransactionIDeviceStateManagerRequestState                   = binder.FirstCallTransaction + 2
	TransactionIDeviceStateManagerCancelStateRequest             = binder.FirstCallTransaction + 3
	TransactionIDeviceStateManagerRequestBaseStateOverride       = binder.FirstCallTransaction + 4
	TransactionIDeviceStateManagerCancelBaseStateOverride        = binder.FirstCallTransaction + 5
	TransactionIDeviceStateManagerOnStateRequestOverlayDismissed = binder.FirstCallTransaction + 6
)
View Source
const (
	MethodIDeviceStateManagerGetDeviceStateInfo             = "getDeviceStateInfo"
	MethodIDeviceStateManagerRegisterCallback               = "registerCallback"
	MethodIDeviceStateManagerRequestState                   = "requestState"
	MethodIDeviceStateManagerCancelStateRequest             = "cancelStateRequest"
	MethodIDeviceStateManagerRequestBaseStateOverride       = "requestBaseStateOverride"
	MethodIDeviceStateManagerCancelBaseStateOverride        = "cancelBaseStateOverride"
	MethodIDeviceStateManagerOnStateRequestOverlayDismissed = "onStateRequestOverlayDismissed"
)
View Source
const (
	TransactionIDeviceStateManagerCallbackOnDeviceStateInfoChanged = binder.FirstCallTransaction + 0
	TransactionIDeviceStateManagerCallbackOnRequestActive          = binder.FirstCallTransaction + 1
	TransactionIDeviceStateManagerCallbackOnRequestCanceled        = binder.FirstCallTransaction + 2
)
View Source
const (
	MethodIDeviceStateManagerCallbackOnDeviceStateInfoChanged = "onDeviceStateInfoChanged"
	MethodIDeviceStateManagerCallbackOnRequestActive          = "onRequestActive"
	MethodIDeviceStateManagerCallbackOnRequestCanceled        = "onRequestCanceled"
)
View Source
const DescriptorIDeviceStateManager = "android.hardware.devicestate.IDeviceStateManager"
View Source
const DescriptorIDeviceStateManagerCallback = "android.hardware.devicestate.IDeviceStateManagerCallback"

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceStateInfo

type DeviceStateInfo struct {
	BaseState    int32
	CurrentState int32
}

func (*DeviceStateInfo) MarshalParcel

func (s *DeviceStateInfo) MarshalParcel(
	p *parcel.Parcel,
) error

func (*DeviceStateInfo) UnmarshalParcel

func (s *DeviceStateInfo) UnmarshalParcel(
	p *parcel.Parcel,
) error

type DeviceStateManagerCallbackProxy

type DeviceStateManagerCallbackProxy struct {
	Remote binder.IBinder
}

func NewDeviceStateManagerCallbackProxy

func NewDeviceStateManagerCallbackProxy(
	remote binder.IBinder,
) *DeviceStateManagerCallbackProxy

func (*DeviceStateManagerCallbackProxy) AsBinder

func (*DeviceStateManagerCallbackProxy) OnDeviceStateInfoChanged

func (p *DeviceStateManagerCallbackProxy) OnDeviceStateInfoChanged(
	ctx context.Context,
	info DeviceStateInfo,
) error

func (*DeviceStateManagerCallbackProxy) OnRequestActive

func (p *DeviceStateManagerCallbackProxy) OnRequestActive(
	ctx context.Context,
	token binder.IBinder,
) error

func (*DeviceStateManagerCallbackProxy) OnRequestCanceled

func (p *DeviceStateManagerCallbackProxy) OnRequestCanceled(
	ctx context.Context,
	token binder.IBinder,
) error

type DeviceStateManagerCallbackStub

type DeviceStateManagerCallbackStub struct {
	Impl      IDeviceStateManagerCallback
	Transport binder.VersionAwareTransport
}

DeviceStateManagerCallbackStub dispatches incoming binder transactions to a typed IDeviceStateManagerCallback implementation.

func (*DeviceStateManagerCallbackStub) Descriptor

func (s *DeviceStateManagerCallbackStub) Descriptor() string

func (*DeviceStateManagerCallbackStub) OnTransaction

type DeviceStateManagerProxy

type DeviceStateManagerProxy struct {
	Remote binder.IBinder
}

func NewDeviceStateManagerProxy

func NewDeviceStateManagerProxy(
	remote binder.IBinder,
) *DeviceStateManagerProxy

func (*DeviceStateManagerProxy) AsBinder

func (p *DeviceStateManagerProxy) AsBinder() binder.IBinder

func (*DeviceStateManagerProxy) CancelBaseStateOverride

func (p *DeviceStateManagerProxy) CancelBaseStateOverride(
	ctx context.Context,
) error

func (*DeviceStateManagerProxy) CancelStateRequest

func (p *DeviceStateManagerProxy) CancelStateRequest(
	ctx context.Context,
) error

func (*DeviceStateManagerProxy) GetDeviceStateInfo

func (p *DeviceStateManagerProxy) GetDeviceStateInfo(
	ctx context.Context,
) (DeviceStateInfo, error)

func (*DeviceStateManagerProxy) OnStateRequestOverlayDismissed

func (p *DeviceStateManagerProxy) OnStateRequestOverlayDismissed(
	ctx context.Context,
	shouldCancelRequest bool,
) error

func (*DeviceStateManagerProxy) RegisterCallback

func (p *DeviceStateManagerProxy) RegisterCallback(
	ctx context.Context,
	callback IDeviceStateManagerCallback,
) error

func (*DeviceStateManagerProxy) RequestBaseStateOverride

func (p *DeviceStateManagerProxy) RequestBaseStateOverride(
	ctx context.Context,
	token binder.IBinder,
	state int32,
	flags int32,
) error

func (*DeviceStateManagerProxy) RequestState

func (p *DeviceStateManagerProxy) RequestState(
	ctx context.Context,
	token binder.IBinder,
	state int32,
	flags int32,
) error

type DeviceStateManagerStub

type DeviceStateManagerStub struct {
	Impl      IDeviceStateManager
	Transport binder.VersionAwareTransport
}

DeviceStateManagerStub dispatches incoming binder transactions to a typed IDeviceStateManager implementation.

func (*DeviceStateManagerStub) Descriptor

func (s *DeviceStateManagerStub) Descriptor() string

func (*DeviceStateManagerStub) OnTransaction

func (s *DeviceStateManagerStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type IDeviceStateManager

type IDeviceStateManager interface {
	AsBinder() binder.IBinder
	GetDeviceStateInfo(ctx context.Context) (DeviceStateInfo, error)
	RegisterCallback(ctx context.Context, callback IDeviceStateManagerCallback) error
	RequestState(ctx context.Context, token binder.IBinder, state int32, flags int32) error
	CancelStateRequest(ctx context.Context) error
	RequestBaseStateOverride(ctx context.Context, token binder.IBinder, state int32, flags int32) error
	CancelBaseStateOverride(ctx context.Context) error
	OnStateRequestOverlayDismissed(ctx context.Context, shouldCancelRequest bool) error
}

func NewDeviceStateManagerStub

func NewDeviceStateManagerStub(
	impl IDeviceStateManagerServer,
) IDeviceStateManager

NewDeviceStateManagerStub creates a server-side IDeviceStateManager wrapping the given server implementation. The returned value satisfies IDeviceStateManager and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IDeviceStateManagerCallback

type IDeviceStateManagerCallback interface {
	AsBinder() binder.IBinder
	OnDeviceStateInfoChanged(ctx context.Context, info DeviceStateInfo) error
	OnRequestActive(ctx context.Context, token binder.IBinder) error
	OnRequestCanceled(ctx context.Context, token binder.IBinder) error
}

func NewDeviceStateManagerCallbackStub

func NewDeviceStateManagerCallbackStub(
	impl IDeviceStateManagerCallbackServer,
) IDeviceStateManagerCallback

NewDeviceStateManagerCallbackStub creates a server-side IDeviceStateManagerCallback wrapping the given server implementation. The returned value satisfies IDeviceStateManagerCallback and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IDeviceStateManagerCallbackServer

type IDeviceStateManagerCallbackServer interface {
	OnDeviceStateInfoChanged(ctx context.Context, info DeviceStateInfo) error
	OnRequestActive(ctx context.Context, token binder.IBinder) error
	OnRequestCanceled(ctx context.Context, token binder.IBinder) error
}

IDeviceStateManagerCallbackServer is the server-side interface that user implementations provide to NewDeviceStateManagerCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IDeviceStateManagerServer

type IDeviceStateManagerServer interface {
	GetDeviceStateInfo(ctx context.Context) (DeviceStateInfo, error)
	RegisterCallback(ctx context.Context, callback IDeviceStateManagerCallback) error
	RequestState(ctx context.Context, token binder.IBinder, state int32, flags int32) error
	CancelStateRequest(ctx context.Context) error
	RequestBaseStateOverride(ctx context.Context, token binder.IBinder, state int32, flags int32) error
	CancelBaseStateOverride(ctx context.Context) error
	OnStateRequestOverlayDismissed(ctx context.Context, shouldCancelRequest bool) error
}

IDeviceStateManagerServer is the server-side interface that user implementations provide to NewDeviceStateManagerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

Jump to

Keyboard shortcuts

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