Documentation
¶
Index ¶
- Constants
- type ILightsManager
- type ILightsManagerServer
- type Light
- type LightState
- type LightsManagerProxy
- func (p *LightsManagerProxy) AsBinder() binder.IBinder
- func (p *LightsManagerProxy) CloseSession(ctx context.Context, sessionToken binder.IBinder) error
- func (p *LightsManagerProxy) GetLightState(ctx context.Context, lightId int32) (LightState, error)
- func (p *LightsManagerProxy) GetLights(ctx context.Context) ([]Light, error)
- func (p *LightsManagerProxy) OpenSession(ctx context.Context, sessionToken binder.IBinder, priority int32) error
- func (p *LightsManagerProxy) SetLightStates(ctx context.Context, sessionToken binder.IBinder, lightIds []int32, ...) error
- type LightsManagerStub
Constants ¶
View Source
const ( TransactionILightsManagerGetLights = binder.FirstCallTransaction + 0 TransactionILightsManagerGetLightState = binder.FirstCallTransaction + 1 TransactionILightsManagerOpenSession = binder.FirstCallTransaction + 2 TransactionILightsManagerCloseSession = binder.FirstCallTransaction + 3 TransactionILightsManagerSetLightStates = binder.FirstCallTransaction + 4 )
View Source
const ( MethodILightsManagerGetLights = "getLights" MethodILightsManagerGetLightState = "getLightState" MethodILightsManagerOpenSession = "openSession" MethodILightsManagerCloseSession = "closeSession" MethodILightsManagerSetLightStates = "setLightStates" )
View Source
const DescriptorILightsManager = "android.hardware.lights.ILightsManager"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ILightsManager ¶
type ILightsManager interface {
AsBinder() binder.IBinder
GetLights(ctx context.Context) ([]Light, error)
GetLightState(ctx context.Context, lightId int32) (LightState, error)
OpenSession(ctx context.Context, sessionToken binder.IBinder, priority int32) error
CloseSession(ctx context.Context, sessionToken binder.IBinder) error
SetLightStates(ctx context.Context, sessionToken binder.IBinder, lightIds []int32, states []LightState) error
}
func NewLightsManagerStub ¶
func NewLightsManagerStub( impl ILightsManagerServer, ) ILightsManager
NewLightsManagerStub creates a server-side ILightsManager wrapping the given server implementation. The returned value satisfies ILightsManager 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 ILightsManagerServer ¶
type ILightsManagerServer interface {
GetLights(ctx context.Context) ([]Light, error)
GetLightState(ctx context.Context, lightId int32) (LightState, error)
OpenSession(ctx context.Context, sessionToken binder.IBinder, priority int32) error
CloseSession(ctx context.Context, sessionToken binder.IBinder) error
SetLightStates(ctx context.Context, sessionToken binder.IBinder, lightIds []int32, states []LightState) error
}
ILightsManagerServer is the server-side interface that user implementations provide to NewLightsManagerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type LightState ¶
func (*LightState) MarshalParcel ¶
func (s *LightState) MarshalParcel( p *parcel.Parcel, ) error
func (*LightState) UnmarshalParcel ¶
func (s *LightState) UnmarshalParcel( p *parcel.Parcel, ) error
type LightsManagerProxy ¶
func NewLightsManagerProxy ¶
func NewLightsManagerProxy( remote binder.IBinder, ) *LightsManagerProxy
func (*LightsManagerProxy) AsBinder ¶
func (p *LightsManagerProxy) AsBinder() binder.IBinder
func (*LightsManagerProxy) CloseSession ¶
func (*LightsManagerProxy) GetLightState ¶
func (p *LightsManagerProxy) GetLightState( ctx context.Context, lightId int32, ) (LightState, error)
func (*LightsManagerProxy) GetLights ¶
func (p *LightsManagerProxy) GetLights( ctx context.Context, ) ([]Light, error)
func (*LightsManagerProxy) OpenSession ¶
func (*LightsManagerProxy) SetLightStates ¶
func (p *LightsManagerProxy) SetLightStates( ctx context.Context, sessionToken binder.IBinder, lightIds []int32, states []LightState, ) error
type LightsManagerStub ¶
type LightsManagerStub struct {
Impl ILightsManager
Transport binder.VersionAwareTransport
}
LightsManagerStub dispatches incoming binder transactions to a typed ILightsManager implementation.
func (*LightsManagerStub) Descriptor ¶
func (s *LightsManagerStub) Descriptor() string
func (*LightsManagerStub) OnTransaction ¶
func (s *LightsManagerStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
Click to show internal directories.
Click to hide internal directories.