From 78f3322f3135015cf996061a48e86954bf72361f Mon Sep 17 00:00:00 2001 From: Jihoon Jung Date: Thu, 26 Sep 2024 14:38:10 +0900 Subject: [PATCH] Update API documents Change-Id: I6ce7efac33709ffdbddcd2b20d59940ff52e2771 Signed-off-by: Jihoon Jung --- include/nfc.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/include/nfc.h b/include/nfc.h index d0e5451..0cf3f69 100644 --- a/include/nfc.h +++ b/include/nfc.h @@ -798,6 +798,7 @@ typedef void (*nfc_se_registered_aid_cb)(nfc_se_type_e se_type, const char *aid, /** * @brief Gets the value that indicates whether NFC is supported. + * @details This function returns true if the NFC feature is supported on the device, otherwise it returns false. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @@ -814,6 +815,8 @@ bool nfc_manager_is_supported(void); /** * @brief Sets NFC Activation state changed callback. + * @details This function sets a callback function to be invoked when the NFC activation state changes. + * The callback function will be called with the new activation state and the user data provided during registration. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @@ -834,6 +837,8 @@ int nfc_manager_set_activation_changed_cb(nfc_activation_changed_cb callback , v /** * @brief Unsets the callback function. + * @details This function unregisters the callback function previously set by nfc_manager_set_activation_changed_cb(). + * After calling this function, the callback function will no longer be called when the NFC activation state changes. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @@ -852,6 +857,11 @@ void nfc_manager_unset_activation_changed_cb(void); /** * @platform * @brief Sets NFC Activation. + * @details This function sets the NFC activation state. + * If the NFC state is set to true, NFC will be activated. + * If it is set to false, NFC will be deactivated. + * The provided callback function will be invoked after the activation or deactivation process is complete, + * and it can receive an error code indicating the result of the operation. * @since_tizen 2.3 * @privlevel platform * @privilege %http://tizen.org/privilege/nfc.admin @@ -882,6 +892,8 @@ int nfc_manager_set_activation(bool activation, nfc_activation_completed_cb call /** * @brief Gets NFC Activation state. + * @details This function checks the current state of NFC activation. + * It returns true if NFC is currently activated, and false if it is not. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. @@ -927,6 +939,9 @@ int nfc_manager_deinitialize(void); /** * @brief Sets a callback function for receiving tag discovered notification. + * @details This function sets a callback function that will be called when a tag is discovered or disappears. + * The callback function will be called with the user data provided as a parameter. + * This function must be called after the NFC manager has been initialized. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @@ -947,6 +962,9 @@ int nfc_manager_set_tag_discovered_cb(nfc_tag_discovered_cb callback, void *user /** * @brief Unsets the callback function. + * @details This function unsets the previously set callback function for receiving tag discovered notifications. + * After calling this function, the callback function will no longer be called when a tag is discovered or disappears. + * This function must be called after the NFC manager has been initialized. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @@ -964,6 +982,9 @@ void nfc_manager_unset_tag_discovered_cb(void); /** * @brief Sets a callback function for receiving NDEF Message discovered notification. + * @details This function sets a callback function that will be called when an NDEF message is discovered. + * The callback function will be called with the user data provided as a parameter. + * This function must be called after the NFC manager has been initialized. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @@ -984,6 +1005,9 @@ int nfc_manager_set_ndef_discovered_cb(nfc_ndef_discovered_cb callback, void *us /** * @brief Unsets the callback function. + * @details This function unsets the previously set callback function for receiving NDEF message discovered notifications. + * After calling this function, the callback function will no longer be called when an NDEF message is discovered. + * This function must be called after the NFC manager has been initialized. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @@ -1002,6 +1026,9 @@ void nfc_manager_unset_ndef_discovered_cb(void); /** * @brief Sets a callback function for receiving NFC peer-to-peer target discovered notification. + * @details This function sets a callback function that will be called when an NFC peer-to-peer target is discovered. + * The callback function will be called with the user data provided as a parameter. + * This function must be called after the NFC manager has been initialized. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @@ -1022,6 +1049,9 @@ int nfc_manager_set_p2p_target_discovered_cb(nfc_p2p_target_discovered_cb callba /** * @brief Unsets the callback function. + * @details This function unsets the previously set callback function for receiving NFC peer-to-peer target discovered notifications. + * After calling this function, the callback function will no longer be called when an NFC peer-to-peer target is discovered. + * This function must be called after the NFC manager has been initialized. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @@ -1038,9 +1068,11 @@ int nfc_manager_set_p2p_target_discovered_cb(nfc_p2p_target_discovered_cb callba */ void nfc_manager_unset_p2p_target_discovered_cb(void); - /** * @brief Sets a callback function for receiving Secure Element (SIM/UICC (Universal Integrated Circuit Card)) event. + * @details This function sets a callback function that will be called when a Secure Element event occurs. + * The callback function will be called with the user data provided as a parameter. + * This function must be called after the NFC manager has been initialized. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @@ -1057,11 +1089,13 @@ void nfc_manager_unset_p2p_target_discovered_cb(void); * @see nfc_manager_unset_se_event_cb() * @see nfc_manager_initialize() */ - int nfc_manager_set_se_event_cb(nfc_se_event_cb callback, void *user_data); /** * @brief Unsets the callback function. + * @details This function unsets the previously set callback function for receiving Secure Element (SIM/UICC) event notifications. + * After calling this function, the callback function will no longer be called when a Secure Element (SIM/UICC) event occurs. + * This function must be called after the NFC manager has been initialized. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @@ -1080,6 +1114,10 @@ void nfc_manager_unset_se_event_cb(void); /** * @brief Sets a callback function for receiving Secure Element (SIM/UICC (Universal Integrated Circuit Card)) transaction event(#NFC_SE_EVENT_TRANSACTION) data. + * @details This function sets a callback function that will be called when + * a Secure Element (SIM/UICC) transaction event (#NFC_SE_EVENT_TRANSACTION) occurs. + * The callback function will be called with the user data provided as a parameter. + * This function must be called after the NFC manager has been initialized. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @@ -1101,6 +1139,11 @@ int nfc_manager_set_se_transaction_event_cb(nfc_se_type_e se_type, nfc_se_transa /** * @brief Unsets the callback function. + * @details This function unsets the previously set callback function for receiving Secure Element (SIM/UICC) + * transaction event (#NFC_SE_EVENT_TRANSACTION) notifications. + * After calling this function, the callback function will no longer be called when a Secure Element (SIM/UICC) + * transaction event (#NFC_SE_EVENT_TRANSACTION) occurs. + * This function must be called after the NFC manager has been initialized. * @since_tizen 2.3 * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. @@ -1121,6 +1164,9 @@ void nfc_manager_unset_se_transaction_event_cb(nfc_se_type_e se_type); /** * @brief Sets a callback function for receiving HCE (Host Card Emulation) event. + * @details This function sets a callback function that will be called when a Host Card Emulation (HCE) event occurs. + * The callback function will be called with the user data provided as a parameter. + * This function must be called after the NFC manager has been initialized. * @since_tizen 2.3.1 * @privlevel public * @privilege %http://tizen.org/privilege/nfc.cardemulation @@ -1144,6 +1190,9 @@ int nfc_manager_set_hce_event_cb(nfc_hce_event_cb callback, void *user_data); /** * @brief Unsets the callback function. + * @details This function unsets the previously set callback function for receiving Host Card Emulation (HCE) event notifications. + * After calling this function, the callback function will no longer be called when a Host Card Emulation (HCE) event occurs. + * This function must be called after the NFC manager has been initialized. * @since_tizen 2.3.1 * @privlevel public * @privilege %http://tizen.org/privilege/nfc.cardemulation -- 2.7.4