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.

library.hpp 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. PRIVATE void init();
  14. PRIVATE void destroy();
  15. PRIVATE void checkAppUpdate();
  16. bool isAppUpdateAvailable();
  17. bool isLoggedIn();
  18. PRIVATE void logIn(std::string email, std::string password);
  19. PRIVATE void logOut();
  20. PRIVATE void checkUpdates();
  21. PRIVATE bool hasUpdates();
  22. PRIVATE void syncUpdate(std::string slug);
  23. PRIVATE 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. /** Whether the UI should refresh the plugin updates menu. */
  38. extern bool refreshRequested;
  39. } // namespace library
  40. } // namespace rack