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.

56 lines
1.1KB

  1. #pragma once
  2. #include <common.hpp>
  3. #include <map>
  4. namespace rack {
  5. /** Synchronizes plugins with the VCV Library and updates Rack itself
  6. */
  7. namespace library {
  8. struct UpdateInfo {
  9. std::string name;
  10. std::string version;
  11. std::string changelogUrl;
  12. bool downloaded = false;
  13. };
  14. void init();
  15. void destroy();
  16. void checkAppUpdate();
  17. bool isAppUpdateAvailable();
  18. bool isLoggedIn();
  19. void logIn(const std::string& email, const std::string& password);
  20. void logOut();
  21. void checkUpdates();
  22. bool hasUpdates();
  23. void syncUpdate(const std::string& slug);
  24. void syncUpdates();
  25. extern std::string appVersion;
  26. extern std::string appDownloadUrl;
  27. extern std::string appChangelogUrl;
  28. extern std::string loginStatus;
  29. // plugin slug -> UpdateInfo
  30. extern std::map<std::string, UpdateInfo> updateInfos;
  31. extern std::string updateStatus;
  32. extern std::string updateSlug;
  33. extern float updateProgress;
  34. /** Whether plugins are currently downloading. */
  35. extern bool isSyncing;
  36. /** Whether the UI should ask the user to restart after updating plugins. */
  37. extern bool restartRequested;
  38. } // namespace library
  39. } // namespace rack