ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
update_checker.c File Reference

Update checker implementation with GitHub API and cache management. More...

Go to the source code of this file.

Macros

#define UPDATE_CHECK_CACHE_FILENAME   "last_update_check"
 
#define UPDATE_CHECK_CACHE_MAX_AGE_SECONDS   (7 * 24 * 60 * 60)
 
#define DNS_TIMEOUT_SECONDS   2
 
#define GITHUB_API_HOSTNAME   "api.github.com"
 
#define GITHUB_RELEASES_PATH   "/repos/zfogg/ascii-chat/releases/latest"
 

Functions

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.
 
bool update_check_is_cache_fresh (const update_check_result_t *result)
 Check if cache is fresh (< 7 days old)
 
asciichat_error_t update_check_perform (update_check_result_t *result)
 Check for updates from GitHub releases API.
 
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.
 
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 implementation with GitHub API and cache management.

Definition in file update_checker.c.

Macro Definition Documentation

◆ DNS_TIMEOUT_SECONDS

#define DNS_TIMEOUT_SECONDS   2

Definition at line 35 of file update_checker.c.

◆ GITHUB_API_HOSTNAME

#define GITHUB_API_HOSTNAME   "api.github.com"

Definition at line 38 of file update_checker.c.

◆ GITHUB_RELEASES_PATH

#define GITHUB_RELEASES_PATH   "/repos/zfogg/ascii-chat/releases/latest"

Definition at line 39 of file update_checker.c.

◆ UPDATE_CHECK_CACHE_FILENAME

#define UPDATE_CHECK_CACHE_FILENAME   "last_update_check"

Definition at line 29 of file update_checker.c.

◆ UPDATE_CHECK_CACHE_MAX_AGE_SECONDS

#define UPDATE_CHECK_CACHE_MAX_AGE_SECONDS   (7 * 24 * 60 * 60)

Definition at line 32 of file update_checker.c.