bluetooth-serial-port 3.0.1 → 3.0.3

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.
Files changed (35) hide show
  1. package/.circleci/config.yml +29 -17
  2. package/Dockerfile +1 -1
  3. package/README.md +3 -2
  4. package/RELEASE_NOTES.md +10 -0
  5. package/appveyor.yml +11 -16
  6. package/package.json +3 -3
  7. package/src/linux/BTSerialPortBinding.cc +1 -0
  8. package/src/linux/DeviceINQ.cc +7 -1
  9. package/src/windows/BTSerialPortBinding.cc +1 -0
  10. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv.h +0 -1724
  11. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv.h.blob +0 -0
  12. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@darwin.h +0 -61
  13. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@darwin.h.blob +0 -0
  14. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@errno.h +0 -443
  15. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@errno.h.blob +0 -0
  16. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@threadpool.h +0 -37
  17. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@threadpool.h.blob +0 -0
  18. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@unix.h +0 -491
  19. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@unix.h.blob +0 -0
  20. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@version.h +0 -43
  21. package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@version.h.blob +0 -0
  22. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@DeviceINQ.h +0 -78
  23. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@DeviceINQ.h.blob +0 -0
  24. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@BTSerialPortBinding.cc +0 -404
  25. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@BTSerialPortBinding.cc.blob +0 -0
  26. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@BluetoothSerialPort.cc +0 -23
  27. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@BluetoothSerialPort.cc.blob +0 -0
  28. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@DeviceINQ.cc +0 -369
  29. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@DeviceINQ.cc.blob +0 -0
  30. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@windows@BluetoothHelpers.h +0 -24
  31. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@windows@BluetoothHelpers.h.blob +0 -0
  32. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@windows@DeviceINQ.cc +0 -527
  33. package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@windows@DeviceINQ.cc.blob +0 -0
  34. package/Dockerfile.bk +0 -13
  35. package/qemu-arm-static +0 -0
@@ -1,404 +0,0 @@
1
- /*
2
- * Copyright (c) 2012-2013, Eelco Cramer
3
- * All rights reserved.
4
- *
5
- * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6
- *
7
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10
- */
11
-
12
- #include <v8.h>
13
- #include <node.h>
14
- #include <nan.h>
15
- #include <node_buffer.h>
16
- #include <string.h>
17
- #include <stdlib.h>
18
- #include <unistd.h>
19
- #include "BTSerialPortBinding.h"
20
-
21
- extern "C"{
22
- #include <stdio.h>
23
- #include <errno.h>
24
- #include <fcntl.h>
25
- #include <unistd.h>
26
- #include <stdlib.h>
27
- #include <signal.h>
28
- #include <termios.h>
29
- #include <sys/poll.h>
30
- #include <sys/ioctl.h>
31
- #include <sys/socket.h>
32
- #include <sys/types.h>
33
- #include <assert.h>
34
-
35
-
36
- #include <bluetooth/bluetooth.h>
37
- #include <bluetooth/hci.h>
38
- #include <bluetooth/hci_lib.h>
39
- #include <bluetooth/sdp.h>
40
- #include <bluetooth/sdp_lib.h>
41
- #include <bluetooth/rfcomm.h>
42
- }
43
-
44
- using namespace std;
45
- using namespace node;
46
- using namespace v8;
47
-
48
- static uv_mutex_t write_queue_mutex;
49
- static ngx_queue_t write_queue;
50
-
51
- void BTSerialPortBinding::EIO_Connect(uv_work_t *req) {
52
- connect_baton_t *baton = static_cast<connect_baton_t *>(req->data);
53
-
54
- struct sockaddr_rc addr = {
55
- 0x00,
56
- { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
57
- 0x00
58
- };
59
-
60
- // allocate a socket
61
- baton->rfcomm->s = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
62
-
63
- // set the connection parameters (who to connect to)
64
- addr.rc_family = AF_BLUETOOTH;
65
- addr.rc_channel = (uint8_t) baton->channelID;
66
- str2ba( baton->address, &addr.rc_bdaddr );
67
-
68
- // connect to server
69
- baton->status = connect(baton->rfcomm->s, (struct sockaddr *)&addr, sizeof(addr));
70
-
71
- int sock_flags = fcntl(baton->rfcomm->s, F_GETFL, 0);
72
- fcntl(baton->rfcomm->s, F_SETFL, sock_flags | O_NONBLOCK);
73
- }
74
-
75
- void BTSerialPortBinding::EIO_AfterConnect(uv_work_t *req) {
76
- Nan::HandleScope scope;
77
-
78
- connect_baton_t *baton = static_cast<connect_baton_t *>(req->data);
79
-
80
- Nan::TryCatch try_catch;
81
-
82
- if (baton->status == 0) {
83
- baton->cb->Call(0, NULL);
84
- } else {
85
- char msg[80];
86
- sprintf(msg, "Cannot connect: %d", baton->status);
87
- Local<Value> argv[] = {
88
- Nan::Error(msg)
89
- };
90
- baton->ecb->Call(1, argv);
91
- }
92
-
93
- if (try_catch.HasCaught()) {
94
- Nan::FatalException(try_catch);
95
- }
96
-
97
- baton->rfcomm->Unref();
98
- delete baton->cb;
99
- delete baton->ecb;
100
- delete baton;
101
- baton = NULL;
102
- }
103
-
104
- void BTSerialPortBinding::EIO_Write(uv_work_t *req) {
105
- queued_write_t *queuedWrite = static_cast<queued_write_t*>(req->data);
106
- write_baton_t *data = static_cast<write_baton_t*>(queuedWrite->baton);
107
-
108
- BTSerialPortBinding* rfcomm = data->rfcomm;
109
- int bytesToSend = data->bufferLength;
110
- data->result = 0;
111
-
112
- if (rfcomm->s != 0) {
113
- do {
114
- int bytesSent = write(rfcomm->s, data->bufferData+data->result, bytesToSend);
115
- if (bytesSent >= 0) {
116
- bytesToSend -= bytesSent;
117
- data->result += bytesSent;
118
- } else {
119
- sprintf(data->errorString, "Writing attempt was unsuccessful");
120
- break;
121
- }
122
- } while (bytesToSend > 0);
123
- } else {
124
- sprintf(data->errorString, "Attempting to write to a closed connection");
125
- }
126
- }
127
-
128
- void BTSerialPortBinding::EIO_AfterWrite(uv_work_t *req) {
129
- Nan::HandleScope scope;
130
-
131
- queued_write_t *queuedWrite = static_cast<queued_write_t*>(req->data);
132
- write_baton_t *data = static_cast<write_baton_t*>(queuedWrite->baton);
133
-
134
- Local<Value> argv[2];
135
- if (data->errorString[0]) {
136
- argv[0] = Nan::Error(data->errorString);
137
- argv[1] = Nan::Undefined();
138
- } else {
139
- argv[0] = Nan::Undefined();
140
- argv[1] = Nan::New<v8::Integer>((int32_t)data->result);
141
- }
142
-
143
- data->callback->Call(2, argv);
144
-
145
- uv_mutex_lock(&write_queue_mutex);
146
- ngx_queue_remove(&queuedWrite->queue);
147
-
148
- if (!ngx_queue_empty(&write_queue)) {
149
- // Always pull the next work item from the head of the queue
150
- ngx_queue_t* head = ngx_queue_head(&write_queue);
151
- queued_write_t* nextQueuedWrite = ngx_queue_data(head, queued_write_t, queue);
152
- uv_queue_work(uv_default_loop(), &nextQueuedWrite->req, EIO_Write, (uv_after_work_cb)EIO_AfterWrite);
153
- }
154
- uv_mutex_unlock(&write_queue_mutex);
155
-
156
- data->buffer.Reset();
157
- delete data->callback;
158
- data->rfcomm->Unref();
159
- delete data;
160
- delete queuedWrite;
161
- }
162
-
163
- void BTSerialPortBinding::EIO_Read(uv_work_t *req) {
164
- unsigned char buf[1024]= { 0 };
165
-
166
- read_baton_t *baton = static_cast<read_baton_t *>(req->data);
167
-
168
- memset(buf, 0, sizeof(buf));
169
-
170
- fd_set set;
171
- FD_ZERO(&set);
172
- FD_SET(baton->rfcomm->s, &set);
173
- FD_SET(baton->rfcomm->rep[0], &set);
174
-
175
- int nfds = (baton->rfcomm->s > baton->rfcomm->rep[0]) ? baton->rfcomm->s : baton->rfcomm->rep[0];
176
-
177
- if (pselect(nfds + 1, &set, NULL, NULL, NULL, NULL) >= 0) {
178
- if (FD_ISSET(baton->rfcomm->s, &set)) {
179
- baton->size = read(baton->rfcomm->s, buf, sizeof(buf));
180
- } else {
181
- // when no data is read from rfcomm the connection has been closed.
182
- baton->size = 0;
183
- }
184
-
185
- // determine if we read anything that we can copy.
186
- if (baton->size > 0) {
187
- memcpy(baton->result, buf, baton->size);
188
- }
189
- }
190
- }
191
-
192
- void BTSerialPortBinding::EIO_AfterRead(uv_work_t *req) {
193
- Nan::HandleScope scope;
194
-
195
- read_baton_t *baton = static_cast<read_baton_t *>(req->data);
196
-
197
- Nan::TryCatch try_catch;
198
-
199
- Local<Value> argv[2];
200
-
201
- if (baton->size < 0) {
202
- argv[0] = Nan::Error("Error reading from connection");
203
- argv[1] = Nan::Undefined();
204
- } else {
205
- Local<Object> globalObj = Nan::GetCurrentContext()->Global();
206
- Local<Function> bufferConstructor = Local<Function>::Cast(globalObj->Get(Nan::New("Buffer").ToLocalChecked()));
207
- Local<Value> constructorArgs[1] = { Nan::New<v8::Integer>(baton->size) };
208
- Local<Object> resultBuffer = Nan::NewInstance(bufferConstructor, 1, constructorArgs).ToLocalChecked();
209
- memcpy(Buffer::Data(resultBuffer), baton->result, baton->size);
210
-
211
- argv[0] = Nan::Undefined();
212
- argv[1] = resultBuffer;
213
- }
214
-
215
- baton->cb->Call(2, argv);
216
-
217
- if (try_catch.HasCaught()) {
218
- Nan::FatalException(try_catch);
219
- }
220
-
221
- baton->rfcomm->Unref();
222
- delete baton->cb;
223
- delete baton;
224
-
225
- baton = NULL;
226
- }
227
-
228
- void BTSerialPortBinding::Init(Local<Object> target) {
229
- Nan::HandleScope scope;
230
-
231
- Local<FunctionTemplate> t = Nan::New<FunctionTemplate>(New);
232
-
233
- t->InstanceTemplate()->SetInternalFieldCount(1);
234
- t->SetClassName(Nan::New("BTSerialPortBinding").ToLocalChecked());
235
-
236
- Isolate *isolate = target->GetIsolate();
237
- Local<Context> ctx = isolate->GetCurrentContext();
238
-
239
- Nan::SetPrototypeMethod(t, "write", Write);
240
- Nan::SetPrototypeMethod(t, "read", Read);
241
- Nan::SetPrototypeMethod(t, "close", Close);
242
- target->Set(Nan::New("BTSerialPortBinding").ToLocalChecked(), t->GetFunction(ctx).ToLocalChecked());
243
- }
244
-
245
- BTSerialPortBinding::BTSerialPortBinding() :
246
- s(0) {
247
- }
248
-
249
- BTSerialPortBinding::~BTSerialPortBinding() {
250
-
251
- }
252
-
253
- NAN_METHOD(BTSerialPortBinding::New) {
254
- uv_mutex_init(&write_queue_mutex);
255
- ngx_queue_init(&write_queue);
256
-
257
- const char *usage = "usage: BTSerialPortBinding(address, channelID, callback, error)";
258
- if (info.Length() != 4) {
259
- return Nan::ThrowError(usage);
260
- }
261
-
262
- String::Utf8Value address(info.GetIsolate(), info[0]);
263
-
264
- int channelID = info[1]->Int32Value(Nan::GetCurrentContext()).ToChecked();
265
- if (channelID <= 0) {
266
- return Nan::ThrowTypeError("ChannelID should be a positive int value.");
267
- }
268
-
269
- BTSerialPortBinding* rfcomm = new BTSerialPortBinding();
270
- rfcomm->Wrap(info.This());
271
-
272
- connect_baton_t *baton = new connect_baton_t();
273
- baton->rfcomm = Nan::ObjectWrap::Unwrap<BTSerialPortBinding>(info.This());
274
- baton->channelID = channelID;
275
-
276
- // allocate an error pipe
277
- if (pipe(baton->rfcomm->rep) == -1) {
278
- Nan::ThrowError("Cannot create pipe for reading.");
279
- }
280
-
281
- int flags = fcntl(baton->rfcomm->rep[0], F_GETFL, 0);
282
- fcntl(baton->rfcomm->rep[0], F_SETFL, flags | O_NONBLOCK);
283
-
284
- strcpy(baton->address, *address);
285
- baton->cb = new Nan::Callback(info[2].As<Function>());
286
- baton->ecb = new Nan::Callback(info[3].As<Function>());
287
- baton->request.data = baton;
288
- baton->rfcomm->Ref();
289
-
290
- uv_queue_work(uv_default_loop(), &baton->request, EIO_Connect, (uv_after_work_cb)EIO_AfterConnect);
291
-
292
- info.GetReturnValue().Set(info.This());
293
- }
294
-
295
- NAN_METHOD(BTSerialPortBinding::Write) {
296
- // usage
297
- if (info.Length() != 3) {
298
- return Nan::ThrowError("usage: write(buf, address, callback)");
299
- }
300
-
301
- // buffer
302
- if(!info[0]->IsObject() || !Buffer::HasInstance(info[0])) {
303
- return Nan::ThrowTypeError("First argument must be a buffer");
304
- }
305
-
306
- Local<Object> bufferObject = info[0].As<Object>();
307
- char* bufferData = Buffer::Data(bufferObject);
308
- size_t bufferLength = Buffer::Length(bufferObject);
309
-
310
- // string
311
- if (!info[1]->IsString()) {
312
- return Nan::ThrowTypeError("Second argument must be a string");
313
- }
314
- //NOTE: The address argument is currently only used in OSX.
315
- // On linux each connection is handled by a separate object.
316
-
317
- // callback
318
- if(!info[2]->IsFunction()) {
319
- return Nan::ThrowTypeError("Third argument must be a function");
320
- }
321
-
322
- write_baton_t *baton = new write_baton_t();
323
- memset(baton, 0, sizeof(write_baton_t));
324
- baton->rfcomm = Nan::ObjectWrap::Unwrap<BTSerialPortBinding>(info.This());
325
- baton->rfcomm->Ref();
326
- baton->buffer.Reset(bufferObject);
327
- baton->bufferData = bufferData;
328
- baton->bufferLength = bufferLength;
329
- baton->callback = new Nan::Callback(info[2].As<Function>());
330
-
331
- queued_write_t *queuedWrite = new queued_write_t();
332
- memset(queuedWrite, 0, sizeof(queued_write_t));
333
- queuedWrite->baton = baton;
334
- queuedWrite->req.data = queuedWrite;
335
-
336
- uv_mutex_lock(&write_queue_mutex);
337
- bool empty = ngx_queue_empty(&write_queue);
338
-
339
- ngx_queue_insert_tail(&write_queue, &queuedWrite->queue);
340
-
341
- if (empty) {
342
- uv_queue_work(uv_default_loop(), &queuedWrite->req, EIO_Write, (uv_after_work_cb)EIO_AfterWrite);
343
- }
344
- uv_mutex_unlock(&write_queue_mutex);
345
-
346
- return;
347
- }
348
-
349
- NAN_METHOD(BTSerialPortBinding::Close) {
350
- const char *usage = "usage: close(address)";
351
- if (info.Length() != 1) {
352
- return Nan::ThrowError(usage);
353
- }
354
-
355
- //NOTE: The address argument is currently only used in OSX.
356
- // On linux each connection is handled by a separate object.
357
-
358
- BTSerialPortBinding* rfcomm = Nan::ObjectWrap::Unwrap<BTSerialPortBinding>(info.This());
359
-
360
- if (rfcomm->s != 0) {
361
- shutdown(rfcomm->s, SHUT_RDWR);
362
- close(rfcomm->s);
363
- write(rfcomm->rep[1], "close", (strlen("close")+1));
364
- rfcomm->s = 0;
365
- }
366
-
367
- // closing pipes
368
- close(rfcomm->rep[0]);
369
- close(rfcomm->rep[1]);
370
-
371
- return;
372
- }
373
-
374
- NAN_METHOD(BTSerialPortBinding::Read) {
375
- const char *usage = "usage: read(callback)";
376
- if (info.Length() != 1) {
377
- return Nan::ThrowError(usage);
378
- }
379
-
380
- Local<Function> cb = info[0].As<Function>();
381
-
382
- BTSerialPortBinding* rfcomm = Nan::ObjectWrap::Unwrap<BTSerialPortBinding>(info.This());
383
-
384
- // callback with an error if the connection has been closed.
385
- if (rfcomm->s == 0) {
386
- Local<Value> argv[2];
387
-
388
- argv[0] = Nan::Error("The connection has been closed");
389
- argv[1] = Nan::Undefined();
390
-
391
- Nan::Callback *nc = new Nan::Callback(cb);
392
- nc->Call(2, argv);
393
- } else {
394
- read_baton_t *baton = new read_baton_t();
395
- baton->rfcomm = rfcomm;
396
- baton->cb = new Nan::Callback(cb);
397
- baton->request.data = baton;
398
- baton->rfcomm->Ref();
399
-
400
- uv_queue_work(uv_default_loop(), &baton->request, EIO_Read, (uv_after_work_cb)EIO_AfterRead);
401
- }
402
-
403
- return;
404
- }
@@ -1,23 +0,0 @@
1
- /*
2
- * Copyright (c) 2012-2013, Eelco Cramer
3
- * All rights reserved.
4
- *
5
- * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6
- *
7
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10
- */
11
-
12
- #include <node.h>
13
- #include "DeviceINQ.h"
14
- #include "BTSerialPortBinding.h"
15
-
16
- using namespace v8;
17
-
18
- void InitAll(Local<Object> exports) {
19
- DeviceINQ::Init(exports);
20
- BTSerialPortBinding::Init(exports);
21
- }
22
-
23
- NODE_MODULE(BluetoothSerialPort, InitAll)