package smartcardemulation

// Code generated by cdproto-gen. DO NOT EDIT.

// EventEstablishContextRequested 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
type EventEstablishContextRequested struct {
	RequestID string `json:"requestId"`
}

// 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 EventReleaseContextRequested 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 EventListReadersRequested struct {
	RequestID string `json:"requestId"`
	ContextID int64  `json:"contextId"`
}

// 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 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"
}

// 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 EventCancelRequested struct {
	RequestID string `json:"requestId"`
	ContextID int64  `json:"contextId"`
}

// 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 EventConnectRequested struct {
	RequestID          string       `json:"requestId"`
	ContextID          int64        `json:"contextId"`
	Reader             string       `json:"reader"`
	ShareMode          ShareMode    `json:"shareMode"`
	PreferredProtocols *ProtocolSet `json:"preferredProtocols"`
}

// 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 EventDisconnectRequested struct {
	RequestID   string      `json:"requestId"`
	Handle      int64       `json:"handle"`
	Disposition Disposition `json:"disposition"`
}

// 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 EventTransmitRequested struct {
	RequestID string   `json:"requestId"`
	Handle    int64    `json:"handle"`
	Data      string   `json:"data"`
	Protocol  Protocol `json:"protocol,omitempty,omitzero"`
}

// 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 EventControlRequested struct {
	RequestID   string `json:"requestId"`
	Handle      int64  `json:"handle"`
	ControlCode int64  `json:"controlCode"`
	Data        string `json:"data"`
}

// 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 EventGetAttribRequested struct {
	RequestID string `json:"requestId"`
	Handle    int64  `json:"handle"`
	AttribID  int64  `json:"attribId"`
}

// 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 EventSetAttribRequested struct {
	RequestID string `json:"requestId"`
	Handle    int64  `json:"handle"`
	AttribID  int64  `json:"attribId"`
	Data      string `json:"data"`
}

// 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 EventStatusRequested 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 EventBeginTransactionRequested struct {
	RequestID string `json:"requestId"`
	Handle    int64  `json:"handle"`
}

// 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 EventEndTransactionRequested struct {
	RequestID   string      `json:"requestId"`
	Handle      int64       `json:"handle"`
	Disposition Disposition `json:"disposition"`
}
