int net_nfc_app_util_appsvc_launch(const char *operation, const char *uri, const char *mime, const char *data);
int net_nfc_app_util_launch_se_transaction_app(net_nfc_se_type_e se_type, uint8_t * aid, uint32_t aid_len, uint8_t * param, uint32_t param_len);
int net_nfc_app_util_launch_se_off_host_apdu_service_app(net_nfc_se_type_e se_type, uint8_t * aid, uint32_t aid_len, uint8_t * param, uint32_t param_len);
+int net_nfc_app_util_launch_se_transaction_app_by_aid(net_nfc_se_type_e se_type, uint8_t *aid, uint32_t aid_len, uint8_t *param, uint32_t param_len);
int net_nfc_app_util_encode_base64(uint8_t * buffer, uint32_t buf_len, char *result, uint32_t max_result);
int net_nfc_app_util_decode_base64(const char *buffer, uint32_t buf_len, uint8_t * result, uint32_t * res_len);
bool net_nfc_app_util_check_launch_state();
#include "net_nfc_util_handover.h"
#include "net_nfc_server_handover_internal.h"
#include "net_nfc_server_handover.h"
+#include "net_nfc_server_route_table.h"
//#include "syspopup_caller.h"
/* nfc_not_supported_pop_up */
return 0;
}
+int net_nfc_app_util_launch_se_transaction_app_by_aid(net_nfc_se_type_e se_type, uint8_t *aid, uint32_t aid_len, uint8_t *param, uint32_t param_len)
+{
+ uid_t uid = 0;
+ bundle *bd = NULL;
+ route_table_handler_t *handler = NULL;
+
+ /* launch */
+ bd = bundle_create();
+
+ appsvc_set_operation(bd, "http://tizen.org/appcontrol/operation/nfc/transaction");
+
+ /* convert aid to aid string */
+ if (aid != NULL && aid_len > 0) {
+ char aid_string[1024] = { 0, };
+ data_s temp = { aid, aid_len };
+
+ net_nfc_util_binary_to_hex_string(&temp, aid_string, sizeof(aid_string));
+
+ SECURE_MSG("aid_string : %s", aid_string);
+ handler = net_nfc_server_route_table_find_handler_by_aid(aid_string);
+ }
+
+ if (param != NULL && param_len > 0) {
+ char param_string[1024] = { 0, };
+ data_s temp = { param, param_len };
+
+ net_nfc_util_binary_to_hex_string(&temp, param_string, sizeof(param_string));
+
+ SECURE_MSG("param_string : %s", param_string);
+ appsvc_add_data(bd, "data", param_string);
+ }
+
+ if (handler != NULL) {
+ if (net_nfc_util_get_login_user(&uid) == true) {
+ SECURE_MSG("package name : %s, launch app uid : %d", handler->package, uid);
+ aul_launch_app_for_uid(handler->package, bd, uid);
+ }
+ }
+
+ bundle_free(bd);
+
+ return 0;
+}
+
int net_nfc_app_util_encode_base64(uint8_t * buffer, uint32_t buf_len, char *result, uint32_t max_result)
{
int ret = -1;
net_nfc_app_util_launch_se_transaction_app(se_type, detail->aid.buffer, detail->aid.length, detail->param.buffer, detail->param.length);
net_nfc_app_util_launch_se_off_host_apdu_service_app(se_type, detail->aid.buffer, detail->aid.length, detail->param.buffer, detail->param.length);
+
+ net_nfc_app_util_launch_se_transaction_app_by_aid(se_type, detail->aid.buffer, detail->aid.length, detail->param.buffer, detail->param.length);
}
DEBUG_SERVER_MSG("launch se app end");