Documentation
¶
Index ¶
- Constants
- type INfc
- type INfcClientCallback
- type INfcClientCallbackServer
- type INfcServer
- type NfcClientCallbackProxy
- type NfcClientCallbackStub
- type NfcCloseType
- type NfcConfig
- type NfcEvent
- type NfcProxy
- func (p *NfcProxy) AsBinder() binder.IBinder
- func (p *NfcProxy) Close(ctx context.Context, type_ NfcCloseType) error
- func (p *NfcProxy) CoreInitialized(ctx context.Context) error
- func (p *NfcProxy) FactoryReset(ctx context.Context) error
- func (p *NfcProxy) GetConfig(ctx context.Context) (NfcConfig, error)
- func (p *NfcProxy) IsVerboseLoggingEnabled(ctx context.Context) (bool, error)
- func (p *NfcProxy) Open(ctx context.Context, clientCallback INfcClientCallback) error
- func (p *NfcProxy) PowerCycle(ctx context.Context) error
- func (p *NfcProxy) PreDiscover(ctx context.Context) error
- func (p *NfcProxy) SetEnableVerboseLogging(ctx context.Context, enable bool) error
- func (p *NfcProxy) Write(ctx context.Context, data []byte) (int32, error)
- type NfcStatus
- type NfcStub
- type PresenceCheckAlgorithm
- type ProtocolDiscoveryConfig
Constants ¶
const ( TransactionINfcOpen = binder.FirstCallTransaction + 0 TransactionINfcClose = binder.FirstCallTransaction + 1 TransactionINfcCoreInitialized = binder.FirstCallTransaction + 2 TransactionINfcFactoryReset = binder.FirstCallTransaction + 3 TransactionINfcGetConfig = binder.FirstCallTransaction + 4 TransactionINfcPowerCycle = binder.FirstCallTransaction + 5 TransactionINfcPreDiscover = binder.FirstCallTransaction + 6 TransactionINfcWrite = binder.FirstCallTransaction + 7 TransactionINfcSetEnableVerboseLogging = binder.FirstCallTransaction + 8 TransactionINfcIsVerboseLoggingEnabled = binder.FirstCallTransaction + 9 )
const ( MethodINfcOpen = "open" MethodINfcClose = "close" MethodINfcCoreInitialized = "coreInitialized" MethodINfcFactoryReset = "factoryReset" MethodINfcGetConfig = "getConfig" MethodINfcPowerCycle = "powerCycle" MethodINfcPreDiscover = "preDiscover" MethodINfcWrite = "write" MethodINfcSetEnableVerboseLogging = "setEnableVerboseLogging" MethodINfcIsVerboseLoggingEnabled = "isVerboseLoggingEnabled" )
const ( TransactionINfcClientCallbackSendData = binder.FirstCallTransaction + 0 TransactionINfcClientCallbackSendEvent = binder.FirstCallTransaction + 1 )
const ( MethodINfcClientCallbackSendData = "sendData" MethodINfcClientCallbackSendEvent = "sendEvent" )
const DescriptorINfc = "android.hardware.nfc.INfc"
const DescriptorINfcClientCallback = "android.hardware.nfc.INfcClientCallback"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type INfc ¶
type INfc interface {
AsBinder() binder.IBinder
Open(ctx context.Context, clientCallback INfcClientCallback) error
Close(ctx context.Context, type_ NfcCloseType) error
CoreInitialized(ctx context.Context) error
FactoryReset(ctx context.Context) error
GetConfig(ctx context.Context) (NfcConfig, error)
PowerCycle(ctx context.Context) error
PreDiscover(ctx context.Context) error
Write(ctx context.Context, data []byte) (int32, error)
SetEnableVerboseLogging(ctx context.Context, enable bool) error
IsVerboseLoggingEnabled(ctx context.Context) (bool, error)
}
func NewNfcStub ¶
func NewNfcStub( impl INfcServer, ) INfc
NewNfcStub creates a server-side INfc wrapping the given server implementation. The returned value satisfies INfc 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 INfcClientCallback ¶
type INfcClientCallback interface {
AsBinder() binder.IBinder
SendData(ctx context.Context, data []byte) error
SendEvent(ctx context.Context, event NfcEvent, status NfcStatus) error
}
func NewNfcClientCallbackStub ¶
func NewNfcClientCallbackStub( impl INfcClientCallbackServer, ) INfcClientCallback
NewNfcClientCallbackStub creates a server-side INfcClientCallback wrapping the given server implementation. The returned value satisfies INfcClientCallback 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 INfcClientCallbackServer ¶
type INfcClientCallbackServer interface {
SendData(ctx context.Context, data []byte) error
SendEvent(ctx context.Context, event NfcEvent, status NfcStatus) error
}
INfcClientCallbackServer is the server-side interface that user implementations provide to NewNfcClientCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type INfcServer ¶
type INfcServer interface {
Open(ctx context.Context, clientCallback INfcClientCallback) error
Close(ctx context.Context, type_ NfcCloseType) error
CoreInitialized(ctx context.Context) error
FactoryReset(ctx context.Context) error
GetConfig(ctx context.Context) (NfcConfig, error)
PowerCycle(ctx context.Context) error
PreDiscover(ctx context.Context) error
Write(ctx context.Context, data []byte) (int32, error)
SetEnableVerboseLogging(ctx context.Context, enable bool) error
IsVerboseLoggingEnabled(ctx context.Context) (bool, error)
}
INfcServer is the server-side interface that user implementations provide to NewNfcStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type NfcClientCallbackProxy ¶
func NewNfcClientCallbackProxy ¶
func NewNfcClientCallbackProxy( remote binder.IBinder, ) *NfcClientCallbackProxy
func (*NfcClientCallbackProxy) AsBinder ¶
func (p *NfcClientCallbackProxy) AsBinder() binder.IBinder
type NfcClientCallbackStub ¶
type NfcClientCallbackStub struct {
Impl INfcClientCallback
Transport binder.VersionAwareTransport
}
NfcClientCallbackStub dispatches incoming binder transactions to a typed INfcClientCallback implementation.
func (*NfcClientCallbackStub) Descriptor ¶
func (s *NfcClientCallbackStub) Descriptor() string
func (*NfcClientCallbackStub) OnTransaction ¶
func (s *NfcClientCallbackStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type NfcCloseType ¶
type NfcCloseType int32
const ( NfcCloseTypeDISABLE NfcCloseType = 0 NfcCloseTypeHostSwitchedOff NfcCloseType = 1 )
type NfcConfig ¶
type NfcConfig struct {
NfaPollBailOutMode bool
PresenceCheckAlgorithm PresenceCheckAlgorithm
NfaProprietaryCfg ProtocolDiscoveryConfig
DefaultOffHostRoute byte
DefaultOffHostRouteFelica byte
DefaultSystemCodeRoute byte
DefaultSystemCodePowerState byte
DefaultRoute byte
OffHostESEPipeId byte
OffHostSIMPipeId byte
MaxIsoDepTransceiveLength int32
HostAllowlist []byte
OffHostRouteUicc []byte
OffHostRouteEse []byte
DefaultIsoDepRoute byte
}
type NfcProxy ¶
func NewNfcProxy ¶
func (*NfcProxy) IsVerboseLoggingEnabled ¶
func (*NfcProxy) Open ¶
func (p *NfcProxy) Open( ctx context.Context, clientCallback INfcClientCallback, ) error
func (*NfcProxy) SetEnableVerboseLogging ¶
type NfcStub ¶
type NfcStub struct {
Impl INfc
Transport binder.VersionAwareTransport
}
NfcStub dispatches incoming binder transactions to a typed INfc implementation.
func (*NfcStub) Descriptor ¶
type PresenceCheckAlgorithm ¶
type PresenceCheckAlgorithm byte
const ( PresenceCheckAlgorithmDEFAULT PresenceCheckAlgorithm = 0 PresenceCheckAlgorithmIBlock PresenceCheckAlgorithm = 1 PresenceCheckAlgorithmIsoDepNak PresenceCheckAlgorithm = 2 )
type ProtocolDiscoveryConfig ¶
type ProtocolDiscoveryConfig struct {
Protocol18092Active byte
ProtocolBPrime byte
ProtocolDual byte
Protocol15693 byte
ProtocolKovio byte
ProtocolMifare byte
DiscoveryPollKovio byte
DiscoveryPollBPrime byte
DiscoveryListenBPrime byte
}
func (*ProtocolDiscoveryConfig) MarshalParcel ¶
func (s *ProtocolDiscoveryConfig) MarshalParcel( p *parcel.Parcel, ) error
func (*ProtocolDiscoveryConfig) UnmarshalParcel ¶
func (s *ProtocolDiscoveryConfig) UnmarshalParcel( p *parcel.Parcel, ) error