mirror of
https://github.com/HackPlan/winsparkle.git
synced 2026-04-29 10:35:02 +08:00
Added win_sparkle_get_last_check_time to dll_api
Added function win_sparkle_get_last_check_time to dll_api.
This commit is contained in:
committed by
Vaclav Slavik
parent
360c589b0b
commit
dc83f0da5f
@@ -213,6 +213,14 @@ WIN_SPARKLE_API void __cdecl win_sparkle_set_update_check_interval(int interval)
|
||||
*/
|
||||
WIN_SPARKLE_API int __cdecl win_sparkle_get_update_check_interval();
|
||||
|
||||
/**
|
||||
Gets the time for the last update check.
|
||||
|
||||
Default value is -1, indicating that the update check has never run.
|
||||
|
||||
@since 0.4
|
||||
*/
|
||||
WIN_SPARKLE_API time_t __cdecl win_sparkle_get_last_check_time();
|
||||
|
||||
/// Callback type for win_sparkle_can_shutdown_callback()
|
||||
typedef int (__cdecl *win_sparkle_can_shutdown_callback_t)();
|
||||
|
||||
@@ -204,6 +204,21 @@ WIN_SPARKLE_API int __cdecl win_sparkle_get_update_check_interval()
|
||||
return DEFAULT_CHECK_INTERVAL;
|
||||
}
|
||||
|
||||
WIN_SPARKLE_API time_t __cdecl win_sparkle_get_last_check_time()
|
||||
{
|
||||
static const time_t DEFAULT_LAST_CHECK_TIME = -1;
|
||||
|
||||
try
|
||||
{
|
||||
time_t last_check;
|
||||
Settings::ReadConfigValue("LastCheckTime", last_check, DEFAULT_LAST_CHECK_TIME);
|
||||
return last_check;
|
||||
}
|
||||
CATCH_ALL_EXCEPTIONS
|
||||
|
||||
return DEFAULT_LAST_CHECK_TIME;
|
||||
}
|
||||
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_can_shutdown_callback(win_sparkle_can_shutdown_callback_t callback)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user