Documentation
¶
Index ¶
- Constants
- type DeviceStateInfo
- type DeviceStateManagerCallbackProxy
- func (p *DeviceStateManagerCallbackProxy) AsBinder() binder.IBinder
- func (p *DeviceStateManagerCallbackProxy) OnDeviceStateInfoChanged(ctx context.Context, info DeviceStateInfo) error
- func (p *DeviceStateManagerCallbackProxy) OnRequestActive(ctx context.Context, token binder.IBinder) error
- func (p *DeviceStateManagerCallbackProxy) OnRequestCanceled(ctx context.Context, token binder.IBinder) error
- type DeviceStateManagerCallbackStub
- type DeviceStateManagerProxy
- func (p *DeviceStateManagerProxy) AsBinder() binder.IBinder
- func (p *DeviceStateManagerProxy) CancelBaseStateOverride(ctx context.Context) error
- func (p *DeviceStateManagerProxy) CancelStateRequest(ctx context.Context) error
- func (p *DeviceStateManagerProxy) GetDeviceStateInfo(ctx context.Context) (DeviceStateInfo, error)
- func (p *DeviceStateManagerProxy) OnStateRequestOverlayDismissed(ctx context.Context, shouldCancelRequest bool) error
- func (p *DeviceStateManagerProxy) RegisterCallback(ctx context.Context, callback IDeviceStateManagerCallback) error
- func (p *DeviceStateManagerProxy) RequestBaseStateOverride(ctx context.Context, token binder.IBinder, state int32, flags int32) error
- func (p *DeviceStateManagerProxy) RequestState(ctx context.Context, token binder.IBinder, state int32, flags int32) error
- type DeviceStateManagerStub
- type IDeviceStateManager
- type IDeviceStateManagerCallback
- type IDeviceStateManagerCallbackServer
- type IDeviceStateManagerServer
Constants ¶
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 )
const ( MethodIDeviceStateManagerGetDeviceStateInfo = "getDeviceStateInfo" MethodIDeviceStateManagerRegisterCallback = "registerCallback" MethodIDeviceStateManagerRequestState = "requestState" MethodIDeviceStateManagerCancelStateRequest = "cancelStateRequest" MethodIDeviceStateManagerRequestBaseStateOverride = "requestBaseStateOverride" MethodIDeviceStateManagerCancelBaseStateOverride = "cancelBaseStateOverride" MethodIDeviceStateManagerOnStateRequestOverlayDismissed = "onStateRequestOverlayDismissed" )
const ( TransactionIDeviceStateManagerCallbackOnDeviceStateInfoChanged = binder.FirstCallTransaction + 0 TransactionIDeviceStateManagerCallbackOnRequestActive = binder.FirstCallTransaction + 1 TransactionIDeviceStateManagerCallbackOnRequestCanceled = binder.FirstCallTransaction + 2 )
const ( MethodIDeviceStateManagerCallbackOnDeviceStateInfoChanged = "onDeviceStateInfoChanged" MethodIDeviceStateManagerCallbackOnRequestActive = "onRequestActive" MethodIDeviceStateManagerCallbackOnRequestCanceled = "onRequestCanceled" )
const DescriptorIDeviceStateManager = "android.hardware.devicestate.IDeviceStateManager"
const DescriptorIDeviceStateManagerCallback = "android.hardware.devicestate.IDeviceStateManagerCallback"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceStateInfo ¶
func (*DeviceStateInfo) MarshalParcel ¶
func (s *DeviceStateInfo) MarshalParcel( p *parcel.Parcel, ) error
func (*DeviceStateInfo) UnmarshalParcel ¶
func (s *DeviceStateInfo) UnmarshalParcel( p *parcel.Parcel, ) error
type DeviceStateManagerCallbackProxy ¶
func NewDeviceStateManagerCallbackProxy ¶
func NewDeviceStateManagerCallbackProxy( remote binder.IBinder, ) *DeviceStateManagerCallbackProxy
func (*DeviceStateManagerCallbackProxy) AsBinder ¶
func (p *DeviceStateManagerCallbackProxy) AsBinder() binder.IBinder
func (*DeviceStateManagerCallbackProxy) OnDeviceStateInfoChanged ¶
func (p *DeviceStateManagerCallbackProxy) OnDeviceStateInfoChanged( ctx context.Context, info DeviceStateInfo, ) error
func (*DeviceStateManagerCallbackProxy) OnRequestActive ¶
func (*DeviceStateManagerCallbackProxy) OnRequestCanceled ¶
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 ¶
func (s *DeviceStateManagerCallbackStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type DeviceStateManagerProxy ¶
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 (*DeviceStateManagerProxy) RequestState ¶
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).