@@ -311,7 +311,11 @@ void CardReader::DoConnect(uv_work_t* req) {
|
||||
baton->result = cr;
|
||||
}
|
||||
|
||||
#if NODE_VERSION_AT_LEAST(0, 9, 4)
|
||||
void CardReader::AfterConnect(uv_work_t* req, int status) {
|
||||
#else
|
||||
void CardReader::AfterConnect(uv_work_t* req) {
|
||||
#endif
|
||||
|
||||
HandleScope scope;
|
||||
Baton* baton = static_cast<Baton*>(req->data);
|
||||
@@ -363,7 +367,11 @@ void CardReader::DoDisconnect(uv_work_t* req) {
|
||||
baton->result = reinterpret_cast<void*>(result);
|
||||
}
|
||||
|
||||
#if NODE_VERSION_AT_LEAST(0, 9, 4)
|
||||
void CardReader::AfterDisconnect(uv_work_t* req, int status) {
|
||||
#else
|
||||
void CardReader::AfterDisconnect(uv_work_t* req) {
|
||||
#endif
|
||||
|
||||
HandleScope scope;
|
||||
Baton* baton = static_cast<Baton*>(req->data);
|
||||
@@ -420,7 +428,11 @@ void CardReader::DoTransmit(uv_work_t* req) {
|
||||
baton->result = tr;
|
||||
}
|
||||
|
||||
#if NODE_VERSION_AT_LEAST(0, 9, 4)
|
||||
void CardReader::AfterTransmit(uv_work_t* req, int status) {
|
||||
#else
|
||||
void CardReader::AfterTransmit(uv_work_t* req) {
|
||||
#endif
|
||||
|
||||
HandleScope scope;
|
||||
Baton* baton = static_cast<Baton*>(req->data);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define CARDREADER_H
|
||||
|
||||
#include <node.h>
|
||||
#include <node_version.h>
|
||||
#include <winscard.h>
|
||||
#include <string>
|
||||
#include <pthread.h>
|
||||
@@ -75,13 +76,21 @@ class CardReader: public node::ObjectWrap {
|
||||
static void HandleReaderStatusChange(uv_async_t *handle, int status);
|
||||
static void* HandlerFunction(void* arg);
|
||||
static void DoConnect(uv_work_t* req);
|
||||
static void AfterConnect(uv_work_t* req);
|
||||
static void DoDisconnect(uv_work_t* req);
|
||||
static void AfterDisconnect(uv_work_t* req);
|
||||
static void DoTransmit(uv_work_t* req);
|
||||
static void AfterTransmit(uv_work_t* req);
|
||||
static void CloseCallback(uv_handle_t *handle);
|
||||
|
||||
#if NODE_VERSION_AT_LEAST(0, 9, 4)
|
||||
static void AfterConnect(uv_work_t* req, int status);
|
||||
static void AfterDisconnect(uv_work_t* req, int status);
|
||||
static void AfterTransmit(uv_work_t* req, int status);
|
||||
#else
|
||||
static void AfterConnect(uv_work_t* req);
|
||||
static void AfterDisconnect(uv_work_t* req);
|
||||
static void AfterTransmit(uv_work_t* req);
|
||||
#endif
|
||||
|
||||
|
||||
static v8::Handle<v8::Value> CreateBufferInstance(char* data, unsigned long size);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user