attention

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 (
	TransactionIAttentionCallbackOnSuccess = binder.FirstCallTransaction + 0
	TransactionIAttentionCallbackOnFailure = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodIAttentionCallbackOnSuccess = "onSuccess"
	MethodIAttentionCallbackOnFailure = "onFailure"
)
View Source
const (
	TransactionIAttentionServiceCheckAttention          = binder.FirstCallTransaction + 0
	TransactionIAttentionServiceCancelAttentionCheck    = binder.FirstCallTransaction + 1
	TransactionIAttentionServiceOnStartProximityUpdates = binder.FirstCallTransaction + 2
	TransactionIAttentionServiceOnStopProximityUpdates  = binder.FirstCallTransaction + 3
)
View Source
const (
	MethodIAttentionServiceCheckAttention          = "checkAttention"
	MethodIAttentionServiceCancelAttentionCheck    = "cancelAttentionCheck"
	MethodIAttentionServiceOnStartProximityUpdates = "onStartProximityUpdates"
	MethodIAttentionServiceOnStopProximityUpdates  = "onStopProximityUpdates"
)
View Source
const DescriptorIAttentionCallback = "android.service.attention.IAttentionCallback"
View Source
const DescriptorIAttentionService = "android.service.attention.IAttentionService"
View Source
const DescriptorIProximityUpdateCallback = "android.service.attention.IProximityUpdateCallback"
View Source
const (
	MethodIProximityUpdateCallbackOnProximityUpdate = "onProximityUpdate"
)
View Source
const (
	TransactionIProximityUpdateCallbackOnProximityUpdate = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttentionCallbackProxy

type AttentionCallbackProxy struct {
	Remote binder.IBinder
}

func NewAttentionCallbackProxy

func NewAttentionCallbackProxy(
	remote binder.IBinder,
) *AttentionCallbackProxy

func (*AttentionCallbackProxy) AsBinder

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

func (*AttentionCallbackProxy) OnFailure

func (p *AttentionCallbackProxy) OnFailure(
	ctx context.Context,
	error_ int32,
) error

func (*AttentionCallbackProxy) OnSuccess

func (p *AttentionCallbackProxy) OnSuccess(
	ctx context.Context,
	result int32,
	timestamp int64,
) error

type AttentionCallbackStub

type AttentionCallbackStub struct {
	Impl      IAttentionCallback
	Transport binder.VersionAwareTransport
}

AttentionCallbackStub dispatches incoming binder transactions to a typed IAttentionCallback implementation.

func (*AttentionCallbackStub) Descriptor

func (s *AttentionCallbackStub) Descriptor() string

func (*AttentionCallbackStub) OnTransaction

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

type AttentionServiceProxy

type AttentionServiceProxy struct {
	Remote binder.IBinder
}

func NewAttentionServiceProxy

func NewAttentionServiceProxy(
	remote binder.IBinder,
) *AttentionServiceProxy

func (*AttentionServiceProxy) AsBinder

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

func (*AttentionServiceProxy) CancelAttentionCheck

func (p *AttentionServiceProxy) CancelAttentionCheck(
	ctx context.Context,
	callback IAttentionCallback,
) error

func (*AttentionServiceProxy) CheckAttention

func (p *AttentionServiceProxy) CheckAttention(
	ctx context.Context,
	callback IAttentionCallback,
) error

func (*AttentionServiceProxy) OnStartProximityUpdates

func (p *AttentionServiceProxy) OnStartProximityUpdates(
	ctx context.Context,
	callback IProximityUpdateCallback,
) error

func (*AttentionServiceProxy) OnStopProximityUpdates

func (p *AttentionServiceProxy) OnStopProximityUpdates(
	ctx context.Context,
) error

type AttentionServiceStub

type AttentionServiceStub struct {
	Impl      IAttentionService
	Transport binder.VersionAwareTransport
}

AttentionServiceStub dispatches incoming binder transactions to a typed IAttentionService implementation.

func (*AttentionServiceStub) Descriptor

func (s *AttentionServiceStub) Descriptor() string

func (*AttentionServiceStub) OnTransaction

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

type IAttentionCallback

type IAttentionCallback interface {
	AsBinder() binder.IBinder
	OnSuccess(ctx context.Context, result int32, timestamp int64) error
	OnFailure(ctx context.Context, error_ int32) error
}

func NewAttentionCallbackStub

func NewAttentionCallbackStub(
	impl IAttentionCallbackServer,
) IAttentionCallback

NewAttentionCallbackStub creates a server-side IAttentionCallback wrapping the given server implementation. The returned value satisfies IAttentionCallback 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 IAttentionCallbackServer

type IAttentionCallbackServer interface {
	OnSuccess(ctx context.Context, result int32, timestamp int64) error
	OnFailure(ctx context.Context, error_ int32) error
}

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

type IAttentionService

type IAttentionService interface {
	AsBinder() binder.IBinder
	CheckAttention(ctx context.Context, callback IAttentionCallback) error
	CancelAttentionCheck(ctx context.Context, callback IAttentionCallback) error
	OnStartProximityUpdates(ctx context.Context, callback IProximityUpdateCallback) error
	OnStopProximityUpdates(ctx context.Context) error
}

func NewAttentionServiceStub

func NewAttentionServiceStub(
	impl IAttentionServiceServer,
) IAttentionService

NewAttentionServiceStub creates a server-side IAttentionService wrapping the given server implementation. The returned value satisfies IAttentionService 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 IAttentionServiceServer

type IAttentionServiceServer interface {
	CheckAttention(ctx context.Context, callback IAttentionCallback) error
	CancelAttentionCheck(ctx context.Context, callback IAttentionCallback) error
	OnStartProximityUpdates(ctx context.Context, callback IProximityUpdateCallback) error
	OnStopProximityUpdates(ctx context.Context) error
}

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

type IProximityUpdateCallback

type IProximityUpdateCallback interface {
	AsBinder() binder.IBinder
	OnProximityUpdate(ctx context.Context, distance float64) error
}

func NewProximityUpdateCallbackStub

func NewProximityUpdateCallbackStub(
	impl IProximityUpdateCallbackServer,
) IProximityUpdateCallback

NewProximityUpdateCallbackStub creates a server-side IProximityUpdateCallback wrapping the given server implementation. The returned value satisfies IProximityUpdateCallback 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 IProximityUpdateCallbackServer

type IProximityUpdateCallbackServer interface {
	OnProximityUpdate(ctx context.Context, distance float64) error
}

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

type ProximityUpdateCallbackProxy

type ProximityUpdateCallbackProxy struct {
	Remote binder.IBinder
}

func NewProximityUpdateCallbackProxy

func NewProximityUpdateCallbackProxy(
	remote binder.IBinder,
) *ProximityUpdateCallbackProxy

func (*ProximityUpdateCallbackProxy) AsBinder

func (*ProximityUpdateCallbackProxy) OnProximityUpdate

func (p *ProximityUpdateCallbackProxy) OnProximityUpdate(
	ctx context.Context,
	distance float64,
) error

type ProximityUpdateCallbackStub

type ProximityUpdateCallbackStub struct {
	Impl      IProximityUpdateCallback
	Transport binder.VersionAwareTransport
}

ProximityUpdateCallbackStub dispatches incoming binder transactions to a typed IProximityUpdateCallback implementation.

func (*ProximityUpdateCallbackStub) Descriptor

func (s *ProximityUpdateCallbackStub) Descriptor() string

func (*ProximityUpdateCallbackStub) OnTransaction

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

Jump to

Keyboard shortcuts

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