Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
SparkleBridge Class Reference

Static Public Member Functions

static void updateInit (const char *url, bool enabled, int interval)
 
static void updateCheck ()
 
static void setUpdateCallbacks (sparkle_update_attention_callback_t attention_cb, sparkle_postpone_relaunch_callback_t postpone_relaunch_cb, sparkle_will_relaunch_callback_t will_relaunch_cb)
 

Member Function Documentation

◆ 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_cbCalled when the user has engaged with the update.
postpone_relaunch_cbCalled 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_cbCalled 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
urlAppcast feed URL (an XML file describing available updates). Built by get_appcast_update_url() in software_update.c.
enabledWhether to check for updates automatically in the background. Maps to the Wireshark preference "gui.update.enabled".
intervalSeconds between automatic update checks. Maps to the Wireshark preference "gui.update.interval".

The documentation for this class was generated from the following files: