Documentation
¶
Index ¶
- Constants
- type ISoundDose
- type ISoundDoseIHalSoundDoseCallback
- type ISoundDoseIHalSoundDoseCallbackMelRecord
- type ISoundDoseIHalSoundDoseCallbackServer
- type ISoundDoseServer
- type SoundDoseIHalSoundDoseCallbackProxy
- func (p *SoundDoseIHalSoundDoseCallbackProxy) AsBinder() binder.IBinder
- func (p *SoundDoseIHalSoundDoseCallbackProxy) OnMomentaryExposureWarning(ctx context.Context, currentDbA float32, audioDevice common.AudioDevice) error
- func (p *SoundDoseIHalSoundDoseCallbackProxy) OnNewMelValues(ctx context.Context, melRecord ISoundDoseIHalSoundDoseCallbackMelRecord, ...) error
- type SoundDoseIHalSoundDoseCallbackStub
- type SoundDoseProxy
- func (p *SoundDoseProxy) AsBinder() binder.IBinder
- func (p *SoundDoseProxy) GetOutputRs2UpperBound(ctx context.Context) (float32, error)
- func (p *SoundDoseProxy) RegisterSoundDoseCallback(ctx context.Context, callback ISoundDoseIHalSoundDoseCallback) error
- func (p *SoundDoseProxy) SetOutputRs2UpperBound(ctx context.Context, rs2ValueDbA float32) error
- type SoundDoseStub
Constants ¶
const ( TransactionISoundDoseSetOutputRs2UpperBound = binder.FirstCallTransaction + 0 TransactionISoundDoseGetOutputRs2UpperBound = binder.FirstCallTransaction + 1 TransactionISoundDoseRegisterSoundDoseCallback = binder.FirstCallTransaction + 2 )
const ( MethodISoundDoseSetOutputRs2UpperBound = "setOutputRs2UpperBound" MethodISoundDoseGetOutputRs2UpperBound = "getOutputRs2UpperBound" MethodISoundDoseRegisterSoundDoseCallback = "registerSoundDoseCallback" )
const ( ISoundDoseDefaultMaxRs2 int32 = 100 ISoundDoseMinRs2 int32 = 80 )
const ( TransactionISoundDoseIHalSoundDoseCallbackOnMomentaryExposureWarning = binder.FirstCallTransaction + 0 TransactionISoundDoseIHalSoundDoseCallbackOnNewMelValues = binder.FirstCallTransaction + 1 )
const ( MethodISoundDoseIHalSoundDoseCallbackOnMomentaryExposureWarning = "onMomentaryExposureWarning" MethodISoundDoseIHalSoundDoseCallbackOnNewMelValues = "onNewMelValues" )
const DescriptorISoundDose = "android.hardware.audio.core.sounddose.ISoundDose"
const DescriptorISoundDoseIHalSoundDoseCallback = "android.hardware.audio.core.sounddose.ISoundDose.IHalSoundDoseCallback"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ISoundDose ¶
type ISoundDose interface {
AsBinder() binder.IBinder
SetOutputRs2UpperBound(ctx context.Context, rs2ValueDbA float32) error
GetOutputRs2UpperBound(ctx context.Context) (float32, error)
RegisterSoundDoseCallback(ctx context.Context, callback ISoundDoseIHalSoundDoseCallback) error
}
func NewSoundDoseStub ¶
func NewSoundDoseStub( impl ISoundDoseServer, ) ISoundDose
NewSoundDoseStub creates a server-side ISoundDose wrapping the given server implementation. The returned value satisfies ISoundDose 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 ISoundDoseIHalSoundDoseCallback ¶
type ISoundDoseIHalSoundDoseCallback interface {
AsBinder() binder.IBinder
OnMomentaryExposureWarning(ctx context.Context, currentDbA float32, audioDevice common.AudioDevice) error
OnNewMelValues(ctx context.Context, melRecord ISoundDoseIHalSoundDoseCallbackMelRecord, audioDevice common.AudioDevice) error
}
func NewSoundDoseIHalSoundDoseCallbackStub ¶
func NewSoundDoseIHalSoundDoseCallbackStub( impl ISoundDoseIHalSoundDoseCallbackServer, ) ISoundDoseIHalSoundDoseCallback
NewSoundDoseIHalSoundDoseCallbackStub creates a server-side ISoundDoseIHalSoundDoseCallback wrapping the given server implementation. The returned value satisfies ISoundDoseIHalSoundDoseCallback 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 ISoundDoseIHalSoundDoseCallbackMelRecord ¶
func (*ISoundDoseIHalSoundDoseCallbackMelRecord) MarshalParcel ¶
func (s *ISoundDoseIHalSoundDoseCallbackMelRecord) MarshalParcel( p *parcel.Parcel, ) error
func (*ISoundDoseIHalSoundDoseCallbackMelRecord) UnmarshalParcel ¶
func (s *ISoundDoseIHalSoundDoseCallbackMelRecord) UnmarshalParcel( p *parcel.Parcel, ) error
type ISoundDoseIHalSoundDoseCallbackServer ¶
type ISoundDoseIHalSoundDoseCallbackServer interface {
OnMomentaryExposureWarning(ctx context.Context, currentDbA float32, audioDevice common.AudioDevice) error
OnNewMelValues(ctx context.Context, melRecord ISoundDoseIHalSoundDoseCallbackMelRecord, audioDevice common.AudioDevice) error
}
ISoundDoseIHalSoundDoseCallbackServer is the server-side interface that user implementations provide to NewSoundDoseIHalSoundDoseCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type ISoundDoseServer ¶
type ISoundDoseServer interface {
SetOutputRs2UpperBound(ctx context.Context, rs2ValueDbA float32) error
GetOutputRs2UpperBound(ctx context.Context) (float32, error)
RegisterSoundDoseCallback(ctx context.Context, callback ISoundDoseIHalSoundDoseCallback) error
}
ISoundDoseServer is the server-side interface that user implementations provide to NewSoundDoseStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type SoundDoseIHalSoundDoseCallbackProxy ¶
func NewSoundDoseIHalSoundDoseCallbackProxy ¶
func NewSoundDoseIHalSoundDoseCallbackProxy( remote binder.IBinder, ) *SoundDoseIHalSoundDoseCallbackProxy
func (*SoundDoseIHalSoundDoseCallbackProxy) AsBinder ¶
func (p *SoundDoseIHalSoundDoseCallbackProxy) AsBinder() binder.IBinder
func (*SoundDoseIHalSoundDoseCallbackProxy) OnMomentaryExposureWarning ¶
func (p *SoundDoseIHalSoundDoseCallbackProxy) OnMomentaryExposureWarning( ctx context.Context, currentDbA float32, audioDevice common.AudioDevice, ) error
func (*SoundDoseIHalSoundDoseCallbackProxy) OnNewMelValues ¶
func (p *SoundDoseIHalSoundDoseCallbackProxy) OnNewMelValues( ctx context.Context, melRecord ISoundDoseIHalSoundDoseCallbackMelRecord, audioDevice common.AudioDevice, ) error
type SoundDoseIHalSoundDoseCallbackStub ¶
type SoundDoseIHalSoundDoseCallbackStub struct {
Impl ISoundDoseIHalSoundDoseCallback
Transport binder.VersionAwareTransport
}
SoundDoseIHalSoundDoseCallbackStub dispatches incoming binder transactions to a typed ISoundDoseIHalSoundDoseCallback implementation.
func (*SoundDoseIHalSoundDoseCallbackStub) Descriptor ¶
func (s *SoundDoseIHalSoundDoseCallbackStub) Descriptor() string
func (*SoundDoseIHalSoundDoseCallbackStub) OnTransaction ¶
func (s *SoundDoseIHalSoundDoseCallbackStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type SoundDoseProxy ¶
func NewSoundDoseProxy ¶
func NewSoundDoseProxy( remote binder.IBinder, ) *SoundDoseProxy
func (*SoundDoseProxy) AsBinder ¶
func (p *SoundDoseProxy) AsBinder() binder.IBinder
func (*SoundDoseProxy) GetOutputRs2UpperBound ¶
func (p *SoundDoseProxy) GetOutputRs2UpperBound( ctx context.Context, ) (float32, error)
func (*SoundDoseProxy) RegisterSoundDoseCallback ¶
func (p *SoundDoseProxy) RegisterSoundDoseCallback( ctx context.Context, callback ISoundDoseIHalSoundDoseCallback, ) error
func (*SoundDoseProxy) SetOutputRs2UpperBound ¶
func (p *SoundDoseProxy) SetOutputRs2UpperBound( ctx context.Context, rs2ValueDbA float32, ) error
type SoundDoseStub ¶
type SoundDoseStub struct {
Impl ISoundDose
Transport binder.VersionAwareTransport
}
SoundDoseStub dispatches incoming binder transactions to a typed ISoundDose implementation.
func (*SoundDoseStub) Descriptor ¶
func (s *SoundDoseStub) Descriptor() string
func (*SoundDoseStub) OnTransaction ¶
func (s *SoundDoseStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)