powerpolicy

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 (
	TransactionICarPowerPolicyServerGetCurrentPowerPolicy               = binder.FirstCallTransaction + 0
	TransactionICarPowerPolicyServerGetPowerComponentState              = binder.FirstCallTransaction + 1
	TransactionICarPowerPolicyServerRegisterPowerPolicyChangeCallback   = binder.FirstCallTransaction + 2
	TransactionICarPowerPolicyServerUnregisterPowerPolicyChangeCallback = binder.FirstCallTransaction + 3
	TransactionICarPowerPolicyServerApplyPowerPolicy                    = binder.FirstCallTransaction + 4
	TransactionICarPowerPolicyServerSetPowerPolicyGroup                 = binder.FirstCallTransaction + 5
)
View Source
const (
	MethodICarPowerPolicyServerGetCurrentPowerPolicy               = "getCurrentPowerPolicy"
	MethodICarPowerPolicyServerGetPowerComponentState              = "getPowerComponentState"
	MethodICarPowerPolicyServerRegisterPowerPolicyChangeCallback   = "registerPowerPolicyChangeCallback"
	MethodICarPowerPolicyServerUnregisterPowerPolicyChangeCallback = "unregisterPowerPolicyChangeCallback"
	MethodICarPowerPolicyServerApplyPowerPolicy                    = "applyPowerPolicy"
	MethodICarPowerPolicyServerSetPowerPolicyGroup                 = "setPowerPolicyGroup"
)
View Source
const DescriptorICarPowerPolicyChangeCallback = "android.frameworks.automotive.powerpolicy.ICarPowerPolicyChangeCallback"
View Source
const DescriptorICarPowerPolicyServer = "android.frameworks.automotive.powerpolicy.ICarPowerPolicyServer"
View Source
const (
	MethodICarPowerPolicyChangeCallbackOnPolicyChanged = "onPolicyChanged"
)
View Source
const (
	TransactionICarPowerPolicyChangeCallbackOnPolicyChanged = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CarPowerPolicy

type CarPowerPolicy struct {
	PolicyId                 string
	EnabledComponents        []PowerComponent
	DisabledComponents       []PowerComponent
	EnabledCustomComponents  []int32
	DisabledCustomComponents []int32
}

func (*CarPowerPolicy) MarshalParcel

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

func (*CarPowerPolicy) UnmarshalParcel

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

type CarPowerPolicyChangeCallbackProxy

type CarPowerPolicyChangeCallbackProxy struct {
	Remote binder.IBinder
}

func NewCarPowerPolicyChangeCallbackProxy

func NewCarPowerPolicyChangeCallbackProxy(
	remote binder.IBinder,
) *CarPowerPolicyChangeCallbackProxy

func (*CarPowerPolicyChangeCallbackProxy) AsBinder

func (*CarPowerPolicyChangeCallbackProxy) OnPolicyChanged

func (p *CarPowerPolicyChangeCallbackProxy) OnPolicyChanged(
	ctx context.Context,
	policy CarPowerPolicy,
) error

type CarPowerPolicyChangeCallbackStub

type CarPowerPolicyChangeCallbackStub struct {
	Impl      ICarPowerPolicyChangeCallback
	Transport binder.VersionAwareTransport
}

CarPowerPolicyChangeCallbackStub dispatches incoming binder transactions to a typed ICarPowerPolicyChangeCallback implementation.

func (*CarPowerPolicyChangeCallbackStub) Descriptor

func (s *CarPowerPolicyChangeCallbackStub) Descriptor() string

func (*CarPowerPolicyChangeCallbackStub) OnTransaction

type CarPowerPolicyFilter

type CarPowerPolicyFilter struct {
	Components       []PowerComponent
	CustomComponents []int32
}

func (*CarPowerPolicyFilter) MarshalParcel

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

func (*CarPowerPolicyFilter) UnmarshalParcel

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

type CarPowerPolicyServerProxy

type CarPowerPolicyServerProxy struct {
	Remote binder.IBinder
}

func NewCarPowerPolicyServerProxy

func NewCarPowerPolicyServerProxy(
	remote binder.IBinder,
) *CarPowerPolicyServerProxy

func (*CarPowerPolicyServerProxy) ApplyPowerPolicy

func (p *CarPowerPolicyServerProxy) ApplyPowerPolicy(
	ctx context.Context,
	policyId string,
) error

func (*CarPowerPolicyServerProxy) AsBinder

func (*CarPowerPolicyServerProxy) GetCurrentPowerPolicy

func (p *CarPowerPolicyServerProxy) GetCurrentPowerPolicy(
	ctx context.Context,
) (CarPowerPolicy, error)

func (*CarPowerPolicyServerProxy) GetPowerComponentState

func (p *CarPowerPolicyServerProxy) GetPowerComponentState(
	ctx context.Context,
	componentId PowerComponent,
) (bool, error)

func (*CarPowerPolicyServerProxy) RegisterPowerPolicyChangeCallback

func (p *CarPowerPolicyServerProxy) RegisterPowerPolicyChangeCallback(
	ctx context.Context,
	callback ICarPowerPolicyChangeCallback,
	filter CarPowerPolicyFilter,
) error

func (*CarPowerPolicyServerProxy) SetPowerPolicyGroup

func (p *CarPowerPolicyServerProxy) SetPowerPolicyGroup(
	ctx context.Context,
	policyGroupId string,
) error

func (*CarPowerPolicyServerProxy) UnregisterPowerPolicyChangeCallback

func (p *CarPowerPolicyServerProxy) UnregisterPowerPolicyChangeCallback(
	ctx context.Context,
	callback ICarPowerPolicyChangeCallback,
) error

type CarPowerPolicyServerStub

type CarPowerPolicyServerStub struct {
	Impl      ICarPowerPolicyServer
	Transport binder.VersionAwareTransport
}

CarPowerPolicyServerStub dispatches incoming binder transactions to a typed ICarPowerPolicyServer implementation.

func (*CarPowerPolicyServerStub) Descriptor

func (s *CarPowerPolicyServerStub) Descriptor() string

func (*CarPowerPolicyServerStub) OnTransaction

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

type ICarPowerPolicyChangeCallback

type ICarPowerPolicyChangeCallback interface {
	AsBinder() binder.IBinder
	OnPolicyChanged(ctx context.Context, policy CarPowerPolicy) error
}

func NewCarPowerPolicyChangeCallbackStub

func NewCarPowerPolicyChangeCallbackStub(
	impl ICarPowerPolicyChangeCallbackServer,
) ICarPowerPolicyChangeCallback

NewCarPowerPolicyChangeCallbackStub creates a server-side ICarPowerPolicyChangeCallback wrapping the given server implementation. The returned value satisfies ICarPowerPolicyChangeCallback 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 ICarPowerPolicyChangeCallbackServer

type ICarPowerPolicyChangeCallbackServer interface {
	OnPolicyChanged(ctx context.Context, policy CarPowerPolicy) error
}

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

type ICarPowerPolicyServer

type ICarPowerPolicyServer interface {
	AsBinder() binder.IBinder
	GetCurrentPowerPolicy(ctx context.Context) (CarPowerPolicy, error)
	GetPowerComponentState(ctx context.Context, componentId PowerComponent) (bool, error)
	RegisterPowerPolicyChangeCallback(ctx context.Context, callback ICarPowerPolicyChangeCallback, filter CarPowerPolicyFilter) error
	UnregisterPowerPolicyChangeCallback(ctx context.Context, callback ICarPowerPolicyChangeCallback) error
	ApplyPowerPolicy(ctx context.Context, policyId string) error
	SetPowerPolicyGroup(ctx context.Context, policyGroupId string) error
}

func NewCarPowerPolicyServerStub

func NewCarPowerPolicyServerStub(
	impl ICarPowerPolicyServerServer,
) ICarPowerPolicyServer

NewCarPowerPolicyServerStub creates a server-side ICarPowerPolicyServer wrapping the given server implementation. The returned value satisfies ICarPowerPolicyServer 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 ICarPowerPolicyServerServer

type ICarPowerPolicyServerServer interface {
	GetCurrentPowerPolicy(ctx context.Context) (CarPowerPolicy, error)
	GetPowerComponentState(ctx context.Context, componentId PowerComponent) (bool, error)
	RegisterPowerPolicyChangeCallback(ctx context.Context, callback ICarPowerPolicyChangeCallback, filter CarPowerPolicyFilter) error
	UnregisterPowerPolicyChangeCallback(ctx context.Context, callback ICarPowerPolicyChangeCallback) error
	ApplyPowerPolicy(ctx context.Context, policyId string) error
	SetPowerPolicyGroup(ctx context.Context, policyGroupId string) error
}

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

type PowerComponent

type PowerComponent int32
const (
	PowerComponentAUDIO                       PowerComponent = 1
	PowerComponentMEDIA                       PowerComponent = 2
	PowerComponentDISPLAY                     PowerComponent = 3
	PowerComponentBLUETOOTH                   PowerComponent = 4
	PowerComponentWIFI                        PowerComponent = 5
	PowerComponentCELLULAR                    PowerComponent = 6
	PowerComponentETHERNET                    PowerComponent = 7
	PowerComponentPROJECTION                  PowerComponent = 8
	PowerComponentNFC                         PowerComponent = 9
	PowerComponentINPUT                       PowerComponent = 10
	PowerComponentVoiceInteraction            PowerComponent = 11
	PowerComponentVisualInteraction           PowerComponent = 12
	PowerComponentTrustedDeviceDetection      PowerComponent = 13
	PowerComponentLOCATION                    PowerComponent = 14
	PowerComponentMICROPHONE                  PowerComponent = 15
	PowerComponentCPU                         PowerComponent = 16
	PowerComponentMinimumCustomComponentValue PowerComponent = 1000
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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