Documentation
¶
Index ¶
- Constants
- type ISap
- type ISapCallback
- type ISapCallbackServer
- type ISapServer
- type SapApduType
- type SapCallbackProxy
- func (p *SapCallbackProxy) ApduResponse(ctx context.Context, serial int32, resultCode SapResultCode, apduRsp []byte) error
- func (p *SapCallbackProxy) AsBinder() binder.IBinder
- func (p *SapCallbackProxy) ConnectResponse(ctx context.Context, serial int32, sapConnectRsp SapConnectRsp, ...) error
- func (p *SapCallbackProxy) DisconnectIndication(ctx context.Context, serial int32, disconnectType SapDisconnectType) error
- func (p *SapCallbackProxy) DisconnectResponse(ctx context.Context, serial int32) error
- func (p *SapCallbackProxy) ErrorResponse(ctx context.Context, serial int32) error
- func (p *SapCallbackProxy) PowerResponse(ctx context.Context, serial int32, resultCode SapResultCode) error
- func (p *SapCallbackProxy) ResetSimResponse(ctx context.Context, serial int32, resultCode SapResultCode) error
- func (p *SapCallbackProxy) StatusIndication(ctx context.Context, serial int32, status SapStatus) error
- func (p *SapCallbackProxy) TransferAtrResponse(ctx context.Context, serial int32, resultCode SapResultCode, atr []byte) error
- func (p *SapCallbackProxy) TransferCardReaderStatusResponse(ctx context.Context, serial int32, resultCode SapResultCode, ...) error
- func (p *SapCallbackProxy) TransferProtocolResponse(ctx context.Context, serial int32, resultCode SapResultCode) error
- type SapCallbackStub
- type SapConnectRsp
- type SapDisconnectType
- type SapProxy
- func (p *SapProxy) ApduReq(ctx context.Context, serial int32, type_ SapApduType, command []byte) error
- func (p *SapProxy) AsBinder() binder.IBinder
- func (p *SapProxy) ConnectReq(ctx context.Context, serial int32, maxMsgSizeBytes int32) error
- func (p *SapProxy) DisconnectReq(ctx context.Context, serial int32) error
- func (p *SapProxy) PowerReq(ctx context.Context, serial int32, powerOn bool) error
- func (p *SapProxy) ResetSimReq(ctx context.Context, serial int32) error
- func (p *SapProxy) SetCallback(ctx context.Context, sapCallback ISapCallback) error
- func (p *SapProxy) SetTransferProtocolReq(ctx context.Context, serial int32, transferProtocol SapTransferProtocol) error
- func (p *SapProxy) TransferAtrReq(ctx context.Context, serial int32) error
- func (p *SapProxy) TransferCardReaderStatusReq(ctx context.Context, serial int32) error
- type SapResultCode
- type SapStatus
- type SapStub
- type SapTransferProtocol
Constants ¶
const ( TransactionISapApduReq = binder.FirstCallTransaction + 0 TransactionISapConnectReq = binder.FirstCallTransaction + 1 TransactionISapDisconnectReq = binder.FirstCallTransaction + 2 TransactionISapPowerReq = binder.FirstCallTransaction + 3 TransactionISapResetSimReq = binder.FirstCallTransaction + 4 TransactionISapSetCallback = binder.FirstCallTransaction + 5 TransactionISapSetTransferProtocolReq = binder.FirstCallTransaction + 6 TransactionISapTransferAtrReq = binder.FirstCallTransaction + 7 TransactionISapTransferCardReaderStatusReq = binder.FirstCallTransaction + 8 )
const ( MethodISapApduReq = "apduReq" MethodISapConnectReq = "connectReq" MethodISapDisconnectReq = "disconnectReq" MethodISapPowerReq = "powerReq" MethodISapResetSimReq = "resetSimReq" MethodISapSetCallback = "setCallback" MethodISapSetTransferProtocolReq = "setTransferProtocolReq" MethodISapTransferAtrReq = "transferAtrReq" MethodISapTransferCardReaderStatusReq = "transferCardReaderStatusReq" )
const ( TransactionISapCallbackApduResponse = binder.FirstCallTransaction + 0 TransactionISapCallbackConnectResponse = binder.FirstCallTransaction + 1 TransactionISapCallbackDisconnectIndication = binder.FirstCallTransaction + 2 TransactionISapCallbackDisconnectResponse = binder.FirstCallTransaction + 3 TransactionISapCallbackErrorResponse = binder.FirstCallTransaction + 4 TransactionISapCallbackPowerResponse = binder.FirstCallTransaction + 5 TransactionISapCallbackResetSimResponse = binder.FirstCallTransaction + 6 TransactionISapCallbackStatusIndication = binder.FirstCallTransaction + 7 TransactionISapCallbackTransferAtrResponse = binder.FirstCallTransaction + 8 TransactionISapCallbackTransferCardReaderStatusResponse = binder.FirstCallTransaction + 9 TransactionISapCallbackTransferProtocolResponse = binder.FirstCallTransaction + 10 )
const ( MethodISapCallbackApduResponse = "apduResponse" MethodISapCallbackConnectResponse = "connectResponse" MethodISapCallbackDisconnectIndication = "disconnectIndication" MethodISapCallbackDisconnectResponse = "disconnectResponse" MethodISapCallbackErrorResponse = "errorResponse" MethodISapCallbackPowerResponse = "powerResponse" MethodISapCallbackResetSimResponse = "resetSimResponse" MethodISapCallbackStatusIndication = "statusIndication" MethodISapCallbackTransferAtrResponse = "transferAtrResponse" MethodISapCallbackTransferCardReaderStatusResponse = "transferCardReaderStatusResponse" MethodISapCallbackTransferProtocolResponse = "transferProtocolResponse" )
const DescriptorISap = "android.hardware.radio.sap.ISap"
const DescriptorISapCallback = "android.hardware.radio.sap.ISapCallback"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ISap ¶
type ISap interface {
AsBinder() binder.IBinder
ApduReq(ctx context.Context, serial int32, type_ SapApduType, command []byte) error
ConnectReq(ctx context.Context, serial int32, maxMsgSizeBytes int32) error
DisconnectReq(ctx context.Context, serial int32) error
PowerReq(ctx context.Context, serial int32, powerOn bool) error
ResetSimReq(ctx context.Context, serial int32) error
SetCallback(ctx context.Context, sapCallback ISapCallback) error
SetTransferProtocolReq(ctx context.Context, serial int32, transferProtocol SapTransferProtocol) error
TransferAtrReq(ctx context.Context, serial int32) error
TransferCardReaderStatusReq(ctx context.Context, serial int32) error
}
func NewSapStub ¶
func NewSapStub( impl ISapServer, ) ISap
NewSapStub creates a server-side ISap wrapping the given server implementation. The returned value satisfies ISap 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 ISapCallback ¶
type ISapCallback interface {
AsBinder() binder.IBinder
ApduResponse(ctx context.Context, serial int32, resultCode SapResultCode, apduRsp []byte) error
ConnectResponse(ctx context.Context, serial int32, sapConnectRsp SapConnectRsp, maxMsgSizeBytes int32) error
DisconnectIndication(ctx context.Context, serial int32, disconnectType SapDisconnectType) error
DisconnectResponse(ctx context.Context, serial int32) error
ErrorResponse(ctx context.Context, serial int32) error
PowerResponse(ctx context.Context, serial int32, resultCode SapResultCode) error
ResetSimResponse(ctx context.Context, serial int32, resultCode SapResultCode) error
StatusIndication(ctx context.Context, serial int32, status SapStatus) error
TransferAtrResponse(ctx context.Context, serial int32, resultCode SapResultCode, atr []byte) error
TransferCardReaderStatusResponse(ctx context.Context, serial int32, resultCode SapResultCode, cardReaderStatus int32) error
TransferProtocolResponse(ctx context.Context, serial int32, resultCode SapResultCode) error
}
func NewSapCallbackStub ¶
func NewSapCallbackStub( impl ISapCallbackServer, ) ISapCallback
NewSapCallbackStub creates a server-side ISapCallback wrapping the given server implementation. The returned value satisfies ISapCallback 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 ISapCallbackServer ¶
type ISapCallbackServer interface {
ApduResponse(ctx context.Context, serial int32, resultCode SapResultCode, apduRsp []byte) error
ConnectResponse(ctx context.Context, serial int32, sapConnectRsp SapConnectRsp, maxMsgSizeBytes int32) error
DisconnectIndication(ctx context.Context, serial int32, disconnectType SapDisconnectType) error
DisconnectResponse(ctx context.Context, serial int32) error
ErrorResponse(ctx context.Context, serial int32) error
PowerResponse(ctx context.Context, serial int32, resultCode SapResultCode) error
ResetSimResponse(ctx context.Context, serial int32, resultCode SapResultCode) error
StatusIndication(ctx context.Context, serial int32, status SapStatus) error
TransferAtrResponse(ctx context.Context, serial int32, resultCode SapResultCode, atr []byte) error
TransferCardReaderStatusResponse(ctx context.Context, serial int32, resultCode SapResultCode, cardReaderStatus int32) error
TransferProtocolResponse(ctx context.Context, serial int32, resultCode SapResultCode) error
}
ISapCallbackServer is the server-side interface that user implementations provide to NewSapCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type ISapServer ¶
type ISapServer interface {
ApduReq(ctx context.Context, serial int32, type_ SapApduType, command []byte) error
ConnectReq(ctx context.Context, serial int32, maxMsgSizeBytes int32) error
DisconnectReq(ctx context.Context, serial int32) error
PowerReq(ctx context.Context, serial int32, powerOn bool) error
ResetSimReq(ctx context.Context, serial int32) error
SetCallback(ctx context.Context, sapCallback ISapCallback) error
SetTransferProtocolReq(ctx context.Context, serial int32, transferProtocol SapTransferProtocol) error
TransferAtrReq(ctx context.Context, serial int32) error
TransferCardReaderStatusReq(ctx context.Context, serial int32) error
}
ISapServer is the server-side interface that user implementations provide to NewSapStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type SapApduType ¶
type SapApduType int32
const ( SapApduTypeAPDU SapApduType = 0 SapApduTypeAPDU7816 SapApduType = 1 )
type SapCallbackProxy ¶
func NewSapCallbackProxy ¶
func NewSapCallbackProxy( remote binder.IBinder, ) *SapCallbackProxy
func (*SapCallbackProxy) ApduResponse ¶
func (p *SapCallbackProxy) ApduResponse( ctx context.Context, serial int32, resultCode SapResultCode, apduRsp []byte, ) error
func (*SapCallbackProxy) AsBinder ¶
func (p *SapCallbackProxy) AsBinder() binder.IBinder
func (*SapCallbackProxy) ConnectResponse ¶
func (p *SapCallbackProxy) ConnectResponse( ctx context.Context, serial int32, sapConnectRsp SapConnectRsp, maxMsgSizeBytes int32, ) error
func (*SapCallbackProxy) DisconnectIndication ¶
func (p *SapCallbackProxy) DisconnectIndication( ctx context.Context, serial int32, disconnectType SapDisconnectType, ) error
func (*SapCallbackProxy) DisconnectResponse ¶
func (p *SapCallbackProxy) DisconnectResponse( ctx context.Context, serial int32, ) error
func (*SapCallbackProxy) ErrorResponse ¶
func (p *SapCallbackProxy) ErrorResponse( ctx context.Context, serial int32, ) error
func (*SapCallbackProxy) PowerResponse ¶
func (p *SapCallbackProxy) PowerResponse( ctx context.Context, serial int32, resultCode SapResultCode, ) error
func (*SapCallbackProxy) ResetSimResponse ¶
func (p *SapCallbackProxy) ResetSimResponse( ctx context.Context, serial int32, resultCode SapResultCode, ) error
func (*SapCallbackProxy) StatusIndication ¶
func (*SapCallbackProxy) TransferAtrResponse ¶
func (p *SapCallbackProxy) TransferAtrResponse( ctx context.Context, serial int32, resultCode SapResultCode, atr []byte, ) error
func (*SapCallbackProxy) TransferCardReaderStatusResponse ¶
func (p *SapCallbackProxy) TransferCardReaderStatusResponse( ctx context.Context, serial int32, resultCode SapResultCode, cardReaderStatus int32, ) error
func (*SapCallbackProxy) TransferProtocolResponse ¶
func (p *SapCallbackProxy) TransferProtocolResponse( ctx context.Context, serial int32, resultCode SapResultCode, ) error
type SapCallbackStub ¶
type SapCallbackStub struct {
Impl ISapCallback
Transport binder.VersionAwareTransport
}
SapCallbackStub dispatches incoming binder transactions to a typed ISapCallback implementation.
func (*SapCallbackStub) Descriptor ¶
func (s *SapCallbackStub) Descriptor() string
func (*SapCallbackStub) OnTransaction ¶
func (s *SapCallbackStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type SapConnectRsp ¶
type SapConnectRsp int32
const ( SapConnectRspSUCCESS SapConnectRsp = 0 SapConnectRspConnectFailure SapConnectRsp = 1 SapConnectRspMsgSizeTooLarge SapConnectRsp = 2 SapConnectRspMsgSizeTooSmall SapConnectRsp = 3 SapConnectRspConnectOkCallOngoing SapConnectRsp = 4 )
type SapDisconnectType ¶
type SapDisconnectType int32
const ( SapDisconnectTypeGRACEFUL SapDisconnectType = 0 SapDisconnectTypeIMMEDIATE SapDisconnectType = 1 )
type SapProxy ¶
func NewSapProxy ¶
func (*SapProxy) ConnectReq ¶
func (*SapProxy) DisconnectReq ¶
func (*SapProxy) ResetSimReq ¶
func (*SapProxy) SetCallback ¶
func (p *SapProxy) SetCallback( ctx context.Context, sapCallback ISapCallback, ) error
func (*SapProxy) SetTransferProtocolReq ¶
func (*SapProxy) TransferAtrReq ¶
type SapResultCode ¶
type SapResultCode int32
const ( SapResultCodeSUCCESS SapResultCode = 0 SapResultCodeGenericFailure SapResultCode = 1 SapResultCodeCardNotAccesssible SapResultCode = 2 SapResultCodeCardAlreadyPoweredOff SapResultCode = 3 SapResultCodeCardRemoved SapResultCode = 4 SapResultCodeCardAlreadyPoweredOn SapResultCode = 5 SapResultCodeDataNotAvailable SapResultCode = 6 SapResultCodeNotSupported SapResultCode = 7 )
type SapStub ¶
type SapStub struct {
Impl ISap
Transport binder.VersionAwareTransport
}
SapStub dispatches incoming binder transactions to a typed ISap implementation.
func (*SapStub) Descriptor ¶
type SapTransferProtocol ¶
type SapTransferProtocol int32
const ( SapTransferProtocolT0 SapTransferProtocol = 0 SapTransferProtocolT1 SapTransferProtocol = 1 )