metroflip_api_table_i.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. #include "metroflip_api.h"
  2. #include "../../metroflip_i.h"
  3. /*
  4. * A list of app's private functions and objects to expose for plugins.
  5. * It is used to generate a table of symbols for import resolver to use.
  6. * TBD: automatically generate this table from app's header files
  7. */
  8. static constexpr auto metroflip_api_table = sort(create_array_t<sym_entry>(
  9. // metroflip stuff
  10. API_METHOD(metroflip_exit_widget_callback, void, (GuiButtonType, InputType, void*)),
  11. API_METHOD(metroflip_save_widget_callback, void, (GuiButtonType, InputType, void*)),
  12. API_METHOD(metroflip_delete_widget_callback, void, (GuiButtonType, InputType, void*)),
  13. API_METHOD(metroflip_app_blink_start, void, (Metroflip*)),
  14. API_METHOD(metroflip_app_blink_stop, void, (Metroflip*)),
  15. API_METHOD(bit_slice_to_dec, int, (const char*, int, int)),
  16. API_METHOD(byte_to_binary, void, (uint8_t, char*)),
  17. API_VARIABLE(read_file, uint8_t[5]),
  18. API_VARIABLE(apdu_success, uint8_t[2]),
  19. API_VARIABLE(select_app, uint8_t[8]),
  20. API_METHOD(mf_classic_key_cache_load, bool, (MfClassicKeyCache*, const uint8_t*, size_t)),
  21. API_METHOD(
  22. mf_classic_key_cache_get_next_key,
  23. bool,
  24. (MfClassicKeyCache*, uint8_t*, MfClassicKey*, MfClassicKeyType*)),
  25. API_METHOD(mf_classic_key_cache_reset, void, (MfClassicKeyCache*)),
  26. API_METHOD(
  27. manage_keyfiles,
  28. KeyfileManager,
  29. (char[], const uint8_t*, size_t, MfClassicKeyCache*, uint64_t, uint64_t)),
  30. API_METHOD(uid_to_string, void, (const uint8_t*, size_t, char*, size_t)),
  31. API_METHOD(
  32. handle_keyfile_case,
  33. void,
  34. (Metroflip*, const char*, const char*, FuriString*, char[])),
  35. // calypso
  36. API_METHOD(get_calypso_node_offset, int, (const char*, const char*, CalypsoApp*)),
  37. API_METHOD(get_network_string, const char*, (CALYPSO_CARD_TYPE)),
  38. API_METHOD(metroflip_back_button_widget_callback, void, (GuiButtonType, InputType, void*)),
  39. API_METHOD(metroflip_next_button_widget_callback, void, (GuiButtonType, InputType, void*)),
  40. API_METHOD(is_calypso_node_present, bool, (const char*, const char*, CalypsoApp*)),
  41. API_METHOD(get_calypso_node_size, int, (const char*, CalypsoApp*)),
  42. API_METHOD(free_calypso_structure, void, (CalypsoApp*)),
  43. API_METHOD(guess_card_type, CALYPSO_CARD_TYPE, (int, int)),
  44. // intercode
  45. API_METHOD(get_intercode_structure_env_holder, CalypsoApp*, ()),
  46. API_METHOD(get_intercode_structure_contract, CalypsoApp*, ()),
  47. API_METHOD(get_intercode_structure_event, CalypsoApp*, ()),
  48. API_METHOD(get_intercode_structure_counter, CalypsoApp*, ()),
  49. // navigo
  50. API_METHOD(show_navigo_event_info, void, (NavigoCardEvent*, NavigoCardContract*, FuriString*)),
  51. API_METHOD(show_navigo_special_event_info, void, (NavigoCardSpecialEvent*, FuriString*)),
  52. API_METHOD(show_navigo_contract_info, void, (NavigoCardContract*, FuriString*)),
  53. API_METHOD(show_navigo_environment_info, void, (NavigoCardEnv*, NavigoCardHolder*, FuriString*)),
  54. // opus
  55. API_METHOD(get_opus_contract_structure, CalypsoApp*, ()),
  56. API_METHOD(get_opus_event_structure, CalypsoApp*, ()),
  57. API_METHOD(get_opus_env_holder_structure, CalypsoApp*, ()),
  58. API_METHOD(show_opus_event_info, void, (OpusCardEvent*, OpusCardContract*, FuriString*)),
  59. API_METHOD(show_opus_contract_info, void, (OpusCardContract*, FuriString*)),
  60. API_METHOD(show_opus_environment_info, void, (OpusCardEnv*, OpusCardHolder*, FuriString*)),
  61. // ravkav
  62. API_METHOD(get_ravkav_contract_structure, CalypsoApp*, ()),
  63. API_METHOD(get_ravkav_event_structure, CalypsoApp*, ()),
  64. API_METHOD(get_ravkav_env_holder_structure, CalypsoApp*, ()),
  65. API_METHOD(show_ravkav_event_info, void, (RavKavCardEvent*, FuriString*)),
  66. API_METHOD(show_ravkav_contract_info, void, (RavKavCardContract*, FuriString*)),
  67. API_METHOD(show_ravkav_environment_info, void, (RavKavCardEnv*, FuriString*)),
  68. API_VARIABLE(I_RFIDDolphinReceive_97x61, Icon),
  69. API_VARIABLE(I_icon, Icon),
  70. // Suica
  71. API_VARIABLE(I_Suica_AsakusaA, Icon),
  72. API_VARIABLE(I_Suica_BigStar, Icon),
  73. API_VARIABLE(I_Suica_ChiyodaC, Icon),
  74. API_VARIABLE(I_Suica_CrackingEgg, Icon),
  75. API_VARIABLE(I_Suica_DashLine, Icon),
  76. API_VARIABLE(I_Suica_EmptyArrowDown, Icon),
  77. API_VARIABLE(I_Suica_EmptyArrowRight, Icon),
  78. API_VARIABLE(I_Suica_EntrySlider1, Icon),
  79. API_VARIABLE(I_Suica_EntrySlider2, Icon),
  80. API_VARIABLE(I_Suica_EntrySlider3, Icon),
  81. API_VARIABLE(I_Suica_EntryStopL1, Icon),
  82. API_VARIABLE(I_Suica_EntryStopL2, Icon),
  83. API_VARIABLE(I_Suica_EntryStopL3, Icon),
  84. API_VARIABLE(I_Suica_EntryStopR1, Icon),
  85. API_VARIABLE(I_Suica_EntryStopR2, Icon),
  86. API_VARIABLE(I_Suica_EntryStopR3, Icon),
  87. API_VARIABLE(I_Suica_FilledArrowDown, Icon),
  88. API_VARIABLE(I_Suica_FilledArrowRight, Icon),
  89. API_VARIABLE(I_Suica_GinzaG, Icon),
  90. API_VARIABLE(I_Suica_HanzomonZ, Icon),
  91. API_VARIABLE(I_Suica_HibiyaH, Icon),
  92. API_VARIABLE(I_Suica_JRLogo, Icon),
  93. API_VARIABLE(I_Suica_KeikyuKK, Icon),
  94. API_VARIABLE(I_Suica_KeikyuLogo, Icon),
  95. API_VARIABLE(I_Suica_MarunouchiHonanchoMb, Icon),
  96. API_VARIABLE(I_Suica_MarunouchiM, Icon),
  97. API_VARIABLE(I_Suica_MinusSign0, Icon),
  98. API_VARIABLE(I_Suica_MinusSign1, Icon),
  99. API_VARIABLE(I_Suica_MinusSign2, Icon),
  100. API_VARIABLE(I_Suica_MinusSign3, Icon),
  101. API_VARIABLE(I_Suica_MinusSign4, Icon),
  102. API_VARIABLE(I_Suica_MinusSign5, Icon),
  103. API_VARIABLE(I_Suica_MinusSign6, Icon),
  104. API_VARIABLE(I_Suica_MinusSign7, Icon),
  105. API_VARIABLE(I_Suica_MinusSign8, Icon),
  106. API_VARIABLE(I_Suica_MinusSign9, Icon),
  107. API_VARIABLE(I_Suica_MitaI, Icon),
  108. API_VARIABLE(I_Suica_MobileLogo, Icon),
  109. API_VARIABLE(I_Suica_NambokuN, Icon),
  110. API_VARIABLE(I_Suica_Nothing, Icon),
  111. API_VARIABLE(I_Suica_OedoE, Icon),
  112. API_VARIABLE(I_Suica_PenguinHappyBirthday, Icon),
  113. API_VARIABLE(I_Suica_PenguinTodaysVIP, Icon),
  114. API_VARIABLE(I_Suica_PlusSign1, Icon),
  115. API_VARIABLE(I_Suica_PlusSign2, Icon),
  116. API_VARIABLE(I_Suica_PlusSign3, Icon),
  117. API_VARIABLE(I_Suica_PlusStar, Icon),
  118. API_VARIABLE(I_Suica_QuestionMarkBig, Icon),
  119. API_VARIABLE(I_Suica_QuestionMarkSmall, Icon),
  120. API_VARIABLE(I_Suica_RinkaiR, Icon),
  121. API_VARIABLE(I_Suica_ShinjukuS, Icon),
  122. API_VARIABLE(I_Suica_ShopPin, Icon),
  123. API_VARIABLE(I_Suica_SmallStar, Icon),
  124. API_VARIABLE(I_Suica_StoreFan1, Icon),
  125. API_VARIABLE(I_Suica_StoreFan2, Icon),
  126. API_VARIABLE(I_Suica_StoreFrame, Icon),
  127. API_VARIABLE(I_Suica_StoreLightningHorizontal, Icon),
  128. API_VARIABLE(I_Suica_StoreLightningVertical, Icon),
  129. API_VARIABLE(I_Suica_StoreP1Counter, Icon),
  130. API_VARIABLE(I_Suica_StoreReceiptDashLine, Icon),
  131. API_VARIABLE(I_Suica_StoreReceiptFrame1, Icon),
  132. API_VARIABLE(I_Suica_StoreReceiptFrame2, Icon),
  133. API_VARIABLE(I_Suica_StoreSlidingDoor, Icon),
  134. API_VARIABLE(I_Suica_TWRLogo, Icon),
  135. API_VARIABLE(I_Suica_ToeiLogo, Icon),
  136. API_VARIABLE(I_Suica_TokyoMetroLogo, Icon),
  137. API_VARIABLE(I_Suica_TokyoMonorailLogo, Icon),
  138. API_VARIABLE(I_Suica_TozaiT, Icon),
  139. API_VARIABLE(I_Suica_VendingCan1, Icon),
  140. API_VARIABLE(I_Suica_VendingCan2, Icon),
  141. API_VARIABLE(I_Suica_VendingCan3, Icon),
  142. API_VARIABLE(I_Suica_VendingCan4, Icon),
  143. API_VARIABLE(I_Suica_VendingFlap1, Icon),
  144. API_VARIABLE(I_Suica_VendingFlap2, Icon),
  145. API_VARIABLE(I_Suica_VendingFlap3, Icon),
  146. API_VARIABLE(I_Suica_VendingFlapHollow, Icon),
  147. API_VARIABLE(I_Suica_VendingMachine, Icon),
  148. API_VARIABLE(I_Suica_VendingPage2Full, Icon),
  149. API_VARIABLE(I_Suica_VendingThankYou, Icon),
  150. API_VARIABLE(I_Suica_YenKanji, Icon),
  151. API_VARIABLE(I_Suica_YenSign, Icon),
  152. API_VARIABLE(I_Suica_YurakuchoY, Icon),
  153. API_VARIABLE(I_Suica_CardIcon, Icon),
  154. API_VARIABLE(I_Suica_ShopIcon, Icon),
  155. API_VARIABLE(I_Suica_VendingIcon, Icon),
  156. API_VARIABLE(I_Suica_TrainIcon, Icon),
  157. API_VARIABLE(I_Suica_BdayCakeIcon, Icon),
  158. API_VARIABLE(I_Suica_UnknownIcon, Icon),
  159. API_METHOD(render_section_header, void, (FuriString*, const char*, uint8_t, uint8_t)),
  160. API_METHOD(mosgortrans_parse_transport_block, bool, (const MfClassicBlock*, FuriString*)),
  161. API_VARIABLE(I_WarningDolphinFlip_45x42, Icon),
  162. API_VARIABLE(I_DolphinDone_80x58, Icon),
  163. API_VARIABLE(I_DolphinMafia_119x62, Icon)));