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.

38 lines
953B

  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 bool isDownloading;
  24. extern float downloadProgress;
  25. extern std::string downloadName;
  26. extern std::string loginStatus;
  27. extern const std::vector<std::string> allowedTags;
  28. } // namespace plugin
  29. } // namespace rack