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.

52 lines
946B

  1. #pragma once
  2. #include <common.hpp>
  3. #include <vector>
  4. namespace rack {
  5. /** Synchronizes plugins with the VCV Library and updates Rack itself
  6. */
  7. namespace library {
  8. struct Update {
  9. std::string pluginSlug;
  10. std::string pluginName;
  11. std::string version;
  12. std::string changelogUrl;
  13. float progress = 0.f;
  14. };
  15. extern std::string version;
  16. extern std::string changelogUrl;
  17. extern float progress;
  18. void init();
  19. bool isLoggedIn();
  20. void logIn(const std::string& email, const std::string& password);
  21. void logOut();
  22. bool isUpdateAvailable();
  23. void queryUpdates();
  24. bool hasUpdates();
  25. void syncUpdate(Update* update);
  26. void syncUpdates();
  27. bool isSyncing();
  28. /** Updates Rack automatically or opens the browser to the URL.
  29. Blocking. Call on a detached thread.
  30. */
  31. void update();
  32. extern std::string loginStatus;
  33. extern std::vector<Update> updates;
  34. extern std::string updateStatus;
  35. extern bool restartRequested;
  36. } // namespace library
  37. } // namespace rack