|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
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) |
| asciichat_error_t | update_check_save_cache (const update_check_result_t *result) |
| bool | update_check_is_cache_fresh (const update_check_result_t *result) |
| asciichat_error_t | update_check_perform (update_check_result_t *result) |
| install_method_t | update_check_detect_install_method (void) |
| void | update_check_get_upgrade_suggestion (install_method_t method, const char *latest_version, char *buffer, size_t buffer_size) |
| void | update_check_format_notification (const update_check_result_t *result, char *buffer, size_t buffer_size) |
| asciichat_error_t | update_check_startup (update_check_result_t *result) |
Update checker implementation with GitHub API and cache management.
Definition in file update_checker.c.
| #define DNS_TIMEOUT_SECONDS 2 |
Definition at line 34 of file update_checker.c.
| #define GITHUB_API_HOSTNAME "api.github.com" |
Definition at line 37 of file update_checker.c.
| #define GITHUB_RELEASES_PATH "/repos/zfogg/ascii-chat/releases/latest" |
Definition at line 38 of file update_checker.c.
| #define UPDATE_CHECK_CACHE_FILENAME "last_update_check" |
Definition at line 28 of file update_checker.c.
| #define UPDATE_CHECK_CACHE_MAX_AGE_SECONDS (7 * 24 * 60 * 60) |
Definition at line 31 of file update_checker.c.
| install_method_t update_check_detect_install_method | ( | void | ) |
Definition at line 387 of file update_checker.c.
Referenced by update_check_format_notification().
| void update_check_format_notification | ( | const update_check_result_t * | result, |
| char * | buffer, | ||
| size_t | buffer_size | ||
| ) |
Definition at line 429 of file update_checker.c.
References buffer_size, update_check_detect_install_method(), and update_check_get_upgrade_suggestion().
Referenced by action_check_update_immediate(), and main().
| void update_check_get_upgrade_suggestion | ( | install_method_t | method, |
| const char * | latest_version, | ||
| char * | buffer, | ||
| size_t | buffer_size | ||
| ) |
Definition at line 400 of file update_checker.c.
References buffer_size.
Referenced by update_check_format_notification().
| bool update_check_is_cache_fresh | ( | const update_check_result_t * | result | ) |
Definition at line 172 of file update_checker.c.
References UPDATE_CHECK_CACHE_MAX_AGE_SECONDS.
Referenced by update_check_startup().
| asciichat_error_t update_check_load_cache | ( | update_check_result_t * | result | ) |
Definition at line 61 of file update_checker.c.
References file_read_error_message(), platform_fopen(), version_compare(), and version_parse().
Referenced by update_check_startup().
| asciichat_error_t update_check_perform | ( | update_check_result_t * | result | ) |
Definition at line 268 of file update_checker.c.
References dns_test_connectivity(), GITHUB_API_HOSTNAME, GITHUB_RELEASES_PATH, https_get(), update_check_save_cache(), version_compare(), and version_parse().
Referenced by action_check_update_immediate(), and update_check_startup().
| asciichat_error_t update_check_save_cache | ( | const update_check_result_t * | result | ) |
Definition at line 140 of file update_checker.c.
References file_write_error_message(), and platform_fopen().
Referenced by update_check_perform().
| asciichat_error_t update_check_startup | ( | update_check_result_t * | result | ) |
Definition at line 445 of file update_checker.c.
References update_check_is_cache_fresh(), update_check_load_cache(), and update_check_perform().
Referenced by main().