storage.h 860 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #include <furi.h>
  3. #include <storage/storage.h>
  4. #include <flip_world.h>
  5. #define SETTINGS_PATH STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/settings.bin"
  6. void save_settings(
  7. const char *ssid,
  8. const char *password);
  9. bool load_settings(
  10. char *ssid,
  11. size_t ssid_size,
  12. char *password,
  13. size_t password_size);
  14. bool save_char(
  15. const char *path_name, const char *value);
  16. bool load_char(
  17. const char *path_name,
  18. char *value,
  19. size_t value_size);
  20. bool save_world(
  21. const char *name,
  22. const char *world_data);
  23. bool save_world_furi(FuriString *name, FuriString *world_data);
  24. bool load_world(
  25. const char *name,
  26. char *json_data,
  27. size_t json_data_size);
  28. FuriString *load_furi_world(
  29. const char *name);
  30. bool world_exists(
  31. const char *name);
  32. bool save_world_names(const FuriString *json);