Commit Graph

22 Commits

Author SHA1 Message Date
Martin Endler
d2aa4498ca Change end event behavior (readers field is updated before the edn event is emitted)
Add types field to package.json
2018-12-28 04:20:50 +01:00
Martin Endler
6104637e01 Add TypeScript declaration file
Expose list of readers via pcsclite.readers
2018-12-20 04:11:56 +01:00
Martin Endler
31e497024c Upgrade dependencies
Improve example (fix coding style, fix Buffer usage)
Fix coding style in lib/pcsclite.js
2018-12-20 03:51:54 +01:00
Martin Endler
72c3181e05 Merge changes from https://github.com/santigimeno/node-pcsclite into master 2017-02-28 22:58:02 +01:00
Samo Fortuna
1a369f0fad cardreader: add SCARD_CTL_CODE js implementation 2017-02-22 14:38:13 +01:00
Samo Fortuna
98a5269015 cardreader: allow 0 as a valid protocol value 2017-02-22 14:37:58 +01:00
Martin Endler
11f939ff32 Allow keep trying if SCard service is unavailable 2017-01-26 19:10:48 +01:00
Martin Endler
114f8372a1 added IOCTL_CCID_ESCAPE constant to reader object to support escape command 2016-11-17 23:52:27 +01:00
Martin Endler
c3c3cf33ef fixed parse readers string function
added .editorconfig
formatted code
updated dependencies
improved package.json
fixed version number
2016-08-10 20:39:11 +02:00
Hapet95
0a3ec3dfa4 Update pcsclite.js 2016-07-07 18:59:49 +04:00
Santiago Gimeno
1cd7143dc5 src: arm '_end' listener as soon as possible 2015-12-22 15:09:45 +01:00
Santiago Gimeno
0a3eaafb2b src: fix reader disconnection logic
- A reader disconnection can't be detected by SCardGetStatusChange in the reader
  (cardreader.cpp) but by detecting that the reader doesn't appear in the list of
  readers retrieved in pcsclite.cpp.
- The list of readers is now stored in an object where the keys are the names of
  the readers. When a reader disconnection is detected, the reader is closed
  triggering the 'end' event. Then the reader is removed from the readers list.
2015-09-26 14:35:59 +02:00
Santiago Gimeno
0c5e07e0e5 src: migrate pthreads to uv_threads
- So it can be compatible in every platform supported by libuv.
- Use attached threads instead of detached.
- Remove all CardReader 'status' listeners before emitting the
  'end' event.
2015-05-27 16:09:29 +02:00
Santiago Gimeno
b9afcfe74b src: fix typo 2014-09-19 11:03:18 +02:00
Santiago Gimeno
3c8b2c9f4b src: add disposition parameter to disconnect 2014-08-06 12:06:17 +02:00
Santiago Gimeno
279bc112ce src: improve SCardConnect interface
- We can optionally pass the share_mode and preferred_protocol options. They are
  optional to keep backwards compatibility.
- Update README
- Define constants in C++ land.
2014-07-29 12:18:20 +02:00
Santiago Gimeno
ef475d882e src: fix readers detection logic
- Also, upgrade buffertools that allows to use it only when needed.
2014-07-28 13:35:53 +02:00
Santiago Gimeno
c3b83ed118 Fix typo 2014-07-28 13:14:31 +02:00
Santiago Gimeno
c3d947860c Implement SCardControl 2014-07-28 11:49:35 +02:00
Santiago Gimeno
2bb9804a1f Refactor pcscslite.js
- Improve and fix how we parse and handle cardreader strings.
2013-08-08 13:45:31 +02:00
Santiago Gimeno
3f2a1b5e4e CardReader status event should return the ATR
- Of the inserted card.
- Refactoring of the code that creates a Buffer instance into a
  separate function.
- Update the example and README
- It fixes bug #2
2013-07-05 17:25:18 +02:00
Santiago Gimeno
b40f9a2f88 Initial Implementation 2013-06-20 16:37:28 +02:00