added IOCTL_CCID_ESCAPE constant to reader object to support escape command

This commit is contained in:
Martin Endler
2016-11-17 23:52:27 +01:00
parent 198c892f34
commit 114f8372a1
5 changed files with 11 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="JavaScriptLibraryMappings"> <component name="JavaScriptLibraryMappings">
<file url="file://$PROJECT_DIR$" libraries="{node-pcsclite/node_modules}" />
<includedPredefinedLibrary name="ECMAScript 6" /> <includedPredefinedLibrary name="ECMAScript 6" />
<includedPredefinedLibrary name="Node.js Core" /> <includedPredefinedLibrary name="Node.js Core" />
</component> </component>

10
.idea/misc.xml generated
View File

@@ -3,16 +3,6 @@
<component name="JavaScriptSettings"> <component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" /> <option name="languageLevel" value="ES6" />
</component> </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"> <component name="SvnConfiguration">
<configuration>$USER_HOME$/.subversion</configuration> <configuration>$USER_HOME$/.subversion</configuration>
</component> </component>

View File

@@ -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_EXCLUSIVE", Nan::New(SCARD_SHARE_EXCLUSIVE));
Nan::SetPrototypeTemplate(tpl, "SCARD_SHARE_DIRECT", Nan::New(SCARD_SHARE_DIRECT)); 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 // Protocol
Nan::SetPrototypeTemplate(tpl, "SCARD_PROTOCOL_T0", Nan::New(SCARD_PROTOCOL_T0)); Nan::SetPrototypeTemplate(tpl, "SCARD_PROTOCOL_T0", Nan::New(SCARD_PROTOCOL_T0));
Nan::SetPrototypeTemplate(tpl, "SCARD_PROTOCOL_T1", Nan::New(SCARD_PROTOCOL_T1)); Nan::SetPrototypeTemplate(tpl, "SCARD_PROTOCOL_T1", Nan::New(SCARD_PROTOCOL_T1));

View File

@@ -14,6 +14,11 @@
#ifdef _WIN32 #ifdef _WIN32
#define MAX_ATR_SIZE 33 #define MAX_ATR_SIZE 33
#endif #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> name_symbol;
static Nan::Persistent<v8::String> connected_symbol; static Nan::Persistent<v8::String> connected_symbol;