if (net_nfc_gdbus_tag_call_is_tag_connected_finish(
NET_NFC_GDBUS_TAG(source_object),
+ &out_result,
&out_is_connected,
(gint32 *)&out_dev_type,
res,
if (net_nfc_gdbus_tag_call_get_current_tag_info_finish (
NET_NFC_GDBUS_TAG(source_object),
+ &out_result,
&out_is_connected,
&out_handle,
(gint *)&out_dev_type,
if (net_nfc_gdbus_tag_call_get_current_target_handle_finish(
NET_NFC_GDBUS_TAG(source_object),
+ &out_result,
&out_is_connected,
(guint *)&out_handle,
(gint *)&out_dev_type,
/* try to request target information from server */
if (net_nfc_gdbus_tag_call_is_tag_connected_sync(tag_proxy,
net_nfc_client_gdbus_get_privilege(),
+ &result,
&out_is_connected,
(gint *)&out_dev_type,
NULL,
/* try to request target information from server */
if (net_nfc_gdbus_tag_call_get_current_tag_info_sync(tag_proxy,
net_nfc_client_gdbus_get_privilege(),
+ &result,
&out_is_connected,
&out_handle,
(gint *)&out_dev_type,
if (net_nfc_gdbus_tag_call_get_current_target_handle_sync(
tag_proxy,
net_nfc_client_gdbus_get_privilege(),
+ &result,
&out_is_connected,
&out_handle,
(gint *)&out_dev_type,
error->message);
g_error_free(error);
- return NET_NFC_IPC_FAIL;
+ return result;
}
if (out_is_connected == true) {
-->
<method name="IsTagConnected">
<arg type="a(y)" name="privilege" direction="in" />
+ <arg type="i" name="result" direction="out" />
<arg type="b" name="is_connected" direction="out" />
<arg type="i" name="dev_type" direction="out" />
</method>
-->
<method name="GetCurrentTagInfo">
<arg type="a(y)" name="privilege" direction="in" />
+ <arg type="i" name="result" direction="out" />
<arg type="b" name="is_connected" direction="out" />
<arg type="u" name="handle" direction="out" />
<arg type="i" name="dev_type" direction="out" />
-->
<method name="GetCurrentTargetHandle">
<arg type="a(y)" name="privilege" direction="in" />
+ <arg type="i" name="result" direction="out" />
<arg type="b" name="is_connected" direction="out" />
<arg type="u" name="handle" direction="out" />
<arg type="i" name="dev_type" direction="out" />
<signal name="Received">
<arg type="a(y)" name="data" />
</signal>
-
</interface>
+
<interface name="org.tizen.NetNfcService.Popup">
<!--
Set
/* IMPORTANT, TEMPORARY : switching context to another thread
- for give CPU time */
+ for give CPU time */
g_usleep(10000);
handle = watch_dog->handle;
/* FIXME : net_nfc_current_target_info_s should be removed */
net_nfc_current_target_info_s *target_info;
- net_nfc_error_e result;
+ net_nfc_error_e result = NET_NFC_OPERATION_FAIL;
net_nfc_target_handle_s *handle = NULL;
net_nfc_target_type_e dev_type = NET_NFC_UNKNOWN_TARGET;
gboolean is_ndef_supported = FALSE;
net_nfc_gdbus_tag_complete_get_current_tag_info(info_data->tag,
info_data->invocation,
+ result,
(dev_type != NET_NFC_UNKNOWN_TARGET),
GPOINTER_TO_UINT(handle),
dev_type,
net_nfc_current_target_info_s *target_info;
net_nfc_target_type_e dev_type = NET_NFC_UNKNOWN_TARGET;
gboolean is_connected = FALSE;
+ gint result;
NFC_INFO(">>> REQUEST from [%s]",
g_dbus_method_invocation_get_sender(invocation));
"nfc-manager::tag",
"r") == false) {
NFC_ERR("permission denied, and finished request");
+ result = NET_NFC_SECURITY_FAIL;
- return FALSE;
+ goto END;
}
target_info = net_nfc_server_get_target_info();
is_connected = TRUE;
}
+ result = NET_NFC_OK;
+
+END :
net_nfc_gdbus_tag_complete_is_tag_connected(tag,
invocation,
+ result,
is_connected,
(gint32)dev_type);
net_nfc_current_target_info_s *target_info;
net_nfc_target_handle_s *handle = NULL;
uint32_t devType = NET_NFC_UNKNOWN_TARGET;
+ gint result;
NFC_INFO(">>> REQUEST from [%s]",
g_dbus_method_invocation_get_sender(invocation));
"nfc-manager::p2p",
"r") == false) {
NFC_ERR("permission denied, and finished request");
+ result = NET_NFC_SECURITY_FAIL;
- return FALSE;
+ goto END;
}
target_info = net_nfc_server_get_target_info();
devType = target_info->devType;
}
+ result = NET_NFC_OK;
+
+END :
net_nfc_gdbus_tag_complete_get_current_target_handle(tag,
invocation,
+ result,
(handle != NULL),
GPOINTER_TO_UINT(handle),
devType);