Refactor connecting to SAP service and sending messages in queue
Sending and receiving works correctly, however establishing an SAP connection takes too long
This commit is contained in:
committed by
Frank Morgner
parent
023550ac11
commit
f2a68c95c1
8
TCardEmulator/inc/sap_app.h
Normal file
8
TCardEmulator/inc/sap_app.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef __sap_H__
|
||||
#define __sap_H__
|
||||
|
||||
#include <nfc.h>
|
||||
|
||||
void send_apdu_response(nfc_se_h handle, unsigned char *resp, unsigned int resp_len);
|
||||
|
||||
#endif /* __tcardemulator_H__ */
|
||||
@@ -9,18 +9,19 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <glib.h>
|
||||
#include <nfc.h>
|
||||
|
||||
extern unsigned char *rapdu;
|
||||
extern size_t rapdu_length;
|
||||
extern gboolean rapdu_received;
|
||||
//extern unsigned char *rapdu;
|
||||
//extern size_t rapdu_length;
|
||||
//extern gboolean rapdu_received;
|
||||
|
||||
#define HELLO_ACC_ASPID "/sample/hello"
|
||||
#define HELLO_ACC_ASPID "/com/vsmcartcard"
|
||||
#define HELLO_ACC_CHANNELID 104
|
||||
|
||||
void initialize_sap();
|
||||
gboolean find_peers();
|
||||
gboolean request_service_connection(void);
|
||||
gboolean terminate_service_connection(void);
|
||||
gboolean send_data(void *message, unsigned int message_len);
|
||||
gboolean send_data(nfc_se_h nfc_handle, void *message, unsigned int message_len);
|
||||
|
||||
#endif /* __tcardemulator_H__ */
|
||||
|
||||
Reference in New Issue
Block a user