Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
SoftwareUpdateBackend Class Referenceabstract

#include <software_update_backend.h>

Inheritance diagram for SoftwareUpdateBackend:
SparkleUpdateBackend WinSparkleUpdateBackend

Public Member Functions

virtual QString info () const =0
 Name of the update framework, shown in the feature list.
virtual bool supportsAppcast () const =0
 Whether updates come from our appcast servers.
virtual QString osName () const
 OS name used for the appcast URL and the appcast "os" filter.
virtual void init (const QUrl &appcastUrl, bool runWithoutSilentCheck)=0
 Initialize the update framework.
virtual void performUIUpdate ()=0
 Start the user-visible update process.
virtual void cleanup ()
 Release resources held by the update framework.
virtual bool checkForUpdates ()
 Run a background update check through the platform mechanism.

Static Public Member Functions

static SoftwareUpdateBackend * create ()
 Create the backend for this platform.

Detailed Description

Platform-specific part of the software update handling.

Owned and operated exclusively by SoftwareUpdate. Backends report back through the SoftwareUpdate signals.

A concrete backend is provided per platform in ui/qt/utils/software_update_backend_win.cpp (Windows, WinSparkle) ui/qt/utils/software_update_backend_mac.cpp (macOS, Sparkle) ui/qt/utils/software_update_backend_linux.cpp (Linux, PackageKit) ui/qt/utils/software_update_backend_stub.cpp (no update support)

CMake selects exactly one of those for the build.

Member Function Documentation

◆ checkForUpdates()

virtual bool SoftwareUpdateBackend::checkForUpdates ( )
inlinevirtual

Run a background update check through the platform mechanism.

This function is called by SoftwareUpdate to check for updates. Backends that handle updates themselves (PackageKit on Linux) should return true. Backends that rely on the appcast (Windows, Apple) should return false. Note that for AppCast to work, server updates are required supporting the appcast format.

Returns
true if the backend handles the check itself, false if SoftwareUpdate should query the appcast feed instead. Ignored for backends that do not support the appcast.

◆ cleanup()

virtual void SoftwareUpdateBackend::cleanup ( )
inlinevirtual

Release resources held by the update framework.

Reimplemented in WinSparkleUpdateBackend.

◆ create()

SoftwareUpdateBackend * SoftwareUpdateBackend::create ( )
static

Create the backend for this platform.

Returns
A new backend, or nullptr if software updates are not supported.

◆ info()

virtual QString SoftwareUpdateBackend::info ( ) const
pure virtual

Name of the update framework, shown in the feature list.

Implemented in SparkleUpdateBackend, and WinSparkleUpdateBackend.

◆ init()

virtual void SoftwareUpdateBackend::init ( const QUrl & appcastUrl,
bool runWithoutSilentCheck )
pure virtual

Initialize the update framework.

Parameters
appcastUrlThe appcast feed URL, empty if supportsAppcast() returns false.
runWithoutSilentCheckSee SoftwareUpdate::init().

Implemented in SparkleUpdateBackend, and WinSparkleUpdateBackend.

◆ osName()

virtual QString SoftwareUpdateBackend::osName ( ) const
inlinevirtual

OS name used for the appcast URL and the appcast "os" filter.

Only used if supportsAppcast() returns true.

Reimplemented in SparkleUpdateBackend, and WinSparkleUpdateBackend.

◆ performUIUpdate()

virtual void SoftwareUpdateBackend::performUIUpdate ( )
pure virtual

Start the user-visible update process.

Implemented in SparkleUpdateBackend, and WinSparkleUpdateBackend.

◆ supportsAppcast()

virtual bool SoftwareUpdateBackend::supportsAppcast ( ) const
pure virtual

Whether updates come from our appcast servers.

Must be decided explicitly by every backend. Backends returning false (e.g. distribution package managers) never cause a request to our servers.

Implemented in SparkleUpdateBackend, and WinSparkleUpdateBackend.


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