hex_viewer_storage.h 953 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <storage/storage.h>
  5. #include <flipper_format/flipper_format_i.h>
  6. #include "../hex_viewer.h"
  7. #define HEX_VIEWER_SETTINGS_FILE_VERSION 1
  8. #define CONFIG_FILE_DIRECTORY_PATH EXT_PATH("apps_data/hex_viewer")
  9. #define HEX_VIEWER_SETTINGS_SAVE_PATH CONFIG_FILE_DIRECTORY_PATH "/hex_viewer.conf"
  10. #define HEX_VIEWER_SETTINGS_SAVE_PATH_TMP HEX_VIEWER_SETTINGS_SAVE_PATH ".tmp"
  11. #define HEX_VIEWER_SETTINGS_HEADER "HexViewer Config File"
  12. #define HEX_VIEWER_SETTINGS_KEY_HAPTIC "Haptic"
  13. #define HEX_VIEWER_SETTINGS_KEY_LED "Led"
  14. #define HEX_VIEWER_SETTINGS_KEY_SPEAKER "Speaker"
  15. #define HEX_VIEWER_SETTINGS_KEY_SAVE_SETTINGS "SaveSettings"
  16. void hex_viewer_save_settings(void* context);
  17. void hex_viewer_read_settings(void* context);
  18. bool hex_viewer_open_file(void* context, const char* file_path);
  19. bool hex_viewer_read_file(void* context);