processor

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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIInputProcessorClassify    = binder.FirstCallTransaction + 0
	TransactionIInputProcessorReset       = binder.FirstCallTransaction + 1
	TransactionIInputProcessorResetDevice = binder.FirstCallTransaction + 2
)
View Source
const (
	MethodIInputProcessorClassify    = "classify"
	MethodIInputProcessorReset       = "reset"
	MethodIInputProcessorResetDevice = "resetDevice"
)
View Source
const DescriptorIInputProcessor = "android.hardware.input.processor.IInputProcessor"

Variables

This section is empty.

Functions

This section is empty.

Types

type IInputProcessor

type IInputProcessor interface {
	AsBinder() binder.IBinder
	Classify(ctx context.Context, event common.MotionEvent) (common.Classification, error)
	Reset(ctx context.Context) error
	ResetDevice(ctx context.Context, deviceId int32) error
}

func NewInputProcessorStub

func NewInputProcessorStub(
	impl IInputProcessorServer,
) IInputProcessor

NewInputProcessorStub creates a server-side IInputProcessor wrapping the given server implementation. The returned value satisfies IInputProcessor 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 IInputProcessorServer

type IInputProcessorServer interface {
	Classify(ctx context.Context, event common.MotionEvent) (common.Classification, error)
	Reset(ctx context.Context) error
	ResetDevice(ctx context.Context, deviceId int32) error
}

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

type InputProcessorProxy

type InputProcessorProxy struct {
	Remote binder.IBinder
}

func NewInputProcessorProxy

func NewInputProcessorProxy(
	remote binder.IBinder,
) *InputProcessorProxy

func (*InputProcessorProxy) AsBinder

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

func (*InputProcessorProxy) Classify

func (*InputProcessorProxy) Reset

func (p *InputProcessorProxy) Reset(
	ctx context.Context,
) error

func (*InputProcessorProxy) ResetDevice

func (p *InputProcessorProxy) ResetDevice(
	ctx context.Context,
	deviceId int32,
) error

type InputProcessorStub

type InputProcessorStub struct {
	Impl      IInputProcessor
	Transport binder.VersionAwareTransport
}

InputProcessorStub dispatches incoming binder transactions to a typed IInputProcessor implementation.

func (*InputProcessorStub) Descriptor

func (s *InputProcessorStub) Descriptor() string

func (*InputProcessorStub) OnTransaction

func (s *InputProcessorStub) 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