From: Hyihong Chae Date: Fri, 13 Jan 2017 01:51:57 +0000 (+0900) Subject: Sync code with Tizen 3.0 branch X-Git-Tag: accepted/tizen/common/20170113.184431^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_wearable;p=platform%2Fcore%2Fapi%2Fnfc.git Sync code with Tizen 3.0 branch Change-Id: I2e382cb6df413ae60254225911491fd50ac2828f Signed-off-by: HyiHong Chae --- diff --git a/src/net_nfc_client_snep.c b/src/net_nfc_client_snep.c index 7b7ecfd..3fc6d56 100755 --- a/src/net_nfc_client_snep.c +++ b/src/net_nfc_client_snep.c @@ -71,10 +71,10 @@ static void snep_send_client_request(GObject *source_object, g_error_free(error); } - g_variant_get(parameter, "(uuu)", - (guint *)&callback, - (guint *)&user_param, - (guint *)&handle); + g_variant_get(parameter, "(ttt)", + &callback, + &user_param, + &handle); if (callback != NULL) { ndef_message_h message; @@ -112,9 +112,9 @@ net_nfc_error_e net_nfc_client_snep_start_server( if (net_nfc_client_manager_is_activated() == false) return NET_NFC_NOT_ACTIVATED; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (net_nfc_gdbus_snep_call_server_start_sync(snep_proxy, GPOINTER_TO_UINT(target), @@ -158,9 +158,9 @@ net_nfc_error_e net_nfc_client_snep_start_client( if (net_nfc_client_manager_is_activated() == false) return NET_NFC_NOT_ACTIVATED; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (net_nfc_gdbus_snep_call_client_start_sync(snep_proxy, GPOINTER_TO_UINT(target), @@ -206,10 +206,10 @@ net_nfc_error_e net_nfc_client_snep_send_client_request( if (net_nfc_client_manager_is_activated() == false) return NET_NFC_NOT_ACTIVATED; - parameter = g_variant_new("(uuu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data), - GPOINTER_TO_UINT(target)); + parameter = g_variant_new("(ttt)", + callback, + user_data, + target); ndef_msg = net_nfc_util_gdbus_ndef_message_to_variant(msg); @@ -344,7 +344,7 @@ static void _snep_event_cb(NetNfcGDbusSnep *object, void *user_data; g_variant_get(parameter, - "(uu)", + "(tt)", &callback, &user_data); @@ -390,9 +390,9 @@ net_nfc_error_e net_nfc_client_snep_register_server(const char *san, if (net_nfc_client_manager_is_activated() == false) return NET_NFC_NOT_ACTIVATED; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (net_nfc_gdbus_snep_call_server_register_sync(snep_proxy, sap, diff --git a/src/nfc_p2p.c b/src/nfc_p2p.c index 76758b8..2218789 100755 --- a/src/nfc_p2p.c +++ b/src/nfc_p2p.c @@ -28,9 +28,9 @@ static void _p2p_send_cb(net_nfc_error_e result, void *user_data) return; g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) callback(nfc_common_convert_error_code(__func__, result), user_param); @@ -59,9 +59,9 @@ int nfc_p2p_send(nfc_p2p_target_h target, CHECK_ACTIVATED(); CHECK_APP_PERMISSION(); - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { net_nfc_create_rawdata_from_ndef_message(message, &rawdata); ret = net_nfc_client_p2p_send((net_nfc_target_handle_h)target, @@ -102,9 +102,9 @@ int nfc_p2p_send_no_permission( /* skip check app permission */ - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { net_nfc_create_rawdata_from_ndef_message(message, &rawdata); ret = net_nfc_client_p2p_send((net_nfc_target_handle_h)target, @@ -205,9 +205,9 @@ static void _snep_start_server_cb( } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) { nfc_snep_event_e snep_event; @@ -266,9 +266,9 @@ int nfc_snep_start_server(nfc_p2p_target_h target, CHECK_INIT(); CHECK_INVALID(target == NULL); - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { result = net_nfc_client_snep_start_server( (net_nfc_target_handle_h)target, @@ -304,9 +304,9 @@ static void _snep_start_client_cb(net_nfc_snep_handle_h arg_handle, } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) { nfc_snep_event_e snep_event; @@ -365,9 +365,9 @@ int nfc_snep_start_client(nfc_p2p_target_h target, CHECK_INIT(); CHECK_INVALID(target == NULL); - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { result = net_nfc_client_snep_start_client( (net_nfc_target_handle_h)target, @@ -400,9 +400,9 @@ static void _snep_send_request_cb(net_nfc_snep_handle_h target, } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) { callback((nfc_p2p_snep_h)target, @@ -434,9 +434,9 @@ int nfc_snep_send_client_request(nfc_p2p_snep_h handle, CHECK_INVALID(handle == NULL); CHECK_INVALID(msg == NULL); - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { result = net_nfc_client_snep_send_client_request( (net_nfc_target_handle_h)handle, @@ -469,9 +469,9 @@ static void _snep_event_cb(net_nfc_snep_handle_h target, net_nfc_snep_type_t eve } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) { switch ((int)event) { @@ -522,9 +522,9 @@ int nfc_snep_register_server(const char *san, int sap, CHECK_INVALID(san == NULL); CHECK_INVALID(sap == 0); - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { result = net_nfc_client_snep_register_server(san, (sap_t)sap, _snep_event_cb, parameter); diff --git a/src/nfc_p2p_handover.c b/src/nfc_p2p_handover.c index de4056f..a5b08b9 100755 --- a/src/nfc_p2p_handover.c +++ b/src/nfc_p2p_handover.c @@ -29,9 +29,9 @@ static void _p2p_handover_cb(net_nfc_error_e result, return; g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) { nfc_ac_type_e carrior_type; @@ -118,9 +118,9 @@ int nfc_p2p_connection_handover(nfc_p2p_target_h target, break; } - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_p2p_connection_handover( (net_nfc_target_handle_h)target, diff --git a/src/nfc_tag.c b/src/nfc_tag.c index adb752b..ec93f2e 100755 --- a/src/nfc_tag.c +++ b/src/nfc_tag.c @@ -52,9 +52,9 @@ static void _tag_format_ndef_cb(net_nfc_error_e result, } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) { callback(nfc_common_convert_error_code(__func__, result), @@ -93,9 +93,9 @@ int nfc_tag_format_ndef(nfc_tag_h tag, if (ret == NET_NFC_OK) { GVariant *parameter; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_ndef_format( handle, @@ -135,9 +135,9 @@ static void _tag_read_ndef_cb(net_nfc_error_e result, ndef_message_h message, } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) { callback(nfc_common_convert_error_code(__func__, result), @@ -167,9 +167,9 @@ int nfc_tag_read_ndef(nfc_tag_h tag, if (ret == NET_NFC_OK) { GVariant *parameter; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_ndef_read( handle, @@ -203,9 +203,9 @@ static void _tag_write_ndef_cb(net_nfc_error_e result, } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) callback(nfc_common_convert_error_code(__func__, result), user_param); @@ -261,9 +261,9 @@ int nfc_tag_write_ndef(nfc_tag_h tag, if (ret == NET_NFC_OK) { GVariant *parameter; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_ndef_write( handle, @@ -296,9 +296,9 @@ static void _tag_transceive_data_cb(net_nfc_error_e result, data_h arg_data, return; g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) { uint8_t *buffer = NULL; @@ -346,9 +346,9 @@ int nfc_tag_transceive(nfc_tag_h tag, if (ret == NET_NFC_OK) { GVariant *parameter; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_transceive_data( handle, @@ -506,9 +506,9 @@ static void _mifare_authenticate_with_keyA_cb(net_nfc_error_e result, } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) callback(nfc_common_convert_error_code(__func__, result), user_param); @@ -542,9 +542,9 @@ int nfc_mifare_authenticate_with_keyA(nfc_tag_h tag, if (ret == NET_NFC_OK) { GVariant *parameter; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_mifare_authenticate_with_keyA( handle, @@ -584,9 +584,9 @@ static void _mifare_authenticate_with_keyB_cb(net_nfc_error_e result, } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) callback(nfc_common_convert_error_code(__func__, result), user_param); @@ -622,9 +622,9 @@ int nfc_mifare_authenticate_with_keyB(nfc_tag_h tag, if (ret == NET_NFC_OK) { GVariant *parameter; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_mifare_authenticate_with_keyB( handle, @@ -664,9 +664,9 @@ static void _mifare_read_block_cb(net_nfc_error_e result, data_h data, } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) { uint8_t *buffer = NULL; @@ -707,9 +707,9 @@ int nfc_mifare_read_block(nfc_tag_h tag, if (ret == NET_NFC_OK) { GVariant *parameter; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_mifare_read( handle, @@ -745,9 +745,9 @@ int nfc_mifare_read_page(nfc_tag_h tag, CHECK_INIT(); CHECK_INVALID(tag == NULL); - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { g_variant_unref(parameter); ret = NET_NFC_OK; @@ -773,9 +773,9 @@ static void _mifare_write_block_cb(net_nfc_error_e result, void *user_data) } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) callback(nfc_common_convert_error_code(__func__, result), user_param); @@ -814,9 +814,9 @@ int nfc_mifare_write_block(nfc_tag_h tag, if (ret == NET_NFC_OK) { GVariant *parameter; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_mifare_write_block( handle, @@ -856,9 +856,9 @@ static void _mifare_write_page_cb(net_nfc_error_e result, void *user_data) } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) callback(nfc_common_convert_error_code(__func__, result), user_param); @@ -896,9 +896,9 @@ int nfc_mifare_write_page(nfc_tag_h tag, if (ret == NET_NFC_OK) { GVariant *parameter; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_mifare_write_page( handle, @@ -938,9 +938,9 @@ static void _mifare_increment_cb(net_nfc_error_e result, void *user_data) } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) callback(nfc_common_convert_error_code(__func__, result), user_param); @@ -971,9 +971,9 @@ int nfc_mifare_increment(nfc_tag_h tag, if (ret == NET_NFC_OK) { GVariant *parameter; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_mifare_increment( handle, @@ -1008,9 +1008,9 @@ static void _mifare_decrement_cb(net_nfc_error_e result, void *user_data) } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) callback(nfc_common_convert_error_code(__func__, result), user_param); @@ -1041,9 +1041,9 @@ int nfc_mifare_decrement(nfc_tag_h tag, if (ret == NET_NFC_OK) { GVariant *parameter; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_mifare_decrement( handle, @@ -1078,9 +1078,9 @@ static void _mifare_transfer_cb(net_nfc_error_e result, void *user_data) } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) callback(nfc_common_convert_error_code(__func__, result), user_param); @@ -1110,9 +1110,9 @@ int nfc_mifare_transfer(nfc_tag_h tag, if (ret == NET_NFC_OK) { GVariant *parameter; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_mifare_transfer( handle, @@ -1146,9 +1146,9 @@ static void _mifare_restore_cb(net_nfc_error_e result, void *user_data) } g_variant_get((GVariant *)user_data, - "(uu)", - (guint *)&callback, - (guint *)&user_param); + "(tt)", + &callback, + &user_param); if (callback != NULL) callback(nfc_common_convert_error_code(__func__, result), user_param); @@ -1178,9 +1178,9 @@ int nfc_mifare_restore(nfc_tag_h tag, if (ret == NET_NFC_OK) { GVariant *parameter; - parameter = g_variant_new("(uu)", - GPOINTER_TO_UINT(callback), - GPOINTER_TO_UINT(user_data)); + parameter = g_variant_new("(tt)", + callback, + user_data); if (parameter != NULL) { ret = net_nfc_client_mifare_restore( handle,