Documentation
¶
Index ¶
- Constants
- type DirectReportChannelProxy
- type DirectReportChannelStub
- type EventQueueCallbackProxy
- type EventQueueCallbackStub
- type EventQueueProxy
- type EventQueueStub
- type IDirectReportChannel
- type IDirectReportChannelServer
- type IEventQueue
- type IEventQueueCallback
- type IEventQueueCallbackServer
- type IEventQueueServer
- type ISensorManager
- type ISensorManagerServer
- type SensorManagerProxy
- func (p *SensorManagerProxy) AsBinder() binder.IBinder
- func (p *SensorManagerProxy) CreateAshmemDirectChannel(ctx context.Context, mem common.Ashmem, size int64) (IDirectReportChannel, error)
- func (p *SensorManagerProxy) CreateEventQueue(ctx context.Context, callback IEventQueueCallback) (IEventQueue, error)
- func (p *SensorManagerProxy) CreateGrallocDirectChannel(ctx context.Context, buffer int32, size int64) (IDirectReportChannel, error)
- func (p *SensorManagerProxy) GetDefaultSensor(ctx context.Context, type_ sensors.SensorType) (sensors.SensorInfo, error)
- func (p *SensorManagerProxy) GetSensorList(ctx context.Context) ([]sensors.SensorInfo, error)
- type SensorManagerStub
Constants ¶
const ( TransactionIEventQueueDisableSensor = binder.FirstCallTransaction + 0 TransactionIEventQueueEnableSensor = binder.FirstCallTransaction + 1 )
const ( MethodIEventQueueDisableSensor = "disableSensor" MethodIEventQueueEnableSensor = "enableSensor" )
const ( TransactionISensorManagerCreateAshmemDirectChannel = binder.FirstCallTransaction + 0 TransactionISensorManagerCreateEventQueue = binder.FirstCallTransaction + 1 TransactionISensorManagerCreateGrallocDirectChannel = binder.FirstCallTransaction + 2 TransactionISensorManagerGetDefaultSensor = binder.FirstCallTransaction + 3 TransactionISensorManagerGetSensorList = binder.FirstCallTransaction + 4 )
const ( MethodISensorManagerCreateAshmemDirectChannel = "createAshmemDirectChannel" MethodISensorManagerCreateEventQueue = "createEventQueue" MethodISensorManagerCreateGrallocDirectChannel = "createGrallocDirectChannel" MethodISensorManagerGetDefaultSensor = "getDefaultSensor" MethodISensorManagerGetSensorList = "getSensorList" )
const ( ISensorManagerResultNotExist int32 = 1 ISensorManagerResultNoMemory int32 = 2 ISensorManagerResultNoInit int32 = 3 ISensorManagerResultPermissionDenied int32 = 4 ISensorManagerResultBadValue int32 = 5 ISensorManagerResultInvalidOperation int32 = 6 ISensorManagerResultUnknownError int32 = 7 )
const DescriptorIDirectReportChannel = "android.frameworks.sensorservice.IDirectReportChannel"
const DescriptorIEventQueue = "android.frameworks.sensorservice.IEventQueue"
const DescriptorIEventQueueCallback = "android.frameworks.sensorservice.IEventQueueCallback"
const DescriptorISensorManager = "android.frameworks.sensorservice.ISensorManager"
const (
MethodIDirectReportChannelConfigure = "configure"
)
const (
MethodIEventQueueCallbackOnEvent = "onEvent"
)
const (
TransactionIDirectReportChannelConfigure = binder.FirstCallTransaction + 0
)
const (
TransactionIEventQueueCallbackOnEvent = binder.FirstCallTransaction + 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirectReportChannelProxy ¶
func NewDirectReportChannelProxy ¶
func NewDirectReportChannelProxy( remote binder.IBinder, ) *DirectReportChannelProxy
func (*DirectReportChannelProxy) AsBinder ¶
func (p *DirectReportChannelProxy) AsBinder() binder.IBinder
func (*DirectReportChannelProxy) Configure ¶
func (p *DirectReportChannelProxy) Configure( ctx context.Context, sensorHandle int32, rate sensors.ISensorsRateLevel, ) (int32, error)
type DirectReportChannelStub ¶
type DirectReportChannelStub struct {
Impl IDirectReportChannel
Transport binder.VersionAwareTransport
}
DirectReportChannelStub dispatches incoming binder transactions to a typed IDirectReportChannel implementation.
func (*DirectReportChannelStub) Descriptor ¶
func (s *DirectReportChannelStub) Descriptor() string
func (*DirectReportChannelStub) OnTransaction ¶
func (s *DirectReportChannelStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type EventQueueCallbackProxy ¶
func NewEventQueueCallbackProxy ¶
func NewEventQueueCallbackProxy( remote binder.IBinder, ) *EventQueueCallbackProxy
func (*EventQueueCallbackProxy) AsBinder ¶
func (p *EventQueueCallbackProxy) AsBinder() binder.IBinder
type EventQueueCallbackStub ¶
type EventQueueCallbackStub struct {
Impl IEventQueueCallback
Transport binder.VersionAwareTransport
}
EventQueueCallbackStub dispatches incoming binder transactions to a typed IEventQueueCallback implementation.
func (*EventQueueCallbackStub) Descriptor ¶
func (s *EventQueueCallbackStub) Descriptor() string
func (*EventQueueCallbackStub) OnTransaction ¶
func (s *EventQueueCallbackStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type EventQueueProxy ¶
func NewEventQueueProxy ¶
func NewEventQueueProxy( remote binder.IBinder, ) *EventQueueProxy
func (*EventQueueProxy) AsBinder ¶
func (p *EventQueueProxy) AsBinder() binder.IBinder
func (*EventQueueProxy) DisableSensor ¶
func (p *EventQueueProxy) DisableSensor( ctx context.Context, sensorHandle int32, ) error
func (*EventQueueProxy) EnableSensor ¶
type EventQueueStub ¶
type EventQueueStub struct {
Impl IEventQueue
Transport binder.VersionAwareTransport
}
EventQueueStub dispatches incoming binder transactions to a typed IEventQueue implementation.
func (*EventQueueStub) Descriptor ¶
func (s *EventQueueStub) Descriptor() string
func (*EventQueueStub) OnTransaction ¶
func (s *EventQueueStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type IDirectReportChannel ¶
type IDirectReportChannel interface {
AsBinder() binder.IBinder
Configure(ctx context.Context, sensorHandle int32, rate sensors.ISensorsRateLevel) (int32, error)
}
func NewDirectReportChannelStub ¶
func NewDirectReportChannelStub( impl IDirectReportChannelServer, ) IDirectReportChannel
NewDirectReportChannelStub creates a server-side IDirectReportChannel wrapping the given server implementation. The returned value satisfies IDirectReportChannel 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 IDirectReportChannelServer ¶
type IDirectReportChannelServer interface {
Configure(ctx context.Context, sensorHandle int32, rate sensors.ISensorsRateLevel) (int32, error)
}
IDirectReportChannelServer is the server-side interface that user implementations provide to NewDirectReportChannelStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IEventQueue ¶
type IEventQueue interface {
AsBinder() binder.IBinder
DisableSensor(ctx context.Context, sensorHandle int32) error
EnableSensor(ctx context.Context, sensorHandle int32, samplingPeriodUs int32, maxBatchReportLatencyUs int64) error
}
func NewEventQueueStub ¶
func NewEventQueueStub( impl IEventQueueServer, ) IEventQueue
NewEventQueueStub creates a server-side IEventQueue wrapping the given server implementation. The returned value satisfies IEventQueue 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 IEventQueueCallback ¶
type IEventQueueCallback interface {
AsBinder() binder.IBinder
OnEvent(ctx context.Context, event sensors.Event) error
}
func NewEventQueueCallbackStub ¶
func NewEventQueueCallbackStub( impl IEventQueueCallbackServer, ) IEventQueueCallback
NewEventQueueCallbackStub creates a server-side IEventQueueCallback wrapping the given server implementation. The returned value satisfies IEventQueueCallback 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 IEventQueueCallbackServer ¶
type IEventQueueCallbackServer interface {
OnEvent(ctx context.Context, event sensors.Event) error
}
IEventQueueCallbackServer is the server-side interface that user implementations provide to NewEventQueueCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IEventQueueServer ¶
type IEventQueueServer interface {
DisableSensor(ctx context.Context, sensorHandle int32) error
EnableSensor(ctx context.Context, sensorHandle int32, samplingPeriodUs int32, maxBatchReportLatencyUs int64) error
}
IEventQueueServer is the server-side interface that user implementations provide to NewEventQueueStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type ISensorManager ¶
type ISensorManager interface {
AsBinder() binder.IBinder
CreateAshmemDirectChannel(ctx context.Context, mem common.Ashmem, size int64) (IDirectReportChannel, error)
CreateEventQueue(ctx context.Context, callback IEventQueueCallback) (IEventQueue, error)
CreateGrallocDirectChannel(ctx context.Context, buffer int32, size int64) (IDirectReportChannel, error)
GetDefaultSensor(ctx context.Context, type_ sensors.SensorType) (sensors.SensorInfo, error)
GetSensorList(ctx context.Context) ([]sensors.SensorInfo, error)
}
func NewSensorManagerStub ¶
func NewSensorManagerStub( impl ISensorManagerServer, ) ISensorManager
NewSensorManagerStub creates a server-side ISensorManager wrapping the given server implementation. The returned value satisfies ISensorManager 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 ISensorManagerServer ¶
type ISensorManagerServer interface {
CreateAshmemDirectChannel(ctx context.Context, mem common.Ashmem, size int64) (IDirectReportChannel, error)
CreateEventQueue(ctx context.Context, callback IEventQueueCallback) (IEventQueue, error)
CreateGrallocDirectChannel(ctx context.Context, buffer int32, size int64) (IDirectReportChannel, error)
GetDefaultSensor(ctx context.Context, type_ sensors.SensorType) (sensors.SensorInfo, error)
GetSensorList(ctx context.Context) ([]sensors.SensorInfo, error)
}
ISensorManagerServer is the server-side interface that user implementations provide to NewSensorManagerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type SensorManagerProxy ¶
func NewSensorManagerProxy ¶
func NewSensorManagerProxy( remote binder.IBinder, ) *SensorManagerProxy
func (*SensorManagerProxy) AsBinder ¶
func (p *SensorManagerProxy) AsBinder() binder.IBinder
func (*SensorManagerProxy) CreateAshmemDirectChannel ¶
func (p *SensorManagerProxy) CreateAshmemDirectChannel( ctx context.Context, mem common.Ashmem, size int64, ) (IDirectReportChannel, error)
func (*SensorManagerProxy) CreateEventQueue ¶
func (p *SensorManagerProxy) CreateEventQueue( ctx context.Context, callback IEventQueueCallback, ) (IEventQueue, error)
func (*SensorManagerProxy) CreateGrallocDirectChannel ¶
func (p *SensorManagerProxy) CreateGrallocDirectChannel( ctx context.Context, buffer int32, size int64, ) (IDirectReportChannel, error)
func (*SensorManagerProxy) GetDefaultSensor ¶
func (p *SensorManagerProxy) GetDefaultSensor( ctx context.Context, type_ sensors.SensorType, ) (sensors.SensorInfo, error)
func (*SensorManagerProxy) GetSensorList ¶
func (p *SensorManagerProxy) GetSensorList( ctx context.Context, ) ([]sensors.SensorInfo, error)
type SensorManagerStub ¶
type SensorManagerStub struct {
Impl ISensorManager
Transport binder.VersionAwareTransport
}
SensorManagerStub dispatches incoming binder transactions to a typed ISensorManager implementation.
func (*SensorManagerStub) Descriptor ¶
func (s *SensorManagerStub) Descriptor() string
func (*SensorManagerStub) OnTransaction ¶
func (s *SensorManagerStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)