* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-
#ifndef NFCTERMINAL_H_
#define NFCTERMINAL_H_
/* standard library header */
-/* SLP library header */
-#include "net_nfc_typedef.h"
+/* Tizen library header */
+#include "nfc.h"
/* local header */
#include "Terminal.h"
{
private:
PMutex mutex;
- net_nfc_target_handle_h seHandle;
- bool closed;
- /* temporary data for sync function */
- ByteArray response;
- int error;
+ nfc_se_h seHandle;
+ bool present;
+ int referred;
NFCTerminal();
~NFCTerminal();
- static void nfcResponseCallback(net_nfc_message_e message, net_nfc_error_e result, void *data , void *userContext, void *transData);
-
public:
-
static NFCTerminal *getInstance();
bool initialize();
void finalize();
bool open();
- bool isClosed();
void close();
- bool isSecureElementPresence();
+ bool isSecureElementPresence() const { return present; }
- int transmitSync(ByteArray command, ByteArray &response);
+ int transmitSync(const ByteArray &command, ByteArray &response);
int getATRSync(ByteArray &atr);
- int transmit(ByteArray command, terminalTransmitCallback callback, void *userParam) { return -1; };
- int getATR(terminalGetATRCallback callback, void *userParam) { return -1; }
-
- friend void nfcResponseCallback(net_nfc_message_e message, net_nfc_error_e result, void *data , void *userContext, void *transData);
+ 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_ */