Files
update-client/Common/ManifestBootstrapPolicy.h
T

25 lines
591 B
C++
Raw Normal View History

#pragma once
namespace UpdateClient
{
enum class ManifestBootstrapAction
{
None,
FetchCurrentManifest,
CurrentVersionNotPublished
};
inline ManifestBootstrapAction manifestBootstrapAction(
bool manifestCacheMissing,
bool networkAvailable,
bool updateAvailable,
int serverVersionId)
{
if (!manifestCacheMissing || !networkAvailable || updateAvailable)
return ManifestBootstrapAction::None;
if (serverVersionId <= 0)
return ManifestBootstrapAction::CurrentVersionNotPublished;
return ManifestBootstrapAction::FetchCurrentManifest;
}
}