bluetooth-serial-port 3.0.2 → 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,491 +0,0 @@
1
- /* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
2
- *
3
- * Permission is hereby granted, free of charge, to any person obtaining a copy
4
- * of this software and associated documentation files (the "Software"), to
5
- * deal in the Software without restriction, including without limitation the
6
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
- * sell copies of the Software, and to permit persons to whom the Software is
8
- * furnished to do so, subject to the following conditions:
9
- *
10
- * The above copyright notice and this permission notice shall be included in
11
- * all copies or substantial portions of the Software.
12
- *
13
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
- * IN THE SOFTWARE.
20
- */
21
-
22
- #ifndef UV_UNIX_H
23
- #define UV_UNIX_H
24
-
25
- #include <sys/types.h>
26
- #include <sys/stat.h>
27
- #include <fcntl.h>
28
- #include <dirent.h>
29
-
30
- #include <sys/socket.h>
31
- #include <netinet/in.h>
32
- #include <netinet/tcp.h>
33
- #include <arpa/inet.h>
34
- #include <netdb.h> /* MAXHOSTNAMELEN on Solaris */
35
-
36
- #include <termios.h>
37
- #include <pwd.h>
38
-
39
- #if !defined(__MVS__)
40
- #include <semaphore.h>
41
- #include <sys/param.h> /* MAXHOSTNAMELEN on Linux and the BSDs */
42
- #endif
43
- #include <pthread.h>
44
- #include <signal.h>
45
-
46
- #include "uv/threadpool.h"
47
-
48
- #if defined(__linux__)
49
- # include "uv/linux.h"
50
- #elif defined (__MVS__)
51
- # include "uv/os390.h"
52
- #elif defined(__PASE__) /* __PASE__ and _AIX are both defined on IBM i */
53
- # include "uv/posix.h" /* IBM i needs uv/posix.h, not uv/aix.h */
54
- #elif defined(_AIX)
55
- # include "uv/aix.h"
56
- #elif defined(__sun)
57
- # include "uv/sunos.h"
58
- #elif defined(__APPLE__)
59
- # include "uv/darwin.h"
60
- #elif defined(__DragonFly__) || \
61
- defined(__FreeBSD__) || \
62
- defined(__FreeBSD_kernel__) || \
63
- defined(__OpenBSD__) || \
64
- defined(__NetBSD__)
65
- # include "uv/bsd.h"
66
- #elif defined(__CYGWIN__) || \
67
- defined(__MSYS__) || \
68
- defined(__GNU__)
69
- # include "uv/posix.h"
70
- #elif defined(__HAIKU__)
71
- # include "uv/posix.h"
72
- #endif
73
-
74
- #ifndef NI_MAXHOST
75
- # define NI_MAXHOST 1025
76
- #endif
77
-
78
- #ifndef NI_MAXSERV
79
- # define NI_MAXSERV 32
80
- #endif
81
-
82
- #ifndef UV_IO_PRIVATE_PLATFORM_FIELDS
83
- # define UV_IO_PRIVATE_PLATFORM_FIELDS /* empty */
84
- #endif
85
-
86
- struct uv__io_s;
87
- struct uv_loop_s;
88
-
89
- typedef void (*uv__io_cb)(struct uv_loop_s* loop,
90
- struct uv__io_s* w,
91
- unsigned int events);
92
- typedef struct uv__io_s uv__io_t;
93
-
94
- struct uv__io_s {
95
- uv__io_cb cb;
96
- void* pending_queue[2];
97
- void* watcher_queue[2];
98
- unsigned int pevents; /* Pending event mask i.e. mask at next tick. */
99
- unsigned int events; /* Current event mask. */
100
- int fd;
101
- UV_IO_PRIVATE_PLATFORM_FIELDS
102
- };
103
-
104
- #ifndef UV_PLATFORM_SEM_T
105
- # define UV_PLATFORM_SEM_T sem_t
106
- #endif
107
-
108
- #ifndef UV_PLATFORM_LOOP_FIELDS
109
- # define UV_PLATFORM_LOOP_FIELDS /* empty */
110
- #endif
111
-
112
- #ifndef UV_PLATFORM_FS_EVENT_FIELDS
113
- # define UV_PLATFORM_FS_EVENT_FIELDS /* empty */
114
- #endif
115
-
116
- #ifndef UV_STREAM_PRIVATE_PLATFORM_FIELDS
117
- # define UV_STREAM_PRIVATE_PLATFORM_FIELDS /* empty */
118
- #endif
119
-
120
- /* Note: May be cast to struct iovec. See writev(2). */
121
- typedef struct uv_buf_t {
122
- char* base;
123
- size_t len;
124
- } uv_buf_t;
125
-
126
- typedef int uv_file;
127
- typedef int uv_os_sock_t;
128
- typedef int uv_os_fd_t;
129
- typedef pid_t uv_pid_t;
130
-
131
- #define UV_ONCE_INIT PTHREAD_ONCE_INIT
132
-
133
- typedef pthread_once_t uv_once_t;
134
- typedef pthread_t uv_thread_t;
135
- typedef pthread_mutex_t uv_mutex_t;
136
- typedef pthread_rwlock_t uv_rwlock_t;
137
- typedef UV_PLATFORM_SEM_T uv_sem_t;
138
- typedef pthread_cond_t uv_cond_t;
139
- typedef pthread_key_t uv_key_t;
140
-
141
- /* Note: guard clauses should match uv_barrier_init's in src/unix/thread.c. */
142
- #if defined(_AIX) || \
143
- defined(__OpenBSD__) || \
144
- !defined(PTHREAD_BARRIER_SERIAL_THREAD)
145
- /* TODO(bnoordhuis) Merge into uv_barrier_t in v2. */
146
- struct _uv_barrier {
147
- uv_mutex_t mutex;
148
- uv_cond_t cond;
149
- unsigned threshold;
150
- unsigned in;
151
- unsigned out;
152
- };
153
-
154
- typedef struct {
155
- struct _uv_barrier* b;
156
- # if defined(PTHREAD_BARRIER_SERIAL_THREAD)
157
- /* TODO(bnoordhuis) Remove padding in v2. */
158
- char pad[sizeof(pthread_barrier_t) - sizeof(struct _uv_barrier*)];
159
- # endif
160
- } uv_barrier_t;
161
- #else
162
- typedef pthread_barrier_t uv_barrier_t;
163
- #endif
164
-
165
- /* Platform-specific definitions for uv_spawn support. */
166
- typedef gid_t uv_gid_t;
167
- typedef uid_t uv_uid_t;
168
-
169
- typedef struct dirent uv__dirent_t;
170
-
171
- #define UV_DIR_PRIVATE_FIELDS \
172
- DIR* dir;
173
-
174
- #if defined(DT_UNKNOWN)
175
- # define HAVE_DIRENT_TYPES
176
- # if defined(DT_REG)
177
- # define UV__DT_FILE DT_REG
178
- # else
179
- # define UV__DT_FILE -1
180
- # endif
181
- # if defined(DT_DIR)
182
- # define UV__DT_DIR DT_DIR
183
- # else
184
- # define UV__DT_DIR -2
185
- # endif
186
- # if defined(DT_LNK)
187
- # define UV__DT_LINK DT_LNK
188
- # else
189
- # define UV__DT_LINK -3
190
- # endif
191
- # if defined(DT_FIFO)
192
- # define UV__DT_FIFO DT_FIFO
193
- # else
194
- # define UV__DT_FIFO -4
195
- # endif
196
- # if defined(DT_SOCK)
197
- # define UV__DT_SOCKET DT_SOCK
198
- # else
199
- # define UV__DT_SOCKET -5
200
- # endif
201
- # if defined(DT_CHR)
202
- # define UV__DT_CHAR DT_CHR
203
- # else
204
- # define UV__DT_CHAR -6
205
- # endif
206
- # if defined(DT_BLK)
207
- # define UV__DT_BLOCK DT_BLK
208
- # else
209
- # define UV__DT_BLOCK -7
210
- # endif
211
- #endif
212
-
213
- /* Platform-specific definitions for uv_dlopen support. */
214
- #define UV_DYNAMIC /* empty */
215
-
216
- typedef struct {
217
- void* handle;
218
- char* errmsg;
219
- } uv_lib_t;
220
-
221
- #define UV_LOOP_PRIVATE_FIELDS \
222
- unsigned long flags; \
223
- int backend_fd; \
224
- void* pending_queue[2]; \
225
- void* watcher_queue[2]; \
226
- uv__io_t** watchers; \
227
- unsigned int nwatchers; \
228
- unsigned int nfds; \
229
- void* wq[2]; \
230
- uv_mutex_t wq_mutex; \
231
- uv_async_t wq_async; \
232
- uv_rwlock_t cloexec_lock; \
233
- uv_handle_t* closing_handles; \
234
- void* process_handles[2]; \
235
- void* prepare_handles[2]; \
236
- void* check_handles[2]; \
237
- void* idle_handles[2]; \
238
- void* async_handles[2]; \
239
- void (*async_unused)(void); /* TODO(bnoordhuis) Remove in libuv v2. */ \
240
- uv__io_t async_io_watcher; \
241
- int async_wfd; \
242
- struct { \
243
- void* min; \
244
- unsigned int nelts; \
245
- } timer_heap; \
246
- uint64_t timer_counter; \
247
- uint64_t time; \
248
- int signal_pipefd[2]; \
249
- uv__io_t signal_io_watcher; \
250
- uv_signal_t child_watcher; \
251
- int emfile_fd; \
252
- UV_PLATFORM_LOOP_FIELDS \
253
-
254
- #define UV_REQ_TYPE_PRIVATE /* empty */
255
-
256
- #define UV_REQ_PRIVATE_FIELDS /* empty */
257
-
258
- #define UV_PRIVATE_REQ_TYPES /* empty */
259
-
260
- #define UV_WRITE_PRIVATE_FIELDS \
261
- void* queue[2]; \
262
- unsigned int write_index; \
263
- uv_buf_t* bufs; \
264
- unsigned int nbufs; \
265
- int error; \
266
- uv_buf_t bufsml[4]; \
267
-
268
- #define UV_CONNECT_PRIVATE_FIELDS \
269
- void* queue[2]; \
270
-
271
- #define UV_SHUTDOWN_PRIVATE_FIELDS /* empty */
272
-
273
- #define UV_UDP_SEND_PRIVATE_FIELDS \
274
- void* queue[2]; \
275
- struct sockaddr_storage addr; \
276
- unsigned int nbufs; \
277
- uv_buf_t* bufs; \
278
- ssize_t status; \
279
- uv_udp_send_cb send_cb; \
280
- uv_buf_t bufsml[4]; \
281
-
282
- #define UV_HANDLE_PRIVATE_FIELDS \
283
- uv_handle_t* next_closing; \
284
- unsigned int flags; \
285
-
286
- #define UV_STREAM_PRIVATE_FIELDS \
287
- uv_connect_t *connect_req; \
288
- uv_shutdown_t *shutdown_req; \
289
- uv__io_t io_watcher; \
290
- void* write_queue[2]; \
291
- void* write_completed_queue[2]; \
292
- uv_connection_cb connection_cb; \
293
- int delayed_error; \
294
- int accepted_fd; \
295
- void* queued_fds; \
296
- UV_STREAM_PRIVATE_PLATFORM_FIELDS \
297
-
298
- #define UV_TCP_PRIVATE_FIELDS /* empty */
299
-
300
- #define UV_UDP_PRIVATE_FIELDS \
301
- uv_alloc_cb alloc_cb; \
302
- uv_udp_recv_cb recv_cb; \
303
- uv__io_t io_watcher; \
304
- void* write_queue[2]; \
305
- void* write_completed_queue[2]; \
306
-
307
- #define UV_PIPE_PRIVATE_FIELDS \
308
- const char* pipe_fname; /* strdup'ed */
309
-
310
- #define UV_POLL_PRIVATE_FIELDS \
311
- uv__io_t io_watcher;
312
-
313
- #define UV_PREPARE_PRIVATE_FIELDS \
314
- uv_prepare_cb prepare_cb; \
315
- void* queue[2]; \
316
-
317
- #define UV_CHECK_PRIVATE_FIELDS \
318
- uv_check_cb check_cb; \
319
- void* queue[2]; \
320
-
321
- #define UV_IDLE_PRIVATE_FIELDS \
322
- uv_idle_cb idle_cb; \
323
- void* queue[2]; \
324
-
325
- #define UV_ASYNC_PRIVATE_FIELDS \
326
- uv_async_cb async_cb; \
327
- void* queue[2]; \
328
- int pending; \
329
-
330
- #define UV_TIMER_PRIVATE_FIELDS \
331
- uv_timer_cb timer_cb; \
332
- void* heap_node[3]; \
333
- uint64_t timeout; \
334
- uint64_t repeat; \
335
- uint64_t start_id;
336
-
337
- #define UV_GETADDRINFO_PRIVATE_FIELDS \
338
- struct uv__work work_req; \
339
- uv_getaddrinfo_cb cb; \
340
- struct addrinfo* hints; \
341
- char* hostname; \
342
- char* service; \
343
- struct addrinfo* addrinfo; \
344
- int retcode;
345
-
346
- #define UV_GETNAMEINFO_PRIVATE_FIELDS \
347
- struct uv__work work_req; \
348
- uv_getnameinfo_cb getnameinfo_cb; \
349
- struct sockaddr_storage storage; \
350
- int flags; \
351
- char host[NI_MAXHOST]; \
352
- char service[NI_MAXSERV]; \
353
- int retcode;
354
-
355
- #define UV_PROCESS_PRIVATE_FIELDS \
356
- void* queue[2]; \
357
- int status; \
358
-
359
- #define UV_FS_PRIVATE_FIELDS \
360
- const char *new_path; \
361
- uv_file file; \
362
- int flags; \
363
- mode_t mode; \
364
- unsigned int nbufs; \
365
- uv_buf_t* bufs; \
366
- off_t off; \
367
- uv_uid_t uid; \
368
- uv_gid_t gid; \
369
- double atime; \
370
- double mtime; \
371
- struct uv__work work_req; \
372
- uv_buf_t bufsml[4]; \
373
-
374
- #define UV_WORK_PRIVATE_FIELDS \
375
- struct uv__work work_req;
376
-
377
- #define UV_TTY_PRIVATE_FIELDS \
378
- struct termios orig_termios; \
379
- int mode;
380
-
381
- #define UV_SIGNAL_PRIVATE_FIELDS \
382
- /* RB_ENTRY(uv_signal_s) tree_entry; */ \
383
- struct { \
384
- struct uv_signal_s* rbe_left; \
385
- struct uv_signal_s* rbe_right; \
386
- struct uv_signal_s* rbe_parent; \
387
- int rbe_color; \
388
- } tree_entry; \
389
- /* Use two counters here so we don have to fiddle with atomics. */ \
390
- unsigned int caught_signals; \
391
- unsigned int dispatched_signals;
392
-
393
- #define UV_FS_EVENT_PRIVATE_FIELDS \
394
- uv_fs_event_cb cb; \
395
- UV_PLATFORM_FS_EVENT_FIELDS \
396
-
397
- /* fs open() flags supported on this platform: */
398
- #if defined(O_APPEND)
399
- # define UV_FS_O_APPEND O_APPEND
400
- #else
401
- # define UV_FS_O_APPEND 0
402
- #endif
403
- #if defined(O_CREAT)
404
- # define UV_FS_O_CREAT O_CREAT
405
- #else
406
- # define UV_FS_O_CREAT 0
407
- #endif
408
- #if defined(O_DIRECT)
409
- # define UV_FS_O_DIRECT O_DIRECT
410
- #else
411
- # define UV_FS_O_DIRECT 0
412
- #endif
413
- #if defined(O_DIRECTORY)
414
- # define UV_FS_O_DIRECTORY O_DIRECTORY
415
- #else
416
- # define UV_FS_O_DIRECTORY 0
417
- #endif
418
- #if defined(O_DSYNC)
419
- # define UV_FS_O_DSYNC O_DSYNC
420
- #else
421
- # define UV_FS_O_DSYNC 0
422
- #endif
423
- #if defined(O_EXCL)
424
- # define UV_FS_O_EXCL O_EXCL
425
- #else
426
- # define UV_FS_O_EXCL 0
427
- #endif
428
- #if defined(O_EXLOCK)
429
- # define UV_FS_O_EXLOCK O_EXLOCK
430
- #else
431
- # define UV_FS_O_EXLOCK 0
432
- #endif
433
- #if defined(O_NOATIME)
434
- # define UV_FS_O_NOATIME O_NOATIME
435
- #else
436
- # define UV_FS_O_NOATIME 0
437
- #endif
438
- #if defined(O_NOCTTY)
439
- # define UV_FS_O_NOCTTY O_NOCTTY
440
- #else
441
- # define UV_FS_O_NOCTTY 0
442
- #endif
443
- #if defined(O_NOFOLLOW)
444
- # define UV_FS_O_NOFOLLOW O_NOFOLLOW
445
- #else
446
- # define UV_FS_O_NOFOLLOW 0
447
- #endif
448
- #if defined(O_NONBLOCK)
449
- # define UV_FS_O_NONBLOCK O_NONBLOCK
450
- #else
451
- # define UV_FS_O_NONBLOCK 0
452
- #endif
453
- #if defined(O_RDONLY)
454
- # define UV_FS_O_RDONLY O_RDONLY
455
- #else
456
- # define UV_FS_O_RDONLY 0
457
- #endif
458
- #if defined(O_RDWR)
459
- # define UV_FS_O_RDWR O_RDWR
460
- #else
461
- # define UV_FS_O_RDWR 0
462
- #endif
463
- #if defined(O_SYMLINK)
464
- # define UV_FS_O_SYMLINK O_SYMLINK
465
- #else
466
- # define UV_FS_O_SYMLINK 0
467
- #endif
468
- #if defined(O_SYNC)
469
- # define UV_FS_O_SYNC O_SYNC
470
- #else
471
- # define UV_FS_O_SYNC 0
472
- #endif
473
- #if defined(O_TRUNC)
474
- # define UV_FS_O_TRUNC O_TRUNC
475
- #else
476
- # define UV_FS_O_TRUNC 0
477
- #endif
478
- #if defined(O_WRONLY)
479
- # define UV_FS_O_WRONLY O_WRONLY
480
- #else
481
- # define UV_FS_O_WRONLY 0
482
- #endif
483
-
484
- /* fs open() flags supported on other platforms: */
485
- #define UV_FS_O_FILEMAP 0
486
- #define UV_FS_O_RANDOM 0
487
- #define UV_FS_O_SHORT_LIVED 0
488
- #define UV_FS_O_SEQUENTIAL 0
489
- #define UV_FS_O_TEMPORARY 0
490
-
491
- #endif /* UV_UNIX_H */
@@ -1,43 +0,0 @@
1
- /* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
2
- *
3
- * Permission is hereby granted, free of charge, to any person obtaining a copy
4
- * of this software and associated documentation files (the "Software"), to
5
- * deal in the Software without restriction, including without limitation the
6
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
- * sell copies of the Software, and to permit persons to whom the Software is
8
- * furnished to do so, subject to the following conditions:
9
- *
10
- * The above copyright notice and this permission notice shall be included in
11
- * all copies or substantial portions of the Software.
12
- *
13
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
- * IN THE SOFTWARE.
20
- */
21
-
22
- #ifndef UV_VERSION_H
23
- #define UV_VERSION_H
24
-
25
- /*
26
- * Versions with the same major number are ABI stable. API is allowed to
27
- * evolve between minor releases, but only in a backwards compatible way.
28
- * Make sure you update the -soname directives in configure.ac
29
- * and uv.gyp whenever you bump UV_VERSION_MAJOR or UV_VERSION_MINOR (but
30
- * not UV_VERSION_PATCH.)
31
- */
32
-
33
- #define UV_VERSION_MAJOR 1
34
- #define UV_VERSION_MINOR 31
35
- #define UV_VERSION_PATCH 0
36
- #define UV_VERSION_IS_RELEASE 1
37
- #define UV_VERSION_SUFFIX ""
38
-
39
- #define UV_VERSION_HEX ((UV_VERSION_MAJOR << 16) | \
40
- (UV_VERSION_MINOR << 8) | \
41
- (UV_VERSION_PATCH))
42
-
43
- #endif /* UV_VERSION_H */
@@ -1,78 +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
- #ifndef NODE_BTSP_SRC_DEVICE_INQ_H
13
- #define NODE_BTSP_SRC_DEVICE_INQ_H
14
-
15
- #include <node.h>
16
- #include <uv.h>
17
- #include <nan.h>
18
-
19
- #ifdef __APPLE__
20
- #import <Foundation/NSArray.h>
21
- #endif
22
-
23
- struct bt_device {
24
- char address[19];
25
- char name[248];
26
- };
27
-
28
- #ifndef __APPLE__
29
- struct bt_inquiry {
30
- int num_rsp;
31
- bt_device *devices;
32
- };
33
- #endif
34
-
35
- class DeviceINQ : public Nan::ObjectWrap {
36
- private:
37
- #ifdef _WIN32
38
- bool initialized;
39
-
40
- bool GetInitializedProperty() {
41
- return initialized;
42
- }
43
- #endif
44
-
45
- public:
46
- #ifdef _WIN32
47
- __declspec(property(get = GetInitializedProperty)) bool Initialized;
48
- #endif
49
- static void Init(v8::Local<v8::Object> exports);
50
- static void EIO_SdpSearch(uv_work_t *req);
51
- static void EIO_AfterSdpSearch(uv_work_t *req);
52
- #ifdef __APPLE__
53
- static NSArray *doInquire();
54
- #else
55
- static bt_inquiry doInquire();
56
- #endif
57
-
58
- private:
59
- struct sdp_baton_t {
60
- DeviceINQ *inquire;
61
- uv_work_t request;
62
- Nan::Callback* cb;
63
- int channelID;
64
- char address[40];
65
- };
66
-
67
- DeviceINQ();
68
- ~DeviceINQ();
69
-
70
- static NAN_METHOD(New);
71
- static NAN_METHOD(Inquire);
72
- static NAN_METHOD(InquireSync);
73
- static NAN_METHOD(SdpSearch);
74
- static NAN_METHOD(ListPairedDevices);
75
-
76
- };
77
-
78
- #endif