Documentation
¶
Index ¶
Constants ¶
View Source
const ( TransactionILightsSetLightState = binder.FirstCallTransaction + 0 TransactionILightsGetLights = binder.FirstCallTransaction + 1 )
View Source
const ( MethodILightsSetLightState = "setLightState" MethodILightsGetLights = "getLights" )
View Source
const DescriptorILights = "android.hardware.light.ILights"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrightnessMode ¶
type BrightnessMode int32
const ( BrightnessModeUSER BrightnessMode = 0 BrightnessModeSENSOR BrightnessMode = 1 BrightnessModeLowPersistence BrightnessMode = 2 )
type HwLightState ¶
type HwLightState struct {
Color int32
FlashMode FlashMode
FlashOnMs int32
FlashOffMs int32
BrightnessMode BrightnessMode
}
func (*HwLightState) MarshalParcel ¶
func (s *HwLightState) MarshalParcel( p *parcel.Parcel, ) error
func (*HwLightState) UnmarshalParcel ¶
func (s *HwLightState) UnmarshalParcel( p *parcel.Parcel, ) error
type ILights ¶
type ILights interface {
AsBinder() binder.IBinder
SetLightState(ctx context.Context, id int32, state HwLightState) error
GetLights(ctx context.Context) ([]HwLight, error)
}
func NewLightsStub ¶
func NewLightsStub( impl ILightsServer, ) ILights
NewLightsStub creates a server-side ILights wrapping the given server implementation. The returned value satisfies ILights 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 ILightsServer ¶
type ILightsServer interface {
SetLightState(ctx context.Context, id int32, state HwLightState) error
GetLights(ctx context.Context) ([]HwLight, error)
}
ILightsServer is the server-side interface that user implementations provide to NewLightsStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type LightType ¶
type LightType int32
const ( LightTypeBACKLIGHT LightType = 0 LightTypeKEYBOARD LightType = 1 LightTypeBUTTONS LightType = 2 LightTypeBATTERY LightType = 3 LightTypeNOTIFICATIONS LightType = 4 LightTypeATTENTION LightType = 5 LightTypeBLUETOOTH LightType = 6 LightTypeWIFI LightType = 7 LightTypeMICROPHONE LightType = 8 LightTypeCAMERA LightType = 9 )
type LightsProxy ¶
func NewLightsProxy ¶
func NewLightsProxy( remote binder.IBinder, ) *LightsProxy
func (*LightsProxy) AsBinder ¶
func (p *LightsProxy) AsBinder() binder.IBinder
func (*LightsProxy) GetLights ¶
func (p *LightsProxy) GetLights( ctx context.Context, ) ([]HwLight, error)
func (*LightsProxy) SetLightState ¶
func (p *LightsProxy) SetLightState( ctx context.Context, id int32, state HwLightState, ) error
type LightsStub ¶
type LightsStub struct {
Impl ILights
Transport binder.VersionAwareTransport
}
LightsStub dispatches incoming binder transactions to a typed ILights implementation.
func (*LightsStub) Descriptor ¶
func (s *LightsStub) Descriptor() string
func (*LightsStub) OnTransaction ¶
func (s *LightsStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
Click to show internal directories.
Click to hide internal directories.