Documentation
¶
Index ¶
- Constants
- type CustomVibratorProxy
- func (p *CustomVibratorProxy) AsBinder() binder.IBinder
- func (p *CustomVibratorProxy) GetVendorCapabilities(ctx context.Context) (int32, error)
- func (p *CustomVibratorProxy) Perform(ctx context.Context, effect VendorEffect, ...) (int32, error)
- func (p *CustomVibratorProxy) SetDirectionality(ctx context.Context, directionality Directionality) error
- type CustomVibratorStub
- type Directionality
- type ICustomVibrator
- type ICustomVibratorServer
- type VendorEffect
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 ¶
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 (p *CustomVibratorProxy) Perform( ctx context.Context, effect VendorEffect, callback hardwareVibrator.IVibratorCallback, ) (int32, error)
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 )
Click to show internal directories.
Click to hide internal directories.