diff --git a/applications/main/nfc/scenes/nfc_scene_config.h b/applications/main/nfc/scenes/nfc_scene_config.h index 71c257d20..76ce419c0 100644 --- a/applications/main/nfc/scenes/nfc_scene_config.h +++ b/applications/main/nfc/scenes/nfc_scene_config.h @@ -40,7 +40,7 @@ ADD_SCENE(nfc, emv_read_success, EmvReadSuccess) ADD_SCENE(nfc, emv_menu, EmvMenu) ADD_SCENE(nfc, passport_read, PassportReadSuccess) ADD_SCENE(nfc, passport_menu, PassportMenu) -ADD_SCENE(nfc, passport_bac, PassportBac) //TODO: rename to Auth +ADD_SCENE(nfc, passport_auth, PassportAuth) ADD_SCENE(nfc, passport_date, PassportDate) ADD_SCENE(nfc, passport_docnr, PassportDocNr) ADD_SCENE(nfc, passport_pace_todo, PassportPaceTodo) diff --git a/applications/main/nfc/scenes/nfc_scene_passport_bac.c b/applications/main/nfc/scenes/nfc_scene_passport_auth.c similarity index 89% rename from applications/main/nfc/scenes/nfc_scene_passport_bac.c rename to applications/main/nfc/scenes/nfc_scene_passport_auth.c index ca4efb6bd..79c74a954 100644 --- a/applications/main/nfc/scenes/nfc_scene_passport_bac.c +++ b/applications/main/nfc/scenes/nfc_scene_passport_auth.c @@ -1,6 +1,6 @@ #include "../nfc_i.h" -#define TAG "PassportBac" +#define TAG "PassportAuth" #define MRTD_AUTH_METHOD_COUNT 2 // Indexes must match MrtdAuthMethod (lib/nfc/protocols/mrtd.h) @@ -17,19 +17,19 @@ typedef enum { NfcScenePassportAuthSelectAuth, } NfcScenePassportAuthSelect; -void nfc_scene_passport_bac_var_list_enter_callback(void* context, uint32_t index) { +void nfc_scene_passport_auth_var_list_enter_callback(void* context, uint32_t index) { Nfc* nfc = context; view_dispatcher_send_custom_event(nfc->view_dispatcher, index); } -void nfc_scene_passport_bac_auth_method_changed(VariableItem* item) { +void nfc_scene_passport_auth_method_changed(VariableItem* item) { Nfc* nfc = variable_item_get_context(item); uint8_t index = variable_item_get_current_value_index(item); nfc->dev->dev_data.mrtd_data.auth.method = index; variable_item_set_current_value_text(item, mrtd_auth_method_text[index]); } -void nfc_scene_passport_bac_on_enter(void* context) { +void nfc_scene_passport_auth_on_enter(void* context) { Nfc* nfc = context; VariableItemList* variable_item_list = nfc->variable_item_list; @@ -73,7 +73,7 @@ void nfc_scene_passport_bac_on_enter(void* context) { variable_item_list, "Method", MRTD_AUTH_METHOD_COUNT, - nfc_scene_passport_bac_auth_method_changed, + nfc_scene_passport_auth_method_changed, nfc); value_index = nfc->dev->dev_data.mrtd_data.auth.method; @@ -83,11 +83,11 @@ void nfc_scene_passport_bac_on_enter(void* context) { variable_item_list_add(variable_item_list, "Authenticate and read", 1, NULL, NULL); variable_item_list_set_enter_callback( - variable_item_list, nfc_scene_passport_bac_var_list_enter_callback, nfc); + variable_item_list, nfc_scene_passport_auth_var_list_enter_callback, nfc); view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewVarItemList); } -bool nfc_scene_passport_bac_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_passport_auth_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = context; bool consumed = false; @@ -125,7 +125,7 @@ bool nfc_scene_passport_bac_on_event(void* context, SceneManagerEvent event) { return consumed; } -void nfc_scene_passport_bac_on_exit(void* context) { +void nfc_scene_passport_auth_on_exit(void* context) { Nfc* nfc = context; // Clear view diff --git a/applications/main/nfc/scenes/nfc_scene_passport_date.c b/applications/main/nfc/scenes/nfc_scene_passport_date.c index cee59038f..d2d2f92a9 100644 --- a/applications/main/nfc/scenes/nfc_scene_passport_date.c +++ b/applications/main/nfc/scenes/nfc_scene_passport_date.c @@ -110,7 +110,7 @@ bool nfc_scene_passport_date_on_event(void* context, SceneManagerEvent event) { //TODO: handle invalid date (returned false) consumed = scene_manager_search_and_switch_to_previous_scene( - nfc->scene_manager, NfcScenePassportBac); + nfc->scene_manager, NfcScenePassportAuth); } } return consumed; diff --git a/applications/main/nfc/scenes/nfc_scene_passport_docnr.c b/applications/main/nfc/scenes/nfc_scene_passport_docnr.c index a4ee1c2cd..109415759 100644 --- a/applications/main/nfc/scenes/nfc_scene_passport_docnr.c +++ b/applications/main/nfc/scenes/nfc_scene_passport_docnr.c @@ -54,7 +54,7 @@ bool nfc_scene_passport_docnr_on_event(void* context, SceneManagerEvent event) { nfc_scene_passport_docnr_save(nfc); consumed = scene_manager_search_and_switch_to_previous_scene( - nfc->scene_manager, NfcScenePassportBac); + nfc->scene_manager, NfcScenePassportAuth); } } return consumed; diff --git a/applications/main/nfc/scenes/nfc_scene_passport_pace_todo.c b/applications/main/nfc/scenes/nfc_scene_passport_pace_todo.c index e3a5fe0cb..c6d7d7f6c 100644 --- a/applications/main/nfc/scenes/nfc_scene_passport_pace_todo.c +++ b/applications/main/nfc/scenes/nfc_scene_passport_pace_todo.c @@ -26,7 +26,7 @@ bool nfc_scene_passport_pace_todo_on_event(void* context, SceneManagerEvent even if(event.type == SceneManagerEventTypeCustom) { if(event.event == NfcCustomEventViewExit) { consumed = scene_manager_search_and_switch_to_previous_scene( - nfc->scene_manager, NfcScenePassportBac); + nfc->scene_manager, NfcScenePassportAuth); } } return consumed; diff --git a/applications/main/nfc/scenes/nfc_scene_passport_read.c b/applications/main/nfc/scenes/nfc_scene_passport_read.c index 37547224d..55b9cae0b 100644 --- a/applications/main/nfc/scenes/nfc_scene_passport_read.c +++ b/applications/main/nfc/scenes/nfc_scene_passport_read.c @@ -52,7 +52,7 @@ bool nfc_scene_passport_read_on_event(void* context, SceneManagerEvent event) { scene_manager_next_scene(nfc->scene_manager, NfcSceneRetryConfirm); consumed = true; } else if(event.event == GuiButtonTypeCenter) { - scene_manager_next_scene(nfc->scene_manager, NfcScenePassportBac); + scene_manager_next_scene(nfc->scene_manager, NfcScenePassportAuth); consumed = true; } else if(event.event == GuiButtonTypeRight) { scene_manager_next_scene(nfc->scene_manager, NfcScenePassportMenu);