Help us shape the future of Go! Take the 2026 Go Developer Survey

vibrator

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2026 License: CC0-1.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionICustomVibratorGetVendorCapabilities = binder.FirstCallTransaction + 0
	TransactionICustomVibratorSetDirectionality     = binder.FirstCallTransaction + 1
	TransactionICustomVibratorPerform               = binder.FirstCallTransaction + 2
)
View Source
const (
	MethodICustomVibratorGetVendorCapabilities = "getVendorCapabilities"
	MethodICustomVibratorSetDirectionality     = "setDirectionality"
	MethodICustomVibratorPerform               = "perform"
)
View Source
const DescriptorICustomVibrator = "android.hardware.tests.extension.vibrator.ICustomVibrator"
View Source
const (
	ICustomVibratorCapVendorDirectionality int32 = (1 << 0)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomVibratorProxy

type CustomVibratorProxy struct {
	Remote binder.IBinder
}

func NewCustomVibratorProxy

func NewCustomVibratorProxy(
	remote binder.IBinder,
) *CustomVibratorProxy

func (*CustomVibratorProxy) AsBinder

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

func (*CustomVibratorProxy) GetVendorCapabilities

func (p *CustomVibratorProxy) GetVendorCapabilities(
	ctx context.Context,
) (int32, error)

func (*CustomVibratorProxy) Perform

func (*CustomVibratorProxy) SetDirectionality

func (p *CustomVibratorProxy) SetDirectionality(
	ctx context.Context,
	directionality Directionality,
) error

type CustomVibratorStub

type CustomVibratorStub struct {
	Impl      ICustomVibrator
	Transport binder.VersionAwareTransport
}

CustomVibratorStub dispatches incoming binder transactions to a typed ICustomVibrator implementation.

func (*CustomVibratorStub) Descriptor

func (s *CustomVibratorStub) Descriptor() string

func (*CustomVibratorStub) OnTransaction

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

type Directionality

type Directionality int32
const (
	DirectionalityNONE         Directionality = 0
	DirectionalityTRANSVERSE   Directionality = 1
	DirectionalityLONGITUDINAL Directionality = 2
)

type ICustomVibrator

type ICustomVibrator interface {
	AsBinder() binder.IBinder
	GetVendorCapabilities(ctx context.Context) (int32, error)
	SetDirectionality(ctx context.Context, directionality Directionality) error
	Perform(ctx context.Context, effect VendorEffect, callback hardwareVibrator.IVibratorCallback) (int32, error)
}

func NewCustomVibratorStub

func NewCustomVibratorStub(
	impl ICustomVibratorServer,
) ICustomVibrator

NewCustomVibratorStub creates a server-side ICustomVibrator wrapping the given server implementation. The returned value satisfies ICustomVibrator 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 ICustomVibratorServer

type ICustomVibratorServer interface {
	GetVendorCapabilities(ctx context.Context) (int32, error)
	SetDirectionality(ctx context.Context, directionality Directionality) error
	Perform(ctx context.Context, effect VendorEffect, callback hardwareVibrator.IVibratorCallback) (int32, error)
}

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

type VendorEffect

type VendorEffect int32
const (
	VendorEffectCRACKLE VendorEffect = 0
	VendorEffectWIGGLE  VendorEffect = 1
)

Jump to

Keyboard shortcuts

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