vibrator

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 (
	TransactionIVibratorControlServiceRegisterVibratorController       = binder.FirstCallTransaction + 0
	TransactionIVibratorControlServiceUnregisterVibratorController     = binder.FirstCallTransaction + 1
	TransactionIVibratorControlServiceSetVibrationParams               = binder.FirstCallTransaction + 2
	TransactionIVibratorControlServiceClearVibrationParams             = binder.FirstCallTransaction + 3
	TransactionIVibratorControlServiceOnRequestVibrationParamsComplete = binder.FirstCallTransaction + 4
)
View Source
const (
	MethodIVibratorControlServiceRegisterVibratorController       = "registerVibratorController"
	MethodIVibratorControlServiceUnregisterVibratorController     = "unregisterVibratorController"
	MethodIVibratorControlServiceSetVibrationParams               = "setVibrationParams"
	MethodIVibratorControlServiceClearVibrationParams             = "clearVibrationParams"
	MethodIVibratorControlServiceOnRequestVibrationParamsComplete = "onRequestVibrationParamsComplete"
)
View Source
const (
	ScaleParamTypeAlarm        int32 = (1 << 0)
	ScaleParamTypeNotification int32 = (1 << 1)
	ScaleParamTypeRingtone     int32 = (1 << 2)
	ScaleParamTypeInteractive  int32 = (1 << 3)
	ScaleParamTypeMedia        int32 = (1 << 4)
)
View Source
const DescriptorIVibratorControlService = "android.frameworks.vibrator.IVibratorControlService"
View Source
const DescriptorIVibratorController = "android.frameworks.vibrator.IVibratorController"
View Source
const (
	MethodIVibratorControllerRequestVibrationParams = "requestVibrationParams"
)
View Source
const (
	TransactionIVibratorControllerRequestVibrationParams = binder.FirstCallTransaction + 0
)
View Source
const (
	VibrationParamTagScale int32 = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IVibratorControlService

type IVibratorControlService interface {
	AsBinder() binder.IBinder
	RegisterVibratorController(ctx context.Context, controller IVibratorController) error
	UnregisterVibratorController(ctx context.Context, controller IVibratorController) error
	SetVibrationParams(ctx context.Context, params []VibrationParam, token IVibratorController) error
	ClearVibrationParams(ctx context.Context, typesMask int32, token IVibratorController) error
	OnRequestVibrationParamsComplete(ctx context.Context, requestToken binder.IBinder, result []VibrationParam) error
}

func NewVibratorControlServiceStub

func NewVibratorControlServiceStub(
	impl IVibratorControlServiceServer,
) IVibratorControlService

NewVibratorControlServiceStub creates a server-side IVibratorControlService wrapping the given server implementation. The returned value satisfies IVibratorControlService 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 IVibratorControlServiceServer

type IVibratorControlServiceServer interface {
	RegisterVibratorController(ctx context.Context, controller IVibratorController) error
	UnregisterVibratorController(ctx context.Context, controller IVibratorController) error
	SetVibrationParams(ctx context.Context, params []VibrationParam, token IVibratorController) error
	ClearVibrationParams(ctx context.Context, typesMask int32, token IVibratorController) error
	OnRequestVibrationParamsComplete(ctx context.Context, requestToken binder.IBinder, result []VibrationParam) error
}

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

type IVibratorController

type IVibratorController interface {
	AsBinder() binder.IBinder
	RequestVibrationParams(ctx context.Context, typesMask int32, deadlineElapsedRealtimeMillis int64, requestToken binder.IBinder) error
}

func NewVibratorControllerStub

func NewVibratorControllerStub(
	impl IVibratorControllerServer,
) IVibratorController

NewVibratorControllerStub creates a server-side IVibratorController wrapping the given server implementation. The returned value satisfies IVibratorController 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 IVibratorControllerServer

type IVibratorControllerServer interface {
	RequestVibrationParams(ctx context.Context, typesMask int32, deadlineElapsedRealtimeMillis int64, requestToken binder.IBinder) error
}

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

type ScaleParam

type ScaleParam struct {
	TypesMask int32
	Scale     float32
}

func (*ScaleParam) MarshalParcel

func (s *ScaleParam) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ScaleParam) UnmarshalParcel

func (s *ScaleParam) UnmarshalParcel(
	p *parcel.Parcel,
) error

type VibrationParam

type VibrationParam struct {
	Tag   int32
	Scale ScaleParam
}

func (*VibrationParam) GetScale

func (u *VibrationParam) GetScale() (ScaleParam, bool)

func (*VibrationParam) MarshalParcel

func (u *VibrationParam) MarshalParcel(
	p *parcel.Parcel,
) error

func (*VibrationParam) SetScale

func (u *VibrationParam) SetScale(
	v ScaleParam,
)

func (*VibrationParam) UnmarshalParcel

func (u *VibrationParam) UnmarshalParcel(
	p *parcel.Parcel,
) error

type VibratorControlServiceProxy

type VibratorControlServiceProxy struct {
	Remote binder.IBinder
}

func NewVibratorControlServiceProxy

func NewVibratorControlServiceProxy(
	remote binder.IBinder,
) *VibratorControlServiceProxy

func (*VibratorControlServiceProxy) AsBinder

func (*VibratorControlServiceProxy) ClearVibrationParams

func (p *VibratorControlServiceProxy) ClearVibrationParams(
	ctx context.Context,
	typesMask int32,
	token IVibratorController,
) error

func (*VibratorControlServiceProxy) OnRequestVibrationParamsComplete

func (p *VibratorControlServiceProxy) OnRequestVibrationParamsComplete(
	ctx context.Context,
	requestToken binder.IBinder,
	result []VibrationParam,
) error

func (*VibratorControlServiceProxy) RegisterVibratorController

func (p *VibratorControlServiceProxy) RegisterVibratorController(
	ctx context.Context,
	controller IVibratorController,
) error

func (*VibratorControlServiceProxy) SetVibrationParams

func (p *VibratorControlServiceProxy) SetVibrationParams(
	ctx context.Context,
	params []VibrationParam,
	token IVibratorController,
) error

func (*VibratorControlServiceProxy) UnregisterVibratorController

func (p *VibratorControlServiceProxy) UnregisterVibratorController(
	ctx context.Context,
	controller IVibratorController,
) error

type VibratorControlServiceStub

type VibratorControlServiceStub struct {
	Impl      IVibratorControlService
	Transport binder.VersionAwareTransport
}

VibratorControlServiceStub dispatches incoming binder transactions to a typed IVibratorControlService implementation.

func (*VibratorControlServiceStub) Descriptor

func (s *VibratorControlServiceStub) Descriptor() string

func (*VibratorControlServiceStub) OnTransaction

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

type VibratorControllerProxy

type VibratorControllerProxy struct {
	Remote binder.IBinder
}

func NewVibratorControllerProxy

func NewVibratorControllerProxy(
	remote binder.IBinder,
) *VibratorControllerProxy

func (*VibratorControllerProxy) AsBinder

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

func (*VibratorControllerProxy) RequestVibrationParams

func (p *VibratorControllerProxy) RequestVibrationParams(
	ctx context.Context,
	typesMask int32,
	deadlineElapsedRealtimeMillis int64,
	requestToken binder.IBinder,
) error

type VibratorControllerStub

type VibratorControllerStub struct {
	Impl      IVibratorController
	Transport binder.VersionAwareTransport
}

VibratorControllerStub dispatches incoming binder transactions to a typed IVibratorController implementation.

func (*VibratorControllerStub) Descriptor

func (s *VibratorControllerStub) Descriptor() string

func (*VibratorControllerStub) OnTransaction

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