Skip to main content

IUpdateSource class

Namespace: Sources

Abstract class for custom update sources. Subclass this and implement GetReleaseFeed and DownloadReleaseEntry to provide a custom way of fetching releases and downloading assets.

class IUpdateSource :public IUpdateSourcePointer

Remarks

SAFETY: It is your responsibility to ensure that a derived class instance is thread-safe, as Velopack may call methods on this class from multiple threads.

Constructors

ConstructorSummary
IUpdateSourceDefault constructor for IUpdateSource. This will create a new custom source that calls back into the virtual methods of this class.

IUpdateSource()

IUpdateSource();

Default constructor for IUpdateSource. This will create a new custom source that calls back into the virtual methods of this class.

Methods

MethodSummary
GetReleaseFeedFetches the release feed json for the specified releases name, and returns it as a string.
DownloadReleaseEntryDownloads an asset to the specified local file path. Progress is reported back to Velopack via a callback.

GetReleaseFeed()

virtual std::string const GetReleaseFeed(std::string const releasesName) = 0;

Fetches the release feed json for the specified releases name, and returns it as a string.

DownloadReleaseEntry()

virtual bool DownloadReleaseEntry(Velopack::VelopackAsset const& asset, std::string const localFilePath, Velopack::vpkc_progress_send_t progress) = 0;

Downloads an asset to the specified local file path. Progress is reported back to Velopack via a callback.


Generated from Velopack (C++ headers)