web_crawler_callback.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. #ifndef WEB_CRAWLER_CALLBACK_H
  2. #define WEB_CRAWLER_CALLBACK_H
  3. #include "web_crawler.h"
  4. #include <flip_storage/web_crawler_storage.h>
  5. extern bool sent_http_request;
  6. extern bool get_success;
  7. extern bool already_success;
  8. void web_crawler_http_method_change(VariableItem *item);
  9. void web_crawler_view_draw_callback(Canvas *canvas, void *context);
  10. /**
  11. * @brief Navigation callback to handle exiting from other views to the submenu.
  12. * @param context The context - WebCrawlerApp object.
  13. * @return WebCrawlerViewSubmenu
  14. */
  15. uint32_t web_crawler_back_to_configure_callback(void *context);
  16. /**
  17. * @brief Navigation callback to handle returning to the Wifi Settings screen.
  18. * @param context The context - WebCrawlerApp object.
  19. * @return WebCrawlerViewSubmenu
  20. */
  21. uint32_t web_crawler_back_to_main_callback(void *context);
  22. uint32_t web_crawler_back_to_file_callback(void *context);
  23. uint32_t web_crawler_back_to_wifi_callback(void *context);
  24. uint32_t web_crawler_back_to_request_callback(void *context);
  25. /**
  26. * @brief Navigation callback to handle exiting the app from the main submenu.
  27. * @param context The context - unused
  28. * @return VIEW_NONE to exit the app
  29. */
  30. uint32_t web_crawler_exit_app_callback(void *context);
  31. /**
  32. * @brief Handle submenu item selection.
  33. * @param context The context - WebCrawlerApp object.
  34. * @param index The WebCrawlerSubmenuIndex item that was clicked.
  35. */
  36. void web_crawler_submenu_callback(void *context, uint32_t index);
  37. /**
  38. * @brief Configuration enter callback to handle different items.
  39. * @param context The context - WebCrawlerApp object.
  40. * @param index The index of the item that was clicked.
  41. */
  42. void web_crawler_wifi_enter_callback(void *context, uint32_t index);
  43. /**
  44. * @brief Configuration enter callback to handle different items.
  45. * @param context The context - WebCrawlerApp object.
  46. * @param index The index of the item that was clicked.
  47. */
  48. void web_crawler_file_enter_callback(void *context, uint32_t index);
  49. /**
  50. * @brief Configuration enter callback to handle different items.
  51. * @param context The context - WebCrawlerApp object.
  52. * @param index The index of the item that was clicked.
  53. */
  54. void web_crawler_request_enter_callback(void *context, uint32_t index);
  55. /**
  56. * @brief Callback for when the user finishes entering the URL.
  57. * @param context The context - WebCrawlerApp object.
  58. */
  59. void web_crawler_set_path_updated(void *context);
  60. /**
  61. * @brief Callback for when the user finishes entering the headers
  62. * @param context The context - WebCrawlerApp object.
  63. */
  64. void web_crawler_set_headers_updated(void *context);
  65. /**
  66. * @brief Callback for when the user finishes entering the payload.
  67. * @param context The context - WebCrawlerApp object.
  68. */
  69. void web_crawler_set_payload_updated(void *context);
  70. /**
  71. * @brief Callback for when the user finishes entering the SSID.
  72. * @param context The context - WebCrawlerApp object.
  73. */
  74. void web_crawler_set_ssid_updated(void *context);
  75. /**
  76. * @brief Callback for when the user finishes entering the Password.
  77. * @param context The context - WebCrawlerApp object.
  78. */
  79. void web_crawler_set_password_update(void *context);
  80. /**
  81. * @brief Callback for when the user finishes entering the File Type.
  82. * @param context The context - WebCrawlerApp object.
  83. */
  84. void web_crawler_set_file_type_update(void *context);
  85. /**
  86. * @brief Callback for when the user finishes entering the File Rename.
  87. * @param context The context - WebCrawlerApp object.
  88. */
  89. void web_crawler_set_file_rename_update(void *context);
  90. /**
  91. * @brief Handler for Path configuration item click.
  92. * @param context The context - WebCrawlerApp object.
  93. * @param index The index of the item that was clicked.
  94. */
  95. void web_crawler_setting_item_path_clicked(void *context, uint32_t index);
  96. /**
  97. * @brief Handler for headers configuration item click.
  98. * @param context The context - WebCrawlerApp object.
  99. * @param index The index of the item that was clicked.
  100. */
  101. void web_crawler_setting_item_headers_clicked(void *context, uint32_t index);
  102. /**
  103. * @brief Handler for payload configuration item click.
  104. * @param context The context - WebCrawlerApp object.
  105. * @param index The index of the item that was clicked.
  106. */
  107. void web_crawler_setting_item_payload_clicked(void *context, uint32_t index);
  108. /**
  109. * @brief Handler for SSID configuration item click.
  110. * @param context The context - WebCrawlerApp object.
  111. * @param index The index of the item that was clicked.
  112. */
  113. void web_crawler_setting_item_ssid_clicked(void *context, uint32_t index);
  114. /**
  115. * @brief Handler for Password configuration item click.
  116. * @param context The context - WebCrawlerApp object.
  117. * @param index The index of the item that was clicked.
  118. */
  119. void web_crawler_setting_item_password_clicked(void *context, uint32_t index);
  120. /**
  121. * @brief Handler for File Type configuration item click.
  122. * @param context The context - WebCrawlerApp object.
  123. * @param index The index of the item that was clicked.
  124. */
  125. void web_crawler_setting_item_file_type_clicked(void *context, uint32_t index);
  126. /**
  127. * @brief Handler for File Rename configuration item click.
  128. * @param context The context - WebCrawlerApp object.
  129. * @param index The index of the item that was clicked.
  130. */
  131. void web_crawler_setting_item_file_rename_clicked(void *context, uint32_t index);
  132. /**
  133. * @brief Handler for File Delete configuration item click.
  134. * @param context The context - WebCrawlerApp object.
  135. * @param index The index of the item that was clicked.
  136. */
  137. void web_crawler_setting_item_file_delete_clicked(void *context, uint32_t index);
  138. void web_crawler_setting_item_file_read_clicked(void *context, uint32_t index);
  139. #endif