summaryrefslogtreecommitdiff
path: root/include/NFCTerminal.h
diff options
context:
space:
mode:
authorWonkyu Kwon <wonkyu.kwon@samsung.com>2013-10-16 13:12:33 +0900
committerJi-hoon Jung <jh8801.jung@samsung.com>2014-04-09 15:09:16 +0900
commit0ec3896024a52deff1dc0318b4ab09b0d12fbbdf (patch)
tree530f87068845a03d222b7329f5a8a4a4510ac85c /include/NFCTerminal.h
parent3f02331f47221eb11d43f686feabf0eb88446edd (diff)
downloadsmartcard-plugin-nfc-0ec3896024a52deff1dc0318b4ab09b0d12fbbdf.tar.gz
smartcard-plugin-nfc-0ec3896024a52deff1dc0318b4ab09b0d12fbbdf.tar.bz2
smartcard-plugin-nfc-0ec3896024a52deff1dc0318b4ab09b0d12fbbdf.zip
- implement open/close function and apply reference counter - remove scope locks because functions are synchronous type. Change-Id: I9b9ac651fc8d46e931676a5b660232dedd077477 Signed-off-by: Ji-hoon Jung <jh8801.jung@samsung.com>
Diffstat (limited to 'include/NFCTerminal.h')
-rw-r--r--include/NFCTerminal.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/include/NFCTerminal.h b/include/NFCTerminal.h
index a2209d8..d61b5e6 100644
--- a/include/NFCTerminal.h
+++ b/include/NFCTerminal.h
@@ -32,14 +32,12 @@ namespace smartcard_service_api
private:
PMutex mutex;
nfc_se_h seHandle;
- bool opening;
- bool closed;
+ bool present;
+ int referred;
NFCTerminal();
~NFCTerminal();
- bool checkClosed();
-
public:
static NFCTerminal *getInstance();
@@ -47,16 +45,15 @@ namespace smartcard_service_api
void finalize();
bool open();
- bool isClosed() const;
void close();
- bool isSecureElementPresence() const;
+ bool isSecureElementPresence() const { return present; }
int transmitSync(const ByteArray &command, ByteArray &response);
int getATRSync(ByteArray &atr);
- int transmit(const ByteArray &command, terminalTransmitCallback callback, void *userParam) { return -1; };
- int getATR(terminalGetATRCallback callback, void *userParam) { return -1; }
+ int transmit(const ByteArray &command, terminalTransmitCallback callback, void *userParam) { return SCARD_ERROR_NOT_SUPPORTED; };
+ int getATR(terminalGetATRCallback callback, void *userParam) { return SCARD_ERROR_NOT_SUPPORTED; }
};
} /* namespace smartcard_service_api */
#endif /* NFCTERMINAL_H_ */