ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
update_checker.h File Reference

🔄 Update checker for GitHub releases with DNS connectivity test and cache More...

Go to the source code of this file.

Data Structures

struct  update_check_result_t
 update check result keeps the values that move through the subsystem: update_available, last_check_time, dismissed_until, check_succeeded. Some members are pointers into caller- or subsystem-owned memory, so lifetime follows the API that populated them rather than the struct copy itself. More...

Macros

#define NETWORK_UPDATE_CHECKER_LATEST_VERSION_BUFFER_SIZE   64
#define NETWORK_UPDATE_CHECKER_LATEST_SHA_BUFFER_SIZE   41
#define NETWORK_UPDATE_CHECKER_CURRENT_VERSION_BUFFER_SIZE   64
#define NETWORK_UPDATE_CHECKER_CURRENT_SHA_BUFFER_SIZE   41
#define NETWORK_UPDATE_CHECKER_RELEASE_URL_BUFFER_SIZE   512

Enumerations

enum  install_method_t {
  INSTALL_METHOD_HOMEBREW , INSTALL_METHOD_SCOOP , INSTALL_METHOD_ARCH_AUR , INSTALL_METHOD_INSTALLER ,
  INSTALL_METHOD_GITHUB , INSTALL_METHOD_UNKNOWN
}
 Installation method for suggesting upgrade command. More...

Functions

asciichat_error_t update_check_perform (update_check_result_t *result)
 Check for updates from GitHub releases API.
asciichat_error_t update_check_load_cache (update_check_result_t *result)
 Load cached update check result.
asciichat_error_t update_check_save_cache (const update_check_result_t *result)
 Save update check result to cache.
void update_check_dismiss_for_a_week (update_check_result_t *result)
bool update_check_is_dismissed (const update_check_result_t *result)
bool update_check_is_cache_fresh (const update_check_result_t *result)
 Check if cache is fresh (< 7 days old).
bool update_check_try_fresh_cache (update_check_result_t *result)
install_method_t update_check_detect_install_method (void)
 Detect installation method.
void update_check_get_upgrade_suggestion (install_method_t method, const char *latest_version, char *buffer, size_t buffer_size)
 Get upgrade suggestion string.
const char * update_check_get_aur_helper (void)
void update_check_format_notification (const update_check_result_t *result, char *buffer, size_t buffer_size)
 Format update notification message.
asciichat_error_t update_check_startup (update_check_result_t *result)
 Perform startup update check with caching.

Detailed Description

🔄 Update checker for GitHub releases with DNS connectivity test and cache

Definition in file update_checker.h.