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.

53 lines
1.1KB

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