@captureid/capacitor-cidprint 5.0.53 → 5.0.55

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
@@ -7,7 +7,7 @@ This plugin enables you to use the CaptureID Printer Library and to easily integ
7
7
 
8
8
  ## Release Notes
9
9
 
10
- ### version 5.0.53
10
+ ### version 5.0.54
11
11
 
12
12
  new:
13
13
  ### setTimeouts interface changed
@@ -1,4 +1,4 @@
1
- arguments=--init-script /var/folders/36/vrff655n3pz5syqsvcw57qx00000gn/T/db3b08fc4a9ef609cb16b96b200fa13e563f396e9bb1ed0905fdab7bc3bc513b.gradle --init-script /var/folders/36/vrff655n3pz5syqsvcw57qx00000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
1
+ arguments=--init-script /var/folders/36/vrff655n3pz5syqsvcw57qx00000gn/T/db3b08fc4a9ef609cb16b96b200fa13e563f396e9bb1ed0905fdab7bc3bc513b.gradle --init-script /var/folders/36/vrff655n3pz5syqsvcw57qx00000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle --init-script /var/folders/36/vrff655n3pz5syqsvcw57qx00000gn/T/861a75667e10803d304a058d833cb7404195ca44013d0d61d3b653eb084379b8.gradle --init-script /var/folders/36/vrff655n3pz5syqsvcw57qx00000gn/T/68eb1b6516fe21c6fbba58e63c99c3207ccfc918360613709367eecde56fa77f.gradle --init-script /var/folders/36/vrff655n3pz5syqsvcw57qx00000gn/T/da64152279c70a8b4f3de4ca9ea66fd3b3405b7aca4e1f20f2d08e5593aa1ce1.gradle
2
2
  auto.sync=false
3
3
  build.scans.enabled=false
4
4
  connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
@@ -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
- call.getInt("gap", 0),
183
- call.getInt("timeout", 15000),
184
- call.getInt("status", 500),
185
- call.getInt("information", 1000),
186
- call.getInt("formfeed", 200),
187
- call.getInt("detect", 400));
213
+ options.gap,
214
+ options.timeout,
215
+ options.status,
216
+ options.information,
217
+ options.formfeed,
218
+ options.detect);
188
219
  }
189
220
  }
190
221
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@captureid/capacitor-cidprint",
3
- "version": "5.0.53",
3
+ "version": "5.0.55",
4
4
  "description": "CaptureID Printer Plugin",
5
5
  "main": "dist/plugin.js",
6
6
  "module": "dist/esm/index.js",