flip_store_storage.h 998 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef FLIP_STORE_STORAGE_H
  2. #define FLIP_STORE_STORAGE_H
  3. #include <furi.h>
  4. #include <storage/storage.h>
  5. #include <flip_store.h>
  6. #define SETTINGS_PATH STORAGE_EXT_PATH_PREFIX "/apps_data/flip_store/settings.bin"
  7. #define BUFFER_SIZE 64
  8. #define MAX_KEY_LENGTH 16
  9. #define MAX_VALUE_LENGTH 100
  10. void save_settings(
  11. const char *ssid,
  12. const char *password);
  13. bool load_settings(
  14. char *ssid,
  15. size_t ssid_size,
  16. char *password,
  17. size_t password_size);
  18. bool delete_app(const char *app_id, const char *app_category);
  19. bool app_exists(const char *app_id, const char *app_category);
  20. // Function to parse JSON incrementally from a file
  21. bool parse_json_incrementally(const char *file_path, const char *target_key, char *value_buffer, size_t value_buffer_size);
  22. bool save_char(
  23. const char *path_name, const char *value);
  24. bool load_char(
  25. const char *path_name,
  26. char *value,
  27. size_t value_size);
  28. bool save_char_with_path(const char *full_path, const char *value);
  29. #endif