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.

39 lines
979B

  1. #pragma once
  2. #include "common.hpp"
  3. #include "plugin/Plugin.hpp"
  4. #include "plugin/Model.hpp"
  5. #include <vector>
  6. #include <list>
  7. namespace rack {
  8. namespace plugin {
  9. void init(bool devMode);
  10. void destroy();
  11. void logIn(std::string email, std::string password);
  12. void logOut();
  13. /** Returns whether a new plugin is available, and downloads it unless doing a dry run */
  14. bool sync(bool dryRun);
  15. void cancelDownload();
  16. bool isLoggedIn();
  17. Plugin *getPlugin(std::string pluginSlug);
  18. Model *getModel(std::string pluginSlug, std::string modelSlug);
  19. std::string getAllowedTag(std::string tag);
  20. /** Checks that the slug contains only alphanumeric characters, "-", and "_" */
  21. bool isSlugValid(std::string slug);
  22. extern std::list<Plugin*> plugins;
  23. extern std::string token;
  24. extern bool isDownloading;
  25. extern float downloadProgress;
  26. extern std::string downloadName;
  27. extern std::string loginStatus;
  28. extern const std::vector<std::string> allowedTags;
  29. } // namespace plugin
  30. } // namespace rack