added IOCTL_CCID_ESCAPE constant to reader object to support escape command
This commit is contained in:
1
.idea/jsLibraryMappings.xml
generated
1
.idea/jsLibraryMappings.xml
generated
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptLibraryMappings">
|
||||
<file url="file://$PROJECT_DIR$" libraries="{node-pcsclite/node_modules}" />
|
||||
<includedPredefinedLibrary name="ECMAScript 6" />
|
||||
<includedPredefinedLibrary name="Node.js Core" />
|
||||
</component>
|
||||
|
||||
10
.idea/misc.xml
generated
10
.idea/misc.xml
generated
@@ -3,16 +3,6 @@
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||
<OptionsSetting value="true" id="Add" />
|
||||
<OptionsSetting value="true" id="Remove" />
|
||||
<OptionsSetting value="true" id="Checkout" />
|
||||
<OptionsSetting value="true" id="Update" />
|
||||
<OptionsSetting value="true" id="Status" />
|
||||
<OptionsSetting value="true" id="Edit" />
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration>$USER_HOME$/.subversion</configuration>
|
||||
</component>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
const EventEmitter = require('events');
|
||||
const pcsclite = require('bindings')('pcsclite');
|
||||
const {PCSCLite, CardReader} = pcsclite;
|
||||
const { PCSCLite, CardReader } = pcsclite;
|
||||
|
||||
|
||||
inherits(PCSCLite, EventEmitter);
|
||||
@@ -71,7 +71,7 @@ module.exports = function () {
|
||||
return r.emit('error', err);
|
||||
}
|
||||
|
||||
const status = {state: state};
|
||||
const status = { state: state };
|
||||
|
||||
if (atr) {
|
||||
status.atr = atr;
|
||||
|
||||
@@ -31,6 +31,9 @@ void CardReader::init(Handle<Object> target) {
|
||||
Nan::SetPrototypeTemplate(tpl, "SCARD_SHARE_EXCLUSIVE", Nan::New(SCARD_SHARE_EXCLUSIVE));
|
||||
Nan::SetPrototypeTemplate(tpl, "SCARD_SHARE_DIRECT", Nan::New(SCARD_SHARE_DIRECT));
|
||||
|
||||
// Control Code
|
||||
Nan::SetPrototypeTemplate(tpl, "IOCTL_CCID_ESCAPE", Nan::New(IOCTL_CCID_ESCAPE));
|
||||
|
||||
// Protocol
|
||||
Nan::SetPrototypeTemplate(tpl, "SCARD_PROTOCOL_T0", Nan::New(SCARD_PROTOCOL_T0));
|
||||
Nan::SetPrototypeTemplate(tpl, "SCARD_PROTOCOL_T1", Nan::New(SCARD_PROTOCOL_T1));
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
#ifdef _WIN32
|
||||
#define MAX_ATR_SIZE 33
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
#define IOCTL_CCID_ESCAPE (0x42000000 + 3500)
|
||||
#else
|
||||
#define IOCTL_CCID_ESCAPE (0x42000000 + 1)
|
||||
#endif
|
||||
|
||||
static Nan::Persistent<v8::String> name_symbol;
|
||||
static Nan::Persistent<v8::String> connected_symbol;
|
||||
|
||||
Reference in New Issue
Block a user