suspend

package
v0.0.6 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 (
	TransactionISuspendControlServiceRegisterCallback         = binder.FirstCallTransaction + 0
	TransactionISuspendControlServiceRegisterWakelockCallback = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodISuspendControlServiceRegisterCallback         = "registerCallback"
	MethodISuspendControlServiceRegisterWakelockCallback = "registerWakelockCallback"
)
View Source
const (
	TransactionIWakelockCallbackNotifyAcquired = binder.FirstCallTransaction + 0
	TransactionIWakelockCallbackNotifyReleased = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodIWakelockCallbackNotifyAcquired = "notifyAcquired"
	MethodIWakelockCallbackNotifyReleased = "notifyReleased"
)
View Source
const DescriptorISuspendCallback = "android.system.suspend.ISuspendCallback"
View Source
const DescriptorISuspendControlService = "android.system.suspend.ISuspendControlService"
View Source
const DescriptorISystemSuspend = "android.system.suspend.ISystemSuspend"
View Source
const DescriptorIWakeLock = "android.system.suspend.IWakeLock"
View Source
const DescriptorIWakelockCallback = "android.system.suspend.IWakelockCallback"
View Source
const (
	MethodISuspendCallbackNotifyWakeup = "notifyWakeup"
)
View Source
const (
	MethodISystemSuspendAcquireWakeLock = "acquireWakeLock"
)
View Source
const (
	MethodIWakeLockRelease = "release"
)
View Source
const (
	TransactionISuspendCallbackNotifyWakeup = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionISystemSuspendAcquireWakeLock = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionIWakeLockRelease = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ISuspendCallback

type ISuspendCallback interface {
	AsBinder() binder.IBinder
	NotifyWakeup(ctx context.Context, success bool, wakeupReasons []string) error
}

func NewSuspendCallbackStub

func NewSuspendCallbackStub(
	impl ISuspendCallbackServer,
) ISuspendCallback

NewSuspendCallbackStub creates a server-side ISuspendCallback wrapping the given server implementation. The returned value satisfies ISuspendCallback 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 ISuspendCallbackServer

type ISuspendCallbackServer interface {
	NotifyWakeup(ctx context.Context, success bool, wakeupReasons []string) error
}

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

type ISuspendControlService

type ISuspendControlService interface {
	AsBinder() binder.IBinder
	RegisterCallback(ctx context.Context, callback ISuspendCallback) (bool, error)
	RegisterWakelockCallback(ctx context.Context, callback IWakelockCallback, name string) (bool, error)
}

func NewSuspendControlServiceStub

func NewSuspendControlServiceStub(
	impl ISuspendControlServiceServer,
) ISuspendControlService

NewSuspendControlServiceStub creates a server-side ISuspendControlService wrapping the given server implementation. The returned value satisfies ISuspendControlService 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 ISuspendControlServiceServer

type ISuspendControlServiceServer interface {
	RegisterCallback(ctx context.Context, callback ISuspendCallback) (bool, error)
	RegisterWakelockCallback(ctx context.Context, callback IWakelockCallback, name string) (bool, error)
}

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

type ISystemSuspend

type ISystemSuspend interface {
	AsBinder() binder.IBinder
	AcquireWakeLock(ctx context.Context, type_ WakeLockType, name string) (IWakeLock, error)
}

func NewSystemSuspendStub

func NewSystemSuspendStub(
	impl ISystemSuspendServer,
) ISystemSuspend

NewSystemSuspendStub creates a server-side ISystemSuspend wrapping the given server implementation. The returned value satisfies ISystemSuspend 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 ISystemSuspendServer

type ISystemSuspendServer interface {
	AcquireWakeLock(ctx context.Context, type_ WakeLockType, name string) (IWakeLock, error)
}

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

type IWakeLock

type IWakeLock interface {
	AsBinder() binder.IBinder
	Release(ctx context.Context) error
}

func NewWakeLockStub

func NewWakeLockStub(
	impl IWakeLockServer,
) IWakeLock

NewWakeLockStub creates a server-side IWakeLock wrapping the given server implementation. The returned value satisfies IWakeLock 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 IWakeLockServer

type IWakeLockServer interface {
	Release(ctx context.Context) error
}

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

type IWakelockCallback

type IWakelockCallback interface {
	AsBinder() binder.IBinder
	NotifyAcquired(ctx context.Context) error
	NotifyReleased(ctx context.Context) error
}

func NewWakelockCallbackStub

func NewWakelockCallbackStub(
	impl IWakelockCallbackServer,
) IWakelockCallback

NewWakelockCallbackStub creates a server-side IWakelockCallback wrapping the given server implementation. The returned value satisfies IWakelockCallback 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 IWakelockCallbackServer

type IWakelockCallbackServer interface {
	NotifyAcquired(ctx context.Context) error
	NotifyReleased(ctx context.Context) error
}

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

type SuspendCallbackProxy

type SuspendCallbackProxy struct {
	Remote binder.IBinder
}

func NewSuspendCallbackProxy

func NewSuspendCallbackProxy(
	remote binder.IBinder,
) *SuspendCallbackProxy

func (*SuspendCallbackProxy) AsBinder

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

func (*SuspendCallbackProxy) NotifyWakeup

func (p *SuspendCallbackProxy) NotifyWakeup(
	ctx context.Context,
	success bool,
	wakeupReasons []string,
) error

type SuspendCallbackStub

type SuspendCallbackStub struct {
	Impl      ISuspendCallback
	Transport binder.VersionAwareTransport
}

SuspendCallbackStub dispatches incoming binder transactions to a typed ISuspendCallback implementation.

func (*SuspendCallbackStub) Descriptor

func (s *SuspendCallbackStub) Descriptor() string

func (*SuspendCallbackStub) OnTransaction

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

type SuspendControlServiceProxy

type SuspendControlServiceProxy struct {
	Remote binder.IBinder
}

func NewSuspendControlServiceProxy

func NewSuspendControlServiceProxy(
	remote binder.IBinder,
) *SuspendControlServiceProxy

func (*SuspendControlServiceProxy) AsBinder

func (*SuspendControlServiceProxy) RegisterCallback

func (p *SuspendControlServiceProxy) RegisterCallback(
	ctx context.Context,
	callback ISuspendCallback,
) (bool, error)

func (*SuspendControlServiceProxy) RegisterWakelockCallback

func (p *SuspendControlServiceProxy) RegisterWakelockCallback(
	ctx context.Context,
	callback IWakelockCallback,
	name string,
) (bool, error)

type SuspendControlServiceStub

type SuspendControlServiceStub struct {
	Impl      ISuspendControlService
	Transport binder.VersionAwareTransport
}

SuspendControlServiceStub dispatches incoming binder transactions to a typed ISuspendControlService implementation.

func (*SuspendControlServiceStub) Descriptor

func (s *SuspendControlServiceStub) Descriptor() string

func (*SuspendControlServiceStub) OnTransaction

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

type SystemSuspendProxy

type SystemSuspendProxy struct {
	Remote binder.IBinder
}

func NewSystemSuspendProxy

func NewSystemSuspendProxy(
	remote binder.IBinder,
) *SystemSuspendProxy

func (*SystemSuspendProxy) AcquireWakeLock

func (p *SystemSuspendProxy) AcquireWakeLock(
	ctx context.Context,
	type_ WakeLockType,
	name string,
) (IWakeLock, error)

func (*SystemSuspendProxy) AsBinder

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

type SystemSuspendStub

type SystemSuspendStub struct {
	Impl      ISystemSuspend
	Transport binder.VersionAwareTransport
}

SystemSuspendStub dispatches incoming binder transactions to a typed ISystemSuspend implementation.

func (*SystemSuspendStub) Descriptor

func (s *SystemSuspendStub) Descriptor() string

func (*SystemSuspendStub) OnTransaction

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

type WakeLockProxy

type WakeLockProxy struct {
	Remote binder.IBinder
}

func NewWakeLockProxy

func NewWakeLockProxy(
	remote binder.IBinder,
) *WakeLockProxy

func (*WakeLockProxy) AsBinder

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

func (*WakeLockProxy) Release

func (p *WakeLockProxy) Release(
	ctx context.Context,
) error

type WakeLockStub

type WakeLockStub struct {
	Impl      IWakeLock
	Transport binder.VersionAwareTransport
}

WakeLockStub dispatches incoming binder transactions to a typed IWakeLock implementation.

func (*WakeLockStub) Descriptor

func (s *WakeLockStub) Descriptor() string

func (*WakeLockStub) OnTransaction

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

type WakeLockType

type WakeLockType int32
const (
	WakeLockTypePARTIAL WakeLockType = 0
	WakeLockTypeFULL    WakeLockType = 1
)

type WakelockCallbackProxy

type WakelockCallbackProxy struct {
	Remote binder.IBinder
}

func NewWakelockCallbackProxy

func NewWakelockCallbackProxy(
	remote binder.IBinder,
) *WakelockCallbackProxy

func (*WakelockCallbackProxy) AsBinder

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

func (*WakelockCallbackProxy) NotifyAcquired

func (p *WakelockCallbackProxy) NotifyAcquired(
	ctx context.Context,
) error

func (*WakelockCallbackProxy) NotifyReleased

func (p *WakelockCallbackProxy) NotifyReleased(
	ctx context.Context,
) error

type WakelockCallbackStub

type WakelockCallbackStub struct {
	Impl      IWakelockCallback
	Transport binder.VersionAwareTransport
}

WakelockCallbackStub dispatches incoming binder transactions to a typed IWakelockCallback implementation.

func (*WakelockCallbackStub) Descriptor

func (s *WakelockCallbackStub) Descriptor() string

func (*WakelockCallbackStub) OnTransaction

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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