1 | "use strict";
|
2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7 | };
|
8 | var plugin_1 = require('./plugin');
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | var BluetoothSerial = (function () {
|
36 | function BluetoothSerial() {
|
37 | }
|
38 | |
39 |
|
40 |
|
41 |
|
42 |
|
43 | BluetoothSerial.connect = function (macAddress_or_uuid) { return; };
|
44 | |
45 |
|
46 |
|
47 |
|
48 |
|
49 | BluetoothSerial.connectInsecure = function (macAddress) { return; };
|
50 | |
51 |
|
52 |
|
53 |
|
54 | BluetoothSerial.disconnect = function () { return; };
|
55 | |
56 |
|
57 |
|
58 |
|
59 |
|
60 | BluetoothSerial.write = function (data) { return; };
|
61 | |
62 |
|
63 |
|
64 |
|
65 | BluetoothSerial.available = function () { return; };
|
66 | |
67 |
|
68 |
|
69 |
|
70 | BluetoothSerial.read = function () { return; };
|
71 | |
72 |
|
73 |
|
74 |
|
75 |
|
76 | BluetoothSerial.readUntil = function (delimiter) { return; };
|
77 | |
78 |
|
79 |
|
80 |
|
81 |
|
82 | BluetoothSerial.subscribe = function (delimiter) { return; };
|
83 | |
84 |
|
85 |
|
86 |
|
87 | BluetoothSerial.subscribeRawData = function () { return; };
|
88 | |
89 |
|
90 |
|
91 |
|
92 | BluetoothSerial.clear = function () { return; };
|
93 | |
94 |
|
95 |
|
96 |
|
97 | BluetoothSerial.list = function () { return; };
|
98 | |
99 |
|
100 |
|
101 |
|
102 | BluetoothSerial.isEnabled = function () { return; };
|
103 | |
104 |
|
105 |
|
106 |
|
107 | BluetoothSerial.isConnected = function () { return; };
|
108 | |
109 |
|
110 |
|
111 |
|
112 | BluetoothSerial.readRSSI = function () { return; };
|
113 | |
114 |
|
115 |
|
116 |
|
117 | BluetoothSerial.showBluetoothSettings = function () { return; };
|
118 | |
119 |
|
120 |
|
121 |
|
122 | BluetoothSerial.enable = function () { return; };
|
123 | |
124 |
|
125 |
|
126 |
|
127 | BluetoothSerial.discoverUnpaired = function () { return; };
|
128 | |
129 |
|
130 |
|
131 |
|
132 | BluetoothSerial.setDeviceDiscoveredListener = function () { return; };
|
133 | |
134 |
|
135 |
|
136 |
|
137 | BluetoothSerial.setName = function (newName) { };
|
138 | |
139 |
|
140 |
|
141 |
|
142 | BluetoothSerial.setDiscoverable = function (discoverableDuration) { };
|
143 | __decorate([
|
144 | plugin_1.Cordova({
|
145 | platforms: ['Android', 'iOS', 'Windows Phone'],
|
146 | observable: true,
|
147 | clearFunction: 'disconnect'
|
148 | })
|
149 | ], BluetoothSerial, "connect", null);
|
150 | __decorate([
|
151 | plugin_1.Cordova({
|
152 | platforms: ['Android'],
|
153 | observable: true,
|
154 | clearFunction: 'disconnect'
|
155 | })
|
156 | ], BluetoothSerial, "connectInsecure", null);
|
157 | __decorate([
|
158 | plugin_1.Cordova()
|
159 | ], BluetoothSerial, "disconnect", null);
|
160 | __decorate([
|
161 | plugin_1.Cordova({
|
162 | platforms: ['Android', 'iOS', 'Windows Phone']
|
163 | })
|
164 | ], BluetoothSerial, "write", null);
|
165 | __decorate([
|
166 | plugin_1.Cordova({
|
167 | platforms: ['Android', 'iOS', 'Windows Phone']
|
168 | })
|
169 | ], BluetoothSerial, "available", null);
|
170 | __decorate([
|
171 | plugin_1.Cordova({
|
172 | platforms: ['Android', 'iOS', 'Windows Phone']
|
173 | })
|
174 | ], BluetoothSerial, "read", null);
|
175 | __decorate([
|
176 | plugin_1.Cordova({
|
177 | platforms: ['Android', 'iOS', 'Windows Phone']
|
178 | })
|
179 | ], BluetoothSerial, "readUntil", null);
|
180 | __decorate([
|
181 | plugin_1.Cordova({
|
182 | platforms: ['Android', 'iOS', 'Windows Phone'],
|
183 | observable: true,
|
184 | clearFunction: 'unsubscribe'
|
185 | })
|
186 | ], BluetoothSerial, "subscribe", null);
|
187 | __decorate([
|
188 | plugin_1.Cordova({
|
189 | platforms: ['Android', 'iOS', 'Windows Phone'],
|
190 | observable: true,
|
191 | clearFunction: 'unsubscribeRawData'
|
192 | })
|
193 | ], BluetoothSerial, "subscribeRawData", null);
|
194 | __decorate([
|
195 | plugin_1.Cordova({
|
196 | platforms: ['Android', 'iOS', 'Windows Phone']
|
197 | })
|
198 | ], BluetoothSerial, "clear", null);
|
199 | __decorate([
|
200 | plugin_1.Cordova({
|
201 | platforms: ['Android', 'iOS', 'Windows Phone']
|
202 | })
|
203 | ], BluetoothSerial, "list", null);
|
204 | __decorate([
|
205 | plugin_1.Cordova({
|
206 | platforms: ['Android', 'iOS', 'Windows Phone']
|
207 | })
|
208 | ], BluetoothSerial, "isEnabled", null);
|
209 | __decorate([
|
210 | plugin_1.Cordova({
|
211 | platforms: ['Android', 'iOS', 'Windows Phone']
|
212 | })
|
213 | ], BluetoothSerial, "isConnected", null);
|
214 | __decorate([
|
215 | plugin_1.Cordova({
|
216 | platforms: ['Android', 'iOS', 'Windows Phone']
|
217 | })
|
218 | ], BluetoothSerial, "readRSSI", null);
|
219 | __decorate([
|
220 | plugin_1.Cordova({
|
221 | platforms: ['Android', 'iOS', 'Windows Phone']
|
222 | })
|
223 | ], BluetoothSerial, "showBluetoothSettings", null);
|
224 | __decorate([
|
225 | plugin_1.Cordova({
|
226 | platforms: ['Android', 'iOS', 'Windows Phone']
|
227 | })
|
228 | ], BluetoothSerial, "enable", null);
|
229 | __decorate([
|
230 | plugin_1.Cordova({
|
231 | platforms: ['Android', 'iOS', 'Windows Phone']
|
232 | })
|
233 | ], BluetoothSerial, "discoverUnpaired", null);
|
234 | __decorate([
|
235 | plugin_1.Cordova({
|
236 | platforms: ['Android', 'iOS', 'Windows Phone'],
|
237 | observable: true,
|
238 | clearFunction: 'clearDeviceDiscoveredListener'
|
239 | })
|
240 | ], BluetoothSerial, "setDeviceDiscoveredListener", null);
|
241 | __decorate([
|
242 | plugin_1.Cordova({
|
243 | platforms: ['Android'],
|
244 | sync: true
|
245 | })
|
246 | ], BluetoothSerial, "setName", null);
|
247 | __decorate([
|
248 | plugin_1.Cordova({
|
249 | platforms: ['Android'],
|
250 | sync: true
|
251 | })
|
252 | ], BluetoothSerial, "setDiscoverable", null);
|
253 | BluetoothSerial = __decorate([
|
254 | plugin_1.Plugin({
|
255 | pluginName: 'BluetoothSerial',
|
256 | repo: 'https://github.com/don/BluetoothSerial',
|
257 | plugin: 'cordova-plugin-bluetooth-serial',
|
258 | pluginRef: 'bluetoothSerial',
|
259 | platforms: ['Android', 'iOS', 'Windows Phone', 'Browser']
|
260 | })
|
261 | ], BluetoothSerial);
|
262 | return BluetoothSerial;
|
263 | }());
|
264 | exports.BluetoothSerial = BluetoothSerial;
|
265 |
|
\ | No newline at end of file |