◆ setUpdateCallbacks()
| void SparkleBridge::setUpdateCallbacks |
( |
sparkle_update_attention_callback_t |
attention_cb, |
|
|
sparkle_postpone_relaunch_callback_t |
postpone_relaunch_cb, |
|
|
sparkle_will_relaunch_callback_t |
will_relaunch_cb |
|
) |
| |
|
static |
Register callbacks for Sparkle
All callbacks are invoked on the main thread. Any of them may be NULL to ignore that particular event.
- Parameters
-
| attention_cb | Called when the user has engaged with the update. |
| postpone_relaunch_cb | Called when the update is ready for the app to handle any pre-relaunch tasks (e.g. saving documents). The app should perform the tasks, then call the provided proceed() function pointer to allow Sparkle to continue with the relaunch. |
| will_relaunch_cb | Called when the app is about to be relaunched. |
◆ updateCheck()
| void SparkleBridge::updateCheck |
( |
void |
| ) |
|
|
static |
Trigger an immediate, user-initiated update check.
Called when the user selects "Check for Updates…" from the Help menu. Sparkle shows its own native macOS UI (progress sheet, release notes, install prompt) — no additional Qt UI is needed.
◆ updateInit()
| void SparkleBridge::updateInit |
( |
const char * |
url, |
|
|
bool |
enabled, |
|
|
int |
interval |
|
) |
| |
|
static |
Initialize the Sparkle update subsystem.
Must be called once at application startup (from software_update_init()). Sets the appcast feed URL, whether automatic background checks are enabled, and the interval between automatic checks.
Internally this creates a singleton SPUStandardUpdaterController — the Sparkle 2 equivalent of the deprecated SUUpdater sharedUpdater from Sparkle 1. The singleton ensures that only one updater instance exists for the lifetime of the application.
- Parameters
-
| url | Appcast feed URL (an XML file describing available updates). Built by get_appcast_update_url() in software_update.c. |
| enabled | Whether to check for updates automatically in the background. Maps to the Wireshark preference "gui.update.enabled". |
| interval | Seconds between automatic update checks. Maps to the Wireshark preference "gui.update.interval". |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/macosx/sparkle_bridge.h
- /builds/wireshark/wireshark/ui/macosx/sparkle_bridge.mm