Documentation
¶
Index ¶
- Constants
- type ISecureElement
- type ISecureElementCallback
- type ISecureElementCallbackServer
- type ISecureElementServer
- type LogicalChannelResponse
- type SecureElementCallbackProxy
- type SecureElementCallbackStub
- type SecureElementProxy
- func (p *SecureElementProxy) AsBinder() binder.IBinder
- func (p *SecureElementProxy) CloseChannel(ctx context.Context, channelNumber byte) error
- func (p *SecureElementProxy) GetAtr(ctx context.Context) ([]byte, error)
- func (p *SecureElementProxy) Init(ctx context.Context, clientCallback ISecureElementCallback) error
- func (p *SecureElementProxy) IsCardPresent(ctx context.Context) (bool, error)
- func (p *SecureElementProxy) OpenBasicChannel(ctx context.Context, aid []byte, p2 byte) ([]byte, error)
- func (p *SecureElementProxy) OpenLogicalChannel(ctx context.Context, aid []byte, p2 byte) (LogicalChannelResponse, error)
- func (p *SecureElementProxy) Reset(ctx context.Context) error
- func (p *SecureElementProxy) Transmit(ctx context.Context, data []byte) ([]byte, error)
- type SecureElementStub
Constants ¶
const ( TransactionISecureElementCloseChannel = binder.FirstCallTransaction + 0 TransactionISecureElementGetAtr = binder.FirstCallTransaction + 1 TransactionISecureElementInit = binder.FirstCallTransaction + 2 TransactionISecureElementIsCardPresent = binder.FirstCallTransaction + 3 TransactionISecureElementOpenBasicChannel = binder.FirstCallTransaction + 4 TransactionISecureElementOpenLogicalChannel = binder.FirstCallTransaction + 5 TransactionISecureElementReset = binder.FirstCallTransaction + 6 TransactionISecureElementTransmit = binder.FirstCallTransaction + 7 )
const ( MethodISecureElementCloseChannel = "closeChannel" MethodISecureElementGetAtr = "getAtr" MethodISecureElementInit = "init" MethodISecureElementIsCardPresent = "isCardPresent" MethodISecureElementOpenBasicChannel = "openBasicChannel" MethodISecureElementOpenLogicalChannel = "openLogicalChannel" MethodISecureElementReset = "reset" MethodISecureElementTransmit = "transmit" )
const ( ISecureElementFAILED int32 = 1 ISecureElementChannelNotAvailable int32 = 2 ISecureElementNoSuchElementError int32 = 3 ISecureElementUnsupportedOperation int32 = 4 ISecureElementIOERROR int32 = 5 )
const DescriptorISecureElement = "android.hardware.secure_element.ISecureElement"
const DescriptorISecureElementCallback = "android.hardware.secure_element.ISecureElementCallback"
const (
MethodISecureElementCallbackOnStateChange = "onStateChange"
)
const (
TransactionISecureElementCallbackOnStateChange = binder.FirstCallTransaction + 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ISecureElement ¶
type ISecureElement interface {
AsBinder() binder.IBinder
CloseChannel(ctx context.Context, channelNumber byte) error
GetAtr(ctx context.Context) ([]byte, error)
Init(ctx context.Context, clientCallback ISecureElementCallback) error
IsCardPresent(ctx context.Context) (bool, error)
OpenBasicChannel(ctx context.Context, aid []byte, p2 byte) ([]byte, error)
OpenLogicalChannel(ctx context.Context, aid []byte, p2 byte) (LogicalChannelResponse, error)
Reset(ctx context.Context) error
Transmit(ctx context.Context, data []byte) ([]byte, error)
}
func NewSecureElementStub ¶
func NewSecureElementStub( impl ISecureElementServer, ) ISecureElement
NewSecureElementStub creates a server-side ISecureElement wrapping the given server implementation. The returned value satisfies ISecureElement 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 ISecureElementCallback ¶
type ISecureElementCallback interface {
AsBinder() binder.IBinder
OnStateChange(ctx context.Context, connected bool, debugReason string) error
}
func NewSecureElementCallbackStub ¶
func NewSecureElementCallbackStub( impl ISecureElementCallbackServer, ) ISecureElementCallback
NewSecureElementCallbackStub creates a server-side ISecureElementCallback wrapping the given server implementation. The returned value satisfies ISecureElementCallback 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 ISecureElementCallbackServer ¶
type ISecureElementCallbackServer interface {
OnStateChange(ctx context.Context, connected bool, debugReason string) error
}
ISecureElementCallbackServer is the server-side interface that user implementations provide to NewSecureElementCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type ISecureElementServer ¶
type ISecureElementServer interface {
CloseChannel(ctx context.Context, channelNumber byte) error
GetAtr(ctx context.Context) ([]byte, error)
Init(ctx context.Context, clientCallback ISecureElementCallback) error
IsCardPresent(ctx context.Context) (bool, error)
OpenBasicChannel(ctx context.Context, aid []byte, p2 byte) ([]byte, error)
OpenLogicalChannel(ctx context.Context, aid []byte, p2 byte) (LogicalChannelResponse, error)
Reset(ctx context.Context) error
Transmit(ctx context.Context, data []byte) ([]byte, error)
}
ISecureElementServer is the server-side interface that user implementations provide to NewSecureElementStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type LogicalChannelResponse ¶
func (*LogicalChannelResponse) MarshalParcel ¶
func (s *LogicalChannelResponse) MarshalParcel( p *parcel.Parcel, ) error
func (*LogicalChannelResponse) UnmarshalParcel ¶
func (s *LogicalChannelResponse) UnmarshalParcel( p *parcel.Parcel, ) error
type SecureElementCallbackProxy ¶
func NewSecureElementCallbackProxy ¶
func NewSecureElementCallbackProxy( remote binder.IBinder, ) *SecureElementCallbackProxy
func (*SecureElementCallbackProxy) AsBinder ¶
func (p *SecureElementCallbackProxy) AsBinder() binder.IBinder
func (*SecureElementCallbackProxy) OnStateChange ¶
type SecureElementCallbackStub ¶
type SecureElementCallbackStub struct {
Impl ISecureElementCallback
Transport binder.VersionAwareTransport
}
SecureElementCallbackStub dispatches incoming binder transactions to a typed ISecureElementCallback implementation.
func (*SecureElementCallbackStub) Descriptor ¶
func (s *SecureElementCallbackStub) Descriptor() string
func (*SecureElementCallbackStub) OnTransaction ¶
func (s *SecureElementCallbackStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type SecureElementProxy ¶
func NewSecureElementProxy ¶
func NewSecureElementProxy( remote binder.IBinder, ) *SecureElementProxy
func (*SecureElementProxy) AsBinder ¶
func (p *SecureElementProxy) AsBinder() binder.IBinder
func (*SecureElementProxy) CloseChannel ¶
func (p *SecureElementProxy) CloseChannel( ctx context.Context, channelNumber byte, ) error
func (*SecureElementProxy) GetAtr ¶
func (p *SecureElementProxy) GetAtr( ctx context.Context, ) ([]byte, error)
func (*SecureElementProxy) Init ¶
func (p *SecureElementProxy) Init( ctx context.Context, clientCallback ISecureElementCallback, ) error
func (*SecureElementProxy) IsCardPresent ¶
func (p *SecureElementProxy) IsCardPresent( ctx context.Context, ) (bool, error)
func (*SecureElementProxy) OpenBasicChannel ¶
func (*SecureElementProxy) OpenLogicalChannel ¶
func (p *SecureElementProxy) OpenLogicalChannel( ctx context.Context, aid []byte, p2 byte, ) (LogicalChannelResponse, error)
type SecureElementStub ¶
type SecureElementStub struct {
Impl ISecureElement
Transport binder.VersionAwareTransport
}
SecureElementStub dispatches incoming binder transactions to a typed ISecureElement implementation.
func (*SecureElementStub) Descriptor ¶
func (s *SecureElementStub) Descriptor() string
func (*SecureElementStub) OnTransaction ¶
func (s *SecureElementStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)