You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
726B

  1. #pragma once
  2. #include "common.hpp"
  3. #include <jansson.h>
  4. namespace rack {
  5. struct PatchManager {
  6. /** The currently loaded patch file path */
  7. std::string path;
  8. /** Enables certain compatibility behavior based on the value */
  9. int legacy;
  10. std::string warningLog;
  11. void init(std::string path);
  12. void reset();
  13. void resetDialog();
  14. void save(std::string path);
  15. void saveDialog();
  16. void saveAsDialog();
  17. void saveTemplateDialog();
  18. bool load(std::string path);
  19. void loadDialog();
  20. /** If `lastPath` is defined, ask the user to reload it */
  21. void revertDialog();
  22. /** Disconnects all cables */
  23. void disconnectDialog();
  24. json_t *toJson();
  25. void fromJson(json_t *rootJ);
  26. bool isLegacy(int level);
  27. };
  28. } // namespace rack