smartcardemulation

package
v0.158.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package smartcardemulation provides the Chrome DevTools Protocol commands, types, and events for the SmartCardEmulation domain.

Generated by the pdlgen command.

Index

Constants

View Source
const (
	CommandEnable                       = "SmartCardEmulation.enable"
	CommandDisable                      = "SmartCardEmulation.disable"
	CommandReportEstablishContextResult = "SmartCardEmulation.reportEstablishContextResult"
	CommandReportReleaseContextResult   = "SmartCardEmulation.reportReleaseContextResult"
	CommandReportListReadersResult      = "SmartCardEmulation.reportListReadersResult"
	CommandReportGetStatusChangeResult  = "SmartCardEmulation.reportGetStatusChangeResult"
	CommandReportBeginTransactionResult = "SmartCardEmulation.reportBeginTransactionResult"
	CommandReportPlainResult            = "SmartCardEmulation.reportPlainResult"
	CommandReportConnectResult          = "SmartCardEmulation.reportConnectResult"
	CommandReportDataResult             = "SmartCardEmulation.reportDataResult"
	CommandReportStatusResult           = "SmartCardEmulation.reportStatusResult"
	CommandReportError                  = "SmartCardEmulation.reportError"
)

Command names.

Variables

View Source
var BeginTransactionRequested = cdp.Event[EventBeginTransactionRequested]{Method: "SmartCardEmulation.beginTransactionRequested"}

BeginTransactionRequested fired when |SCardBeginTransaction| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-beginTransactionRequested

View Source
var CancelRequested = cdp.Event[EventCancelRequested]{Method: "SmartCardEmulation.cancelRequested"}

CancelRequested fired when |SCardCancel| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-cancelRequested

View Source
var ConnectRequested = cdp.Event[EventConnectRequested]{Method: "SmartCardEmulation.connectRequested"}

ConnectRequested fired when |SCardConnect| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-connectRequested

View Source
var ControlRequested = cdp.Event[EventControlRequested]{Method: "SmartCardEmulation.controlRequested"}

ControlRequested fired when |SCardControl| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-controlRequested

View Source
var Disable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandDisable}

Disable disables the |SmartCardEmulation| domain.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-disable

View Source
var DisconnectRequested = cdp.Event[EventDisconnectRequested]{Method: "SmartCardEmulation.disconnectRequested"}

DisconnectRequested fired when |SCardDisconnect| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-disconnectRequested

Enable enables the |SmartCardEmulation| domain.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-enable

View Source
var EndTransactionRequested = cdp.Event[EventEndTransactionRequested]{Method: "SmartCardEmulation.endTransactionRequested"}

EndTransactionRequested fired when |SCardEndTransaction| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-endTransactionRequested

View Source
var EstablishContextRequested = cdp.Event[EventEstablishContextRequested]{Method: "SmartCardEmulation.establishContextRequested"}

EstablishContextRequested fired when |SCardEstablishContext| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-establishContextRequested

View Source
var GetAttribRequested = cdp.Event[EventGetAttribRequested]{Method: "SmartCardEmulation.getAttribRequested"}

GetAttribRequested fired when |SCardGetAttrib| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-getAttribRequested

View Source
var GetStatusChangeRequested = cdp.Event[EventGetStatusChangeRequested]{Method: "SmartCardEmulation.getStatusChangeRequested"}

GetStatusChangeRequested fired when |SCardGetStatusChange| is called. Timeout is specified in milliseconds. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-getStatusChangeRequested

View Source
var ListReadersRequested = cdp.Event[EventListReadersRequested]{Method: "SmartCardEmulation.listReadersRequested"}

ListReadersRequested fired when |SCardListReaders| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-listReadersRequested

View Source
var ReleaseContextRequested = cdp.Event[EventReleaseContextRequested]{Method: "SmartCardEmulation.releaseContextRequested"}

ReleaseContextRequested fired when |SCardReleaseContext| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-releaseContextRequested

ReportBeginTransactionResult reports the result of a |SCardBeginTransaction| call. On success, this creates a new transaction object. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportBeginTransactionResult

ReportConnectResult reports the successful result of a |SCardConnect| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportConnectResult

ReportDataResult reports the successful result of a call that sends back data on success. Used for |SCardTransmit|, |SCardControl|, and |SCardGetAttrib|. This maps to: 1. SCardTransmit PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit 2. SCardControl PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol 3. SCardGetAttrib PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportDataResult

ReportError reports an error result for the given request.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportError

ReportEstablishContextResult reports the successful result of a |SCardEstablishContext| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportEstablishContextResult

ReportGetStatusChangeResult reports the successful result of a |SCardGetStatusChange| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportGetStatusChangeResult

ReportListReadersResult reports the successful result of a |SCardListReaders| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportListReadersResult

ReportPlainResult reports the successful result of a call that returns only a result code. Used for: |SCardCancel|, |SCardDisconnect|, |SCardSetAttrib|, |SCardEndTransaction|. This maps to: 1. SCardCancel PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel 2. SCardDisconnect PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect 3. SCardSetAttrib PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib 4. SCardEndTransaction PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportPlainResult

ReportReleaseContextResult reports the successful result of a |SCardReleaseContext| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportReleaseContextResult

ReportStatusResult reports the successful result of a |SCardStatus| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportStatusResult

View Source
var SetAttribRequested = cdp.Event[EventSetAttribRequested]{Method: "SmartCardEmulation.setAttribRequested"}

SetAttribRequested fired when |SCardSetAttrib| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-setAttribRequested

View Source
var StatusRequested = cdp.Event[EventStatusRequested]{Method: "SmartCardEmulation.statusRequested"}

StatusRequested fired when |SCardStatus| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-statusRequested

View Source
var TransmitRequested = cdp.Event[EventTransmitRequested]{Method: "SmartCardEmulation.transmitRequested"}

TransmitRequested fired when |SCardTransmit| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-transmitRequested

Functions

This section is empty.

Types

type ConnectionState

type ConnectionState string

ConnectionState maps to |SCARD_*| connection state values.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ConnectionState

const (
	ConnectionStateAbsent     ConnectionState = "absent"
	ConnectionStatePresent    ConnectionState = "present"
	ConnectionStateSwallowed  ConnectionState = "swallowed"
	ConnectionStatePowered    ConnectionState = "powered"
	ConnectionStateNegotiable ConnectionState = "negotiable"
	ConnectionStateSpecific   ConnectionState = "specific"
)

ConnectionState values.

func (ConnectionState) String

func (t ConnectionState) String() string

String returns the ConnectionState as string value.

type Disposition

type Disposition string

Disposition indicates what the reader should do with the card.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-Disposition

const (
	DispositionLeaveCard   Disposition = "leave-card"
	DispositionResetCard   Disposition = "reset-card"
	DispositionUnpowerCard Disposition = "unpower-card"
	DispositionEjectCard   Disposition = "eject-card"
)

Disposition values.

func (Disposition) String

func (t Disposition) String() string

String returns the Disposition as string value.

type EventBeginTransactionRequested

type EventBeginTransactionRequested struct {
	RequestID string `json:"requestId"`
	Handle    int64  `json:"handle"`
}

EventBeginTransactionRequested fired when |SCardBeginTransaction| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-beginTransactionRequested

type EventCancelRequested

type EventCancelRequested struct {
	RequestID string `json:"requestId"`
	ContextID int64  `json:"contextId"`
}

EventCancelRequested fired when |SCardCancel| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-cancelRequested

type EventConnectRequested

type EventConnectRequested struct {
	RequestID          string       `json:"requestId"`
	ContextID          int64        `json:"contextId"`
	Reader             string       `json:"reader"`
	ShareMode          ShareMode    `json:"shareMode"`
	PreferredProtocols *ProtocolSet `json:"preferredProtocols"`
}

EventConnectRequested fired when |SCardConnect| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-connectRequested

type EventControlRequested

type EventControlRequested struct {
	RequestID   string `json:"requestId"`
	Handle      int64  `json:"handle"`
	ControlCode int64  `json:"controlCode"`
	Data        []byte `json:"data"`
}

EventControlRequested fired when |SCardControl| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-controlRequested

type EventDisconnectRequested

type EventDisconnectRequested struct {
	RequestID   string      `json:"requestId"`
	Handle      int64       `json:"handle"`
	Disposition Disposition `json:"disposition"`
}

EventDisconnectRequested fired when |SCardDisconnect| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-disconnectRequested

type EventEndTransactionRequested

type EventEndTransactionRequested struct {
	RequestID   string      `json:"requestId"`
	Handle      int64       `json:"handle"`
	Disposition Disposition `json:"disposition"`
}

EventEndTransactionRequested fired when |SCardEndTransaction| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-endTransactionRequested

type EventGetAttribRequested

type EventGetAttribRequested struct {
	RequestID string `json:"requestId"`
	Handle    int64  `json:"handle"`
	AttribID  int64  `json:"attribId"`
}

EventGetAttribRequested fired when |SCardGetAttrib| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-getAttribRequested

type EventGetStatusChangeRequested

type EventGetStatusChangeRequested struct {
	RequestID    string           `json:"requestId"`
	ContextID    int64            `json:"contextId"`
	ReaderStates []*ReaderStateIn `json:"readerStates"`
	Timeout      int64            `json:"timeout,omitempty,omitzero"` // in milliseconds, if absent, it means "infinite"
}

EventGetStatusChangeRequested fired when |SCardGetStatusChange| is called. Timeout is specified in milliseconds. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-getStatusChangeRequested

type EventListReadersRequested

type EventListReadersRequested struct {
	RequestID string `json:"requestId"`
	ContextID int64  `json:"contextId"`
}

EventListReadersRequested fired when |SCardListReaders| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-listReadersRequested

type EventReleaseContextRequested

type EventReleaseContextRequested struct {
	RequestID string `json:"requestId"`
	ContextID int64  `json:"contextId"`
}

EventReleaseContextRequested fired when |SCardReleaseContext| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-releaseContextRequested

type EventSetAttribRequested

type EventSetAttribRequested struct {
	RequestID string `json:"requestId"`
	Handle    int64  `json:"handle"`
	AttribID  int64  `json:"attribId"`
	Data      []byte `json:"data"`
}

EventSetAttribRequested fired when |SCardSetAttrib| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-setAttribRequested

type EventStatusRequested

type EventStatusRequested struct {
	RequestID string `json:"requestId"`
	Handle    int64  `json:"handle"`
}

EventStatusRequested fired when |SCardStatus| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-statusRequested

type EventTransmitRequested

type EventTransmitRequested struct {
	RequestID string   `json:"requestId"`
	Handle    int64    `json:"handle"`
	Data      []byte   `json:"data"`
	Protocol  Protocol `json:"protocol,omitempty,omitzero"`
}

EventTransmitRequested fired when |SCardTransmit| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-transmitRequested

type Protocol

type Protocol string

Protocol maps to the |SCARD_PROTOCOL_*| values.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-Protocol

const (
	ProtocolT0  Protocol = "t0"
	ProtocolT1  Protocol = "t1"
	ProtocolRaw Protocol = "raw"
)

Protocol values.

func (Protocol) String

func (t Protocol) String() string

String returns the Protocol as string value.

type ProtocolSet

type ProtocolSet struct {
	T0  bool `json:"t0"`
	T1  bool `json:"t1"`
	Raw bool `json:"raw"`
}

ProtocolSet maps to the |SCARD_PROTOCOL_*| flags.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ProtocolSet

type ReaderStateFlags

type ReaderStateFlags struct {
	Unaware     bool `json:"unaware"`
	Ignore      bool `json:"ignore"`
	Changed     bool `json:"changed"`
	Unknown     bool `json:"unknown"`
	Unavailable bool `json:"unavailable"`
	Empty       bool `json:"empty"`
	Present     bool `json:"present"`
	Exclusive   bool `json:"exclusive"`
	Inuse       bool `json:"inuse"`
	Mute        bool `json:"mute"`
	Unpowered   bool `json:"unpowered"`
}

ReaderStateFlags maps to the |SCARD_STATE_*| flags.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ReaderStateFlags

type ReaderStateIn

type ReaderStateIn struct {
	Reader                string            `json:"reader"`
	CurrentState          *ReaderStateFlags `json:"currentState"`
	CurrentInsertionCount int64             `json:"currentInsertionCount"`
}

ReaderStateIn [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ReaderStateIn

type ReaderStateOut

type ReaderStateOut struct {
	Reader     string            `json:"reader"`
	EventState *ReaderStateFlags `json:"eventState"`
	EventCount int64             `json:"eventCount"`
	Atr        []byte            `json:"atr"`
}

ReaderStateOut [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ReaderStateOut

type ReportBeginTransactionResultParams

type ReportBeginTransactionResultParams struct {
	RequestID string `json:"requestId"`
	Handle    int64  `json:"handle"`
}

ReportBeginTransactionResultParams are the parameters of the command SmartCardEmulation.reportBeginTransactionResult.

type ReportConnectResultParams

type ReportConnectResultParams struct {
	RequestID      string   `json:"requestId"`
	Handle         int64    `json:"handle"`
	ActiveProtocol Protocol `json:"activeProtocol,omitempty,omitzero"`
}

ReportConnectResultParams are the parameters of the command SmartCardEmulation.reportConnectResult.

type ReportDataResultParams

type ReportDataResultParams struct {
	RequestID string `json:"requestId"`
	Data      []byte `json:"data"`
}

ReportDataResultParams are the parameters of the command SmartCardEmulation.reportDataResult.

type ReportErrorParams

type ReportErrorParams struct {
	RequestID  string     `json:"requestId"`
	ResultCode ResultCode `json:"resultCode"`
}

ReportErrorParams are the parameters of the command SmartCardEmulation.reportError.

type ReportEstablishContextResultParams

type ReportEstablishContextResultParams struct {
	RequestID string `json:"requestId"`
	ContextID int64  `json:"contextId"`
}

ReportEstablishContextResultParams are the parameters of the command SmartCardEmulation.reportEstablishContextResult.

type ReportGetStatusChangeResultParams

type ReportGetStatusChangeResultParams struct {
	RequestID    string            `json:"requestId"`
	ReaderStates []*ReaderStateOut `json:"readerStates"`
}

ReportGetStatusChangeResultParams are the parameters of the command SmartCardEmulation.reportGetStatusChangeResult.

type ReportListReadersResultParams

type ReportListReadersResultParams struct {
	RequestID string   `json:"requestId"`
	Readers   []string `json:"readers"`
}

ReportListReadersResultParams are the parameters of the command SmartCardEmulation.reportListReadersResult.

type ReportPlainResultParams

type ReportPlainResultParams struct {
	RequestID string `json:"requestId"`
}

ReportPlainResultParams are the parameters of the command SmartCardEmulation.reportPlainResult.

type ReportReleaseContextResultParams

type ReportReleaseContextResultParams struct {
	RequestID string `json:"requestId"`
}

ReportReleaseContextResultParams are the parameters of the command SmartCardEmulation.reportReleaseContextResult.

type ReportStatusResultParams

type ReportStatusResultParams struct {
	RequestID  string          `json:"requestId"`
	ReaderName string          `json:"readerName"`
	State      ConnectionState `json:"state"`
	Atr        []byte          `json:"atr"`
	Protocol   Protocol        `json:"protocol,omitempty,omitzero"`
}

ReportStatusResultParams are the parameters of the command SmartCardEmulation.reportStatusResult.

type ResultCode

type ResultCode string

ResultCode indicates the PC/SC error code. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__ErrorCodes.html Microsoft: https://learn.microsoft.com/en-us/windows/win32/secauthn/authentication-return-values.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ResultCode

const (
	ResultCodeSuccess            ResultCode = "success"
	ResultCodeRemovedCard        ResultCode = "removed-card"
	ResultCodeResetCard          ResultCode = "reset-card"
	ResultCodeUnpoweredCard      ResultCode = "unpowered-card"
	ResultCodeUnresponsiveCard   ResultCode = "unresponsive-card"
	ResultCodeUnsupportedCard    ResultCode = "unsupported-card"
	ResultCodeReaderUnavailable  ResultCode = "reader-unavailable"
	ResultCodeSharingViolation   ResultCode = "sharing-violation"
	ResultCodeNotTransacted      ResultCode = "not-transacted"
	ResultCodeNoSmartcard        ResultCode = "no-smartcard"
	ResultCodeProtoMismatch      ResultCode = "proto-mismatch"
	ResultCodeSystemCancelled    ResultCode = "system-cancelled"
	ResultCodeNotReady           ResultCode = "not-ready"
	ResultCodeCancelled          ResultCode = "cancelled"
	ResultCodeInsufficientBuffer ResultCode = "insufficient-buffer"
	ResultCodeInvalidHandle      ResultCode = "invalid-handle"
	ResultCodeInvalidParameter   ResultCode = "invalid-parameter"
	ResultCodeInvalidValue       ResultCode = "invalid-value"
	ResultCodeNoMemory           ResultCode = "no-memory"
	ResultCodeTimeout            ResultCode = "timeout"
	ResultCodeUnknownReader      ResultCode = "unknown-reader"
	ResultCodeUnsupportedFeature ResultCode = "unsupported-feature"
	ResultCodeNoReadersAvailable ResultCode = "no-readers-available"
	ResultCodeServiceStopped     ResultCode = "service-stopped"
	ResultCodeNoService          ResultCode = "no-service"
	ResultCodeCommError          ResultCode = "comm-error"
	ResultCodeInternalError      ResultCode = "internal-error"
	ResultCodeServerTooBusy      ResultCode = "server-too-busy"
	ResultCodeUnexpected         ResultCode = "unexpected"
	ResultCodeShutdown           ResultCode = "shutdown"
	ResultCodeUnknownCard        ResultCode = "unknown-card"
	ResultCodeUnknown            ResultCode = "unknown"
)

ResultCode values.

func (ResultCode) String

func (t ResultCode) String() string

String returns the ResultCode as string value.

type ShareMode

type ShareMode string

ShareMode maps to the |SCARD_SHARE_*| values.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ShareMode

const (
	ShareModeShared    ShareMode = "shared"
	ShareModeExclusive ShareMode = "exclusive"
	ShareModeDirect    ShareMode = "direct"
)

ShareMode values.

func (ShareMode) String

func (t ShareMode) String() string

String returns the ShareMode as string value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL