The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

47 lines
1.3KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 6 technical preview.
  4. Copyright (c) 2017 - ROLI Ltd.
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For this technical preview, this file is not subject to commercial licensing.
  8. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  9. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  10. DISCLAIMED.
  11. ==============================================================================
  12. */
  13. #pragma once
  14. //==============================================================================
  15. class VersionInfo
  16. {
  17. public:
  18. struct Asset
  19. {
  20. const String name;
  21. const String url;
  22. };
  23. static std::unique_ptr<VersionInfo> fetchFromUpdateServer (const String& versionString);
  24. static std::unique_ptr<VersionInfo> fetchLatestFromUpdateServer();
  25. static std::unique_ptr<InputStream> createInputStreamForAsset (const Asset& asset, int& statusCode);
  26. bool isNewerVersionThanCurrent();
  27. const String versionString;
  28. const String releaseNotes;
  29. const std::vector<Asset> assets;
  30. private:
  31. VersionInfo() = default;
  32. static std::unique_ptr<VersionInfo> fetch (const String&);
  33. };