Files
hrynco-kswitcher/src/update.h
T

19 lines
660 B
C++

#pragma once
#include "platform.h"
namespace ks
{
inline constexpr wchar_t AppVersion[] = L"0.6.17";
inline constexpr UINT UpdateMessage = WM_APP + 7;
inline constexpr UINT UpdateCheckIntervalMs = 6 * 60 * 60 * 1000;
inline constexpr UINT UpdateNotificationRetryMs = 5 * 60 * 1000;
bool notifyUpdateAvailable(const std::wstring &version);
std::wstring updateToastXml(const std::wstring &version);
struct UpdateResult
{
std::wstring state, version, error;
bool interactive{}, install{};
};
UpdateResult runUpdate(bool install, const std::wstring &expectedVersion, bool showProgress = false);
bool confirmUpdatedStartup(const std::wstring &eventName);
}