@captureid/capacitor-cidprint 5.0.53 → 5.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -78,6 +78,36 @@ public class CIDPrint extends Plugin {
|
|
|
78
78
|
|
|
79
79
|
private String _activateLicenseCallbackID = "";
|
|
80
80
|
private String _enableBluetoothCallbackID = "";
|
|
81
|
+
|
|
82
|
+
private static final class TimeoutOptions {
|
|
83
|
+
final int gap;
|
|
84
|
+
final int timeout;
|
|
85
|
+
final int status;
|
|
86
|
+
final int information;
|
|
87
|
+
final int formfeed;
|
|
88
|
+
final int detect;
|
|
89
|
+
|
|
90
|
+
private TimeoutOptions(int gap, int timeout, int status, int information, int formfeed, int detect) {
|
|
91
|
+
this.gap = gap;
|
|
92
|
+
this.timeout = timeout;
|
|
93
|
+
this.status = status;
|
|
94
|
+
this.information = information;
|
|
95
|
+
this.formfeed = formfeed;
|
|
96
|
+
this.detect = detect;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
static TimeoutOptions fromCall(PluginCall call) {
|
|
100
|
+
return new TimeoutOptions(
|
|
101
|
+
call.getInt("gap", 0),
|
|
102
|
+
call.getInt("timeout", 15000),
|
|
103
|
+
call.getInt("status", 500),
|
|
104
|
+
call.getInt("information", 1000),
|
|
105
|
+
call.getInt("formfeed", 200),
|
|
106
|
+
call.getInt("detect", 400)
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
81
111
|
public CIDPrint() {
|
|
82
112
|
super();
|
|
83
113
|
}
|
|
@@ -178,13 +208,14 @@ public class CIDPrint extends Plugin {
|
|
|
178
208
|
@PluginMethod
|
|
179
209
|
public void setTimeouts(PluginCall call) {
|
|
180
210
|
if(_isInitialized) {
|
|
211
|
+
TimeoutOptions options = TimeoutOptions.fromCall(call);
|
|
181
212
|
_printerlibrary.setTimeouts(
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
213
|
+
options.gap,
|
|
214
|
+
options.timeout,
|
|
215
|
+
options.status,
|
|
216
|
+
options.information,
|
|
217
|
+
options.formfeed,
|
|
218
|
+
options.detect);
|
|
188
219
|
}
|
|
189
220
|
}
|
|
190
221
|
|