*/
typedef void (*nfc_connection_handover_event_cb)(nfc_error_e result, nfc_handover_event_e event, nfc_ac_type_e carrier, char *address, nfc_ndef_message_h msg, void *user_data);
+typedef bool (*nfc_se_registered_handler_cb)(const char *handler, int count,
+ void *user_data);
/**
* @brief NFC Connection handover between NFC peer-to-peer target
*/
int nfc_se_get_registered_aids_count(nfc_se_type_e se_type, nfc_card_emulation_category_type_e category, int *count);
-int nfc_se_get_conflict_handlers_internal(const char *package, nfc_card_emulation_category_type_e category,
- const char *aid, char ***handlers);
+int nfc_se_get_conflict_handlers_internal(const char *package, nfc_card_emulation_category_type_e category, const char *aid, char ***handlers);
+
+int nfc_se_foreach_registered_handlers(nfc_card_emulation_category_type_e category, nfc_se_registered_handler_cb callback, void *user_data);
#ifdef __cplusplus
}
/* LCOV_EXCL_START */
CHECK_INIT();
CHECK_INVALID(count == NULL);
+ CHECK_ACTIVATED();
result = net_nfc_client_se_get_registered_aids_count_sync(
- (net_nfc_se_type_e)NFC_SE_TYPE_HCE,
+ (net_nfc_se_type_e)se_type,
(net_nfc_card_emulation_category_t)category,
(size_t *)count);
/* LCOV_EXCL_STOP */
}
+int nfc_se_foreach_registered_handlers(
+ nfc_card_emulation_category_type_e category,
+ nfc_se_registered_handler_cb callback, void *user_data)
+{
+ net_nfc_error_e result;
+
+ LOG_BEGIN();
+
+ CHECK_SUPPORTED(NFC_CE_HCE_FEATURE);
+ CHECK_INIT();
+ CHECK_INVALID(callback == NULL);
+
+ result = net_nfc_client_se_foreach_registered_handlers_sync(category,
+ callback, user_data);
+
+ return nfc_common_convert_error_code(__func__, result);
+}
+
int nfc_se_set_preferred_handler()
{
net_nfc_error_e result;