Documentation
¶
Index ¶
- Constants
- type ISuspendCallback
- type ISuspendCallbackServer
- type ISuspendControlService
- type ISuspendControlServiceServer
- type ISystemSuspend
- type ISystemSuspendServer
- type IWakeLock
- type IWakeLockServer
- type IWakelockCallback
- type IWakelockCallbackServer
- type SuspendCallbackProxy
- type SuspendCallbackStub
- type SuspendControlServiceProxy
- func (p *SuspendControlServiceProxy) AsBinder() binder.IBinder
- func (p *SuspendControlServiceProxy) RegisterCallback(ctx context.Context, callback ISuspendCallback) (bool, error)
- func (p *SuspendControlServiceProxy) RegisterWakelockCallback(ctx context.Context, callback IWakelockCallback, name string) (bool, error)
- type SuspendControlServiceStub
- type SystemSuspendProxy
- type SystemSuspendStub
- type WakeLockProxy
- type WakeLockStub
- type WakeLockType
- type WakelockCallbackProxy
- type WakelockCallbackStub
Constants ¶
const ( TransactionISuspendControlServiceRegisterCallback = binder.FirstCallTransaction + 0 TransactionISuspendControlServiceRegisterWakelockCallback = binder.FirstCallTransaction + 1 )
const ( MethodISuspendControlServiceRegisterCallback = "registerCallback" MethodISuspendControlServiceRegisterWakelockCallback = "registerWakelockCallback" )
const ( TransactionIWakelockCallbackNotifyAcquired = binder.FirstCallTransaction + 0 TransactionIWakelockCallbackNotifyReleased = binder.FirstCallTransaction + 1 )
const ( MethodIWakelockCallbackNotifyAcquired = "notifyAcquired" MethodIWakelockCallbackNotifyReleased = "notifyReleased" )
const DescriptorISuspendCallback = "android.system.suspend.ISuspendCallback"
const DescriptorISuspendControlService = "android.system.suspend.ISuspendControlService"
const DescriptorISystemSuspend = "android.system.suspend.ISystemSuspend"
const DescriptorIWakeLock = "android.system.suspend.IWakeLock"
const DescriptorIWakelockCallback = "android.system.suspend.IWakelockCallback"
const (
MethodISuspendCallbackNotifyWakeup = "notifyWakeup"
)
const (
MethodISystemSuspendAcquireWakeLock = "acquireWakeLock"
)
const (
MethodIWakeLockRelease = "release"
)
const (
TransactionISuspendCallbackNotifyWakeup = binder.FirstCallTransaction + 0
)
const (
TransactionISystemSuspendAcquireWakeLock = binder.FirstCallTransaction + 0
)
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 ¶
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 ¶
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 ¶
func NewSuspendCallbackProxy ¶
func NewSuspendCallbackProxy( remote binder.IBinder, ) *SuspendCallbackProxy
func (*SuspendCallbackProxy) AsBinder ¶
func (p *SuspendCallbackProxy) AsBinder() binder.IBinder
func (*SuspendCallbackProxy) NotifyWakeup ¶
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 ¶
func NewSuspendControlServiceProxy ¶
func NewSuspendControlServiceProxy( remote binder.IBinder, ) *SuspendControlServiceProxy
func (*SuspendControlServiceProxy) AsBinder ¶
func (p *SuspendControlServiceProxy) AsBinder() binder.IBinder
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 ¶
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 ¶
func NewWakeLockProxy ¶
func NewWakeLockProxy( remote binder.IBinder, ) *WakeLockProxy
func (*WakeLockProxy) AsBinder ¶
func (p *WakeLockProxy) AsBinder() binder.IBinder
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 ¶
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)