1#![allow(dead_code)]
3#[allow(unused_imports)]
4use super::types::*;
5#[allow(unused_imports)]
6use derive_builder::Builder;
7#[allow(unused_imports)]
8use serde::{Deserialize, Serialize};
9#[allow(unused_imports)]
10use serde_json::Value as Json;
11#[allow(deprecated)]
12#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
13pub enum ResultCode {
14 #[serde(rename = "success")]
15 Success,
16 #[serde(rename = "removed-card")]
17 RemovedCard,
18 #[serde(rename = "reset-card")]
19 ResetCard,
20 #[serde(rename = "unpowered-card")]
21 UnpoweredCard,
22 #[serde(rename = "unresponsive-card")]
23 UnresponsiveCard,
24 #[serde(rename = "unsupported-card")]
25 UnsupportedCard,
26 #[serde(rename = "reader-unavailable")]
27 ReaderUnavailable,
28 #[serde(rename = "sharing-violation")]
29 SharingViolation,
30 #[serde(rename = "not-transacted")]
31 NotTransacted,
32 #[serde(rename = "no-smartcard")]
33 NoSmartcard,
34 #[serde(rename = "proto-mismatch")]
35 ProtoMismatch,
36 #[serde(rename = "system-cancelled")]
37 SystemCancelled,
38 #[serde(rename = "not-ready")]
39 NotReady,
40 #[serde(rename = "cancelled")]
41 Cancelled,
42 #[serde(rename = "insufficient-buffer")]
43 InsufficientBuffer,
44 #[serde(rename = "invalid-handle")]
45 InvalidHandle,
46 #[serde(rename = "invalid-parameter")]
47 InvalidParameter,
48 #[serde(rename = "invalid-value")]
49 InvalidValue,
50 #[serde(rename = "no-memory")]
51 NoMemory,
52 #[serde(rename = "timeout")]
53 Timeout,
54 #[serde(rename = "unknown-reader")]
55 UnknownReader,
56 #[serde(rename = "unsupported-feature")]
57 UnsupportedFeature,
58 #[serde(rename = "no-readers-available")]
59 NoReadersAvailable,
60 #[serde(rename = "service-stopped")]
61 ServiceStopped,
62 #[serde(rename = "no-service")]
63 NoService,
64 #[serde(rename = "comm-error")]
65 CommError,
66 #[serde(rename = "internal-error")]
67 InternalError,
68 #[serde(rename = "server-too-busy")]
69 ServerTooBusy,
70 #[serde(rename = "unexpected")]
71 Unexpected,
72 #[serde(rename = "shutdown")]
73 Shutdown,
74 #[serde(rename = "unknown-card")]
75 UnknownCard,
76 #[serde(rename = "unknown")]
77 Unknown,
78}
79#[allow(deprecated)]
80#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
81pub enum ShareMode {
82 #[serde(rename = "shared")]
83 Shared,
84 #[serde(rename = "exclusive")]
85 Exclusive,
86 #[serde(rename = "direct")]
87 Direct,
88}
89#[allow(deprecated)]
90#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
91pub enum Disposition {
92 #[serde(rename = "leave-card")]
93 LeaveCard,
94 #[serde(rename = "reset-card")]
95 ResetCard,
96 #[serde(rename = "unpower-card")]
97 UnpowerCard,
98 #[serde(rename = "eject-card")]
99 EjectCard,
100}
101#[allow(deprecated)]
102#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
103pub enum ConnectionState {
104 #[serde(rename = "absent")]
105 Absent,
106 #[serde(rename = "present")]
107 Present,
108 #[serde(rename = "swallowed")]
109 Swallowed,
110 #[serde(rename = "powered")]
111 Powered,
112 #[serde(rename = "negotiable")]
113 Negotiable,
114 #[serde(rename = "specific")]
115 Specific,
116}
117#[allow(deprecated)]
118#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
119pub enum Protocol {
120 #[serde(rename = "t0")]
121 T0,
122 #[serde(rename = "t1")]
123 T1,
124 #[serde(rename = "raw")]
125 Raw,
126}
127#[allow(deprecated)]
128#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
129#[builder(setter(into, strip_option))]
130#[serde(rename_all = "camelCase")]
131#[doc = "Maps to the |SCARD_STATE_*| flags."]
132pub struct ReaderStateFlags {
133 #[builder(default)]
134 #[serde(skip_serializing_if = "Option::is_none")]
135 #[serde(default)]
136 pub unaware: Option<bool>,
137 #[builder(default)]
138 #[serde(skip_serializing_if = "Option::is_none")]
139 #[serde(default)]
140 pub ignore: Option<bool>,
141 #[builder(default)]
142 #[serde(skip_serializing_if = "Option::is_none")]
143 #[serde(default)]
144 pub changed: Option<bool>,
145 #[builder(default)]
146 #[serde(skip_serializing_if = "Option::is_none")]
147 #[serde(default)]
148 pub unknown: Option<bool>,
149 #[builder(default)]
150 #[serde(skip_serializing_if = "Option::is_none")]
151 #[serde(default)]
152 pub unavailable: Option<bool>,
153 #[builder(default)]
154 #[serde(skip_serializing_if = "Option::is_none")]
155 #[serde(default)]
156 pub empty: Option<bool>,
157 #[builder(default)]
158 #[serde(skip_serializing_if = "Option::is_none")]
159 #[serde(default)]
160 pub present: Option<bool>,
161 #[builder(default)]
162 #[serde(skip_serializing_if = "Option::is_none")]
163 #[serde(default)]
164 pub exclusive: Option<bool>,
165 #[builder(default)]
166 #[serde(skip_serializing_if = "Option::is_none")]
167 #[serde(default)]
168 pub inuse: Option<bool>,
169 #[builder(default)]
170 #[serde(skip_serializing_if = "Option::is_none")]
171 #[serde(default)]
172 pub mute: Option<bool>,
173 #[builder(default)]
174 #[serde(skip_serializing_if = "Option::is_none")]
175 #[serde(default)]
176 pub unpowered: Option<bool>,
177}
178#[allow(deprecated)]
179#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
180#[builder(setter(into, strip_option))]
181#[serde(rename_all = "camelCase")]
182#[doc = "Maps to the |SCARD_PROTOCOL_*| flags."]
183pub struct ProtocolSet {
184 #[builder(default)]
185 #[serde(skip_serializing_if = "Option::is_none")]
186 #[serde(default)]
187 pub t_0: Option<bool>,
188 #[builder(default)]
189 #[serde(skip_serializing_if = "Option::is_none")]
190 #[serde(default)]
191 pub t_1: Option<bool>,
192 #[builder(default)]
193 #[serde(skip_serializing_if = "Option::is_none")]
194 #[serde(default)]
195 pub raw: Option<bool>,
196}
197#[allow(deprecated)]
198#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
199#[builder(setter(into, strip_option))]
200#[serde(rename_all = "camelCase")]
201pub struct ReaderStateIn {
202 #[serde(default)]
203 pub reader: String,
204 pub current_state: ReaderStateFlags,
205 #[serde(default)]
206 pub current_insertion_count: JsUInt,
207}
208#[allow(deprecated)]
209#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
210#[builder(setter(into, strip_option))]
211#[serde(rename_all = "camelCase")]
212pub struct ReaderStateOut {
213 #[serde(default)]
214 pub reader: String,
215 pub event_state: ReaderStateFlags,
216 #[serde(default)]
217 pub event_count: JsUInt,
218 pub atr: String,
219}
220#[allow(deprecated)]
221#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
222pub struct Enable(pub Option<Json>);
223#[allow(deprecated)]
224#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
225pub struct Disable(pub Option<Json>);
226#[allow(deprecated)]
227#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
228#[builder(setter(into, strip_option))]
229#[serde(rename_all = "camelCase")]
230#[doc = "Reports the successful result of a |SCardEstablishContext| call.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext>"]
231pub struct ReportEstablishContextResult {
232 #[serde(default)]
233 pub request_id: String,
234 #[serde(default)]
235 pub context_id: JsUInt,
236}
237#[allow(deprecated)]
238#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
239#[builder(setter(into, strip_option))]
240#[serde(rename_all = "camelCase")]
241#[doc = "Reports the successful result of a |SCardReleaseContext| call.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext>"]
242pub struct ReportReleaseContextResult {
243 #[serde(default)]
244 pub request_id: String,
245}
246#[allow(deprecated)]
247#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
248#[builder(setter(into, strip_option))]
249#[serde(rename_all = "camelCase")]
250#[doc = "Reports the successful result of a |SCardListReaders| call.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa>"]
251pub struct ReportListReadersResult {
252 #[serde(default)]
253 pub request_id: String,
254 #[serde(default)]
255 pub readers: Vec<String>,
256}
257#[allow(deprecated)]
258#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
259#[builder(setter(into, strip_option))]
260#[serde(rename_all = "camelCase")]
261#[doc = "Reports the successful result of a |SCardGetStatusChange| call.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea>"]
262pub struct ReportGetStatusChangeResult {
263 #[serde(default)]
264 pub request_id: String,
265 pub reader_states: Vec<ReaderStateOut>,
266}
267#[allow(deprecated)]
268#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
269#[builder(setter(into, strip_option))]
270#[serde(rename_all = "camelCase")]
271#[doc = "Reports the result of a |SCardBeginTransaction| call.\n On success, this creates a new transaction object.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction>"]
272pub struct ReportBeginTransactionResult {
273 #[serde(default)]
274 pub request_id: String,
275 #[serde(default)]
276 pub handle: JsUInt,
277}
278#[allow(deprecated)]
279#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
280#[builder(setter(into, strip_option))]
281#[serde(rename_all = "camelCase")]
282#[doc = "Reports the successful result of a call that returns only a result code.\n Used for: |SCardCancel|, |SCardDisconnect|, |SCardSetAttrib|, |SCardEndTransaction|.\n \n This maps to:\n 1. SCardCancel\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel>\n \n 2. SCardDisconnect\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect>\n \n 3. SCardSetAttrib\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib>\n \n 4. SCardEndTransaction\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction>"]
283pub struct ReportPlainResult {
284 #[serde(default)]
285 pub request_id: String,
286}
287#[allow(deprecated)]
288#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
289#[builder(setter(into, strip_option))]
290#[serde(rename_all = "camelCase")]
291#[doc = "Reports the successful result of a |SCardConnect| call.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta>"]
292pub struct ReportConnectResult {
293 #[serde(default)]
294 pub request_id: String,
295 #[serde(default)]
296 pub handle: JsUInt,
297 #[builder(default)]
298 #[serde(skip_serializing_if = "Option::is_none")]
299 pub active_protocol: Option<Protocol>,
300}
301#[allow(deprecated)]
302#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
303#[builder(setter(into, strip_option))]
304#[serde(rename_all = "camelCase")]
305#[doc = "Reports the successful result of a call that sends back data on success.\n Used for |SCardTransmit|, |SCardControl|, and |SCardGetAttrib|.\n \n This maps to:\n 1. SCardTransmit\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit>\n \n 2. SCardControl\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol>\n \n 3. SCardGetAttrib\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib>"]
306pub struct ReportDataResult {
307 #[serde(default)]
308 pub request_id: String,
309 pub data: Vec<u8>,
310}
311#[allow(deprecated)]
312#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
313#[builder(setter(into, strip_option))]
314#[serde(rename_all = "camelCase")]
315#[doc = "Reports the successful result of a |SCardStatus| call.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa>"]
316pub struct ReportStatusResult {
317 #[serde(default)]
318 pub request_id: String,
319 #[serde(default)]
320 pub reader_name: String,
321 pub state: ConnectionState,
322 pub atr: Vec<u8>,
323 #[builder(default)]
324 #[serde(skip_serializing_if = "Option::is_none")]
325 pub protocol: Option<Protocol>,
326}
327#[allow(deprecated)]
328#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
329#[builder(setter(into, strip_option))]
330#[serde(rename_all = "camelCase")]
331#[doc = "Reports an error result for the given request."]
332pub struct ReportError {
333 #[serde(default)]
334 pub request_id: String,
335 pub result_code: ResultCode,
336}
337#[allow(deprecated)]
338#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
339#[doc = "Enables the |SmartCardEmulation| domain."]
340pub struct EnableReturnObject(pub Option<Json>);
341#[allow(deprecated)]
342#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
343#[doc = "Disables the |SmartCardEmulation| domain."]
344pub struct DisableReturnObject(pub Option<Json>);
345#[allow(deprecated)]
346#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
347#[doc = "Reports the successful result of a |SCardEstablishContext| call.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext>"]
348pub struct ReportEstablishContextResultReturnObject(pub Option<Json>);
349#[allow(deprecated)]
350#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
351#[doc = "Reports the successful result of a |SCardReleaseContext| call.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext>"]
352pub struct ReportReleaseContextResultReturnObject(pub Option<Json>);
353#[allow(deprecated)]
354#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
355#[doc = "Reports the successful result of a |SCardListReaders| call.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa>"]
356pub struct ReportListReadersResultReturnObject(pub Option<Json>);
357#[allow(deprecated)]
358#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
359#[doc = "Reports the successful result of a |SCardGetStatusChange| call.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea>"]
360pub struct ReportGetStatusChangeResultReturnObject(pub Option<Json>);
361#[allow(deprecated)]
362#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
363#[doc = "Reports the result of a |SCardBeginTransaction| call.\n On success, this creates a new transaction object.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction>"]
364pub struct ReportBeginTransactionResultReturnObject(pub Option<Json>);
365#[allow(deprecated)]
366#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
367#[doc = "Reports the successful result of a call that returns only a result code.\n Used for: |SCardCancel|, |SCardDisconnect|, |SCardSetAttrib|, |SCardEndTransaction|.\n \n This maps to:\n 1. SCardCancel\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel>\n \n 2. SCardDisconnect\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect>\n \n 3. SCardSetAttrib\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib>\n \n 4. SCardEndTransaction\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction>"]
368pub struct ReportPlainResultReturnObject(pub Option<Json>);
369#[allow(deprecated)]
370#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
371#[doc = "Reports the successful result of a |SCardConnect| call.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta>"]
372pub struct ReportConnectResultReturnObject(pub Option<Json>);
373#[allow(deprecated)]
374#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
375#[doc = "Reports the successful result of a call that sends back data on success.\n Used for |SCardTransmit|, |SCardControl|, and |SCardGetAttrib|.\n \n This maps to:\n 1. SCardTransmit\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit>\n \n 2. SCardControl\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol>\n \n 3. SCardGetAttrib\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib>"]
376pub struct ReportDataResultReturnObject(pub Option<Json>);
377#[allow(deprecated)]
378#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
379#[doc = "Reports the successful result of a |SCardStatus| call.\n \n This maps to:\n PC/SC Lite: <https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382>\n Microsoft: <https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa>"]
380pub struct ReportStatusResultReturnObject(pub Option<Json>);
381#[allow(deprecated)]
382#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
383#[doc = "Reports an error result for the given request."]
384pub struct ReportErrorReturnObject(pub Option<Json>);
385#[allow(deprecated)]
386impl Method for Enable {
387 const NAME: &'static str = "SmartCardEmulation.enable";
388 type ReturnObject = EnableReturnObject;
389}
390#[allow(deprecated)]
391impl Method for Disable {
392 const NAME: &'static str = "SmartCardEmulation.disable";
393 type ReturnObject = DisableReturnObject;
394}
395#[allow(deprecated)]
396impl Method for ReportEstablishContextResult {
397 const NAME: &'static str = "SmartCardEmulation.reportEstablishContextResult";
398 type ReturnObject = ReportEstablishContextResultReturnObject;
399}
400#[allow(deprecated)]
401impl Method for ReportReleaseContextResult {
402 const NAME: &'static str = "SmartCardEmulation.reportReleaseContextResult";
403 type ReturnObject = ReportReleaseContextResultReturnObject;
404}
405#[allow(deprecated)]
406impl Method for ReportListReadersResult {
407 const NAME: &'static str = "SmartCardEmulation.reportListReadersResult";
408 type ReturnObject = ReportListReadersResultReturnObject;
409}
410#[allow(deprecated)]
411impl Method for ReportGetStatusChangeResult {
412 const NAME: &'static str = "SmartCardEmulation.reportGetStatusChangeResult";
413 type ReturnObject = ReportGetStatusChangeResultReturnObject;
414}
415#[allow(deprecated)]
416impl Method for ReportBeginTransactionResult {
417 const NAME: &'static str = "SmartCardEmulation.reportBeginTransactionResult";
418 type ReturnObject = ReportBeginTransactionResultReturnObject;
419}
420#[allow(deprecated)]
421impl Method for ReportPlainResult {
422 const NAME: &'static str = "SmartCardEmulation.reportPlainResult";
423 type ReturnObject = ReportPlainResultReturnObject;
424}
425#[allow(deprecated)]
426impl Method for ReportConnectResult {
427 const NAME: &'static str = "SmartCardEmulation.reportConnectResult";
428 type ReturnObject = ReportConnectResultReturnObject;
429}
430#[allow(deprecated)]
431impl Method for ReportDataResult {
432 const NAME: &'static str = "SmartCardEmulation.reportDataResult";
433 type ReturnObject = ReportDataResultReturnObject;
434}
435#[allow(deprecated)]
436impl Method for ReportStatusResult {
437 const NAME: &'static str = "SmartCardEmulation.reportStatusResult";
438 type ReturnObject = ReportStatusResultReturnObject;
439}
440#[allow(deprecated)]
441impl Method for ReportError {
442 const NAME: &'static str = "SmartCardEmulation.reportError";
443 type ReturnObject = ReportErrorReturnObject;
444}
445#[allow(dead_code)]
446pub mod events {
447 #[allow(unused_imports)]
448 use super::super::types::*;
449 #[allow(unused_imports)]
450 use derive_builder::Builder;
451 #[allow(unused_imports)]
452 use serde::{Deserialize, Serialize};
453 #[allow(unused_imports)]
454 use serde_json::Value as Json;
455 #[allow(deprecated)]
456 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
457 pub struct EstablishContextRequestedEvent {
458 pub params: EstablishContextRequestedEventParams,
459 }
460 #[allow(deprecated)]
461 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
462 #[serde(rename_all = "camelCase")]
463 pub struct EstablishContextRequestedEventParams {
464 #[serde(default)]
465 pub request_id: String,
466 }
467 #[allow(deprecated)]
468 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
469 pub struct ReleaseContextRequestedEvent {
470 pub params: ReleaseContextRequestedEventParams,
471 }
472 #[allow(deprecated)]
473 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
474 #[serde(rename_all = "camelCase")]
475 pub struct ReleaseContextRequestedEventParams {
476 #[serde(default)]
477 pub request_id: String,
478 #[serde(default)]
479 pub context_id: JsUInt,
480 }
481 #[allow(deprecated)]
482 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
483 pub struct ListReadersRequestedEvent {
484 pub params: ListReadersRequestedEventParams,
485 }
486 #[allow(deprecated)]
487 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
488 #[serde(rename_all = "camelCase")]
489 pub struct ListReadersRequestedEventParams {
490 #[serde(default)]
491 pub request_id: String,
492 #[serde(default)]
493 pub context_id: JsUInt,
494 }
495 #[allow(deprecated)]
496 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
497 pub struct GetStatusChangeRequestedEvent {
498 pub params: GetStatusChangeRequestedEventParams,
499 }
500 #[allow(deprecated)]
501 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
502 #[serde(rename_all = "camelCase")]
503 pub struct GetStatusChangeRequestedEventParams {
504 #[serde(default)]
505 pub request_id: String,
506 #[serde(default)]
507 pub context_id: JsUInt,
508 pub reader_states: Vec<super::ReaderStateIn>,
509 #[builder(default)]
510 #[serde(skip_serializing_if = "Option::is_none")]
511 #[serde(default)]
512 #[doc = "in milliseconds, if absent, it means \"infinite\""]
513 pub timeout: Option<JsUInt>,
514 }
515 #[allow(deprecated)]
516 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
517 pub struct CancelRequestedEvent {
518 pub params: CancelRequestedEventParams,
519 }
520 #[allow(deprecated)]
521 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
522 #[serde(rename_all = "camelCase")]
523 pub struct CancelRequestedEventParams {
524 #[serde(default)]
525 pub request_id: String,
526 #[serde(default)]
527 pub context_id: JsUInt,
528 }
529 #[allow(deprecated)]
530 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
531 pub struct ConnectRequestedEvent {
532 pub params: ConnectRequestedEventParams,
533 }
534 #[allow(deprecated)]
535 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
536 #[serde(rename_all = "camelCase")]
537 pub struct ConnectRequestedEventParams {
538 #[serde(default)]
539 pub request_id: String,
540 #[serde(default)]
541 pub context_id: JsUInt,
542 #[serde(default)]
543 pub reader: String,
544 pub share_mode: super::ShareMode,
545 pub preferred_protocols: super::ProtocolSet,
546 }
547 #[allow(deprecated)]
548 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
549 pub struct DisconnectRequestedEvent {
550 pub params: DisconnectRequestedEventParams,
551 }
552 #[allow(deprecated)]
553 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
554 #[serde(rename_all = "camelCase")]
555 pub struct DisconnectRequestedEventParams {
556 #[serde(default)]
557 pub request_id: String,
558 #[serde(default)]
559 pub handle: JsUInt,
560 pub disposition: super::Disposition,
561 }
562 #[allow(deprecated)]
563 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
564 pub struct TransmitRequestedEvent {
565 pub params: TransmitRequestedEventParams,
566 }
567 #[allow(deprecated)]
568 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
569 #[serde(rename_all = "camelCase")]
570 pub struct TransmitRequestedEventParams {
571 #[serde(default)]
572 pub request_id: String,
573 #[serde(default)]
574 pub handle: JsUInt,
575 #[serde(default)]
576 pub data: String,
577 #[builder(default)]
578 #[serde(skip_serializing_if = "Option::is_none")]
579 pub protocol: Option<super::Protocol>,
580 }
581 #[allow(deprecated)]
582 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
583 pub struct ControlRequestedEvent {
584 pub params: ControlRequestedEventParams,
585 }
586 #[allow(deprecated)]
587 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
588 #[serde(rename_all = "camelCase")]
589 pub struct ControlRequestedEventParams {
590 #[serde(default)]
591 pub request_id: String,
592 #[serde(default)]
593 pub handle: JsUInt,
594 #[serde(default)]
595 pub control_code: JsUInt,
596 #[serde(default)]
597 pub data: String,
598 }
599 #[allow(deprecated)]
600 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
601 pub struct GetAttribRequestedEvent {
602 pub params: GetAttribRequestedEventParams,
603 }
604 #[allow(deprecated)]
605 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
606 #[serde(rename_all = "camelCase")]
607 pub struct GetAttribRequestedEventParams {
608 #[serde(default)]
609 pub request_id: String,
610 #[serde(default)]
611 pub handle: JsUInt,
612 #[serde(default)]
613 pub attrib_id: JsUInt,
614 }
615 #[allow(deprecated)]
616 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
617 pub struct SetAttribRequestedEvent {
618 pub params: SetAttribRequestedEventParams,
619 }
620 #[allow(deprecated)]
621 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
622 #[serde(rename_all = "camelCase")]
623 pub struct SetAttribRequestedEventParams {
624 #[serde(default)]
625 pub request_id: String,
626 #[serde(default)]
627 pub handle: JsUInt,
628 #[serde(default)]
629 pub attrib_id: JsUInt,
630 #[serde(default)]
631 pub data: String,
632 }
633 #[allow(deprecated)]
634 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
635 pub struct StatusRequestedEvent {
636 pub params: StatusRequestedEventParams,
637 }
638 #[allow(deprecated)]
639 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
640 #[serde(rename_all = "camelCase")]
641 pub struct StatusRequestedEventParams {
642 #[serde(default)]
643 pub request_id: String,
644 #[serde(default)]
645 pub handle: JsUInt,
646 }
647 #[allow(deprecated)]
648 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
649 pub struct BeginTransactionRequestedEvent {
650 pub params: BeginTransactionRequestedEventParams,
651 }
652 #[allow(deprecated)]
653 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
654 #[serde(rename_all = "camelCase")]
655 pub struct BeginTransactionRequestedEventParams {
656 #[serde(default)]
657 pub request_id: String,
658 #[serde(default)]
659 pub handle: JsUInt,
660 }
661 #[allow(deprecated)]
662 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
663 pub struct EndTransactionRequestedEvent {
664 pub params: EndTransactionRequestedEventParams,
665 }
666 #[allow(deprecated)]
667 #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
668 #[serde(rename_all = "camelCase")]
669 pub struct EndTransactionRequestedEventParams {
670 #[serde(default)]
671 pub request_id: String,
672 #[serde(default)]
673 pub handle: JsUInt,
674 pub disposition: super::Disposition,
675 }
676}