DBLSQD Qt SDK
Signals | Public Member Functions | List of all members
dblsqd::Feed Class Reference

The Feed class provides methods for accessing DBLSQD Feeds and downloading Releases. More...

Inheritance diagram for dblsqd::Feed:
Inheritance graph
[legend]
Collaboration diagram for dblsqd::Feed:
Collaboration graph
[legend]

Signals

void ready ()
 
void loadError (QString message)
 
void downloadProgress (qint64 bytesReceived, qint64 bytesTotal)
 
void downloadFinished ()
 
void downloadError (QString message)
 

Public Member Functions

 Feed (QString baseUrl="", QString channel="release", QString os=QString(), QString arch=QString(), QString type=QString())
 Constructs a new Feed object. More...
 
void setUrl (QUrl url)
 Sets the Feed URL. More...
 
void setUrl (QString baseUrl, QString channel="release", QString os=QString(), QString arch=QString(), QString type=QString())
 Sets the Feed URL by specifying its components. More...
 
QUrl getUrl ()
 Returns the Feed URL.
 
void load ()
 Retrieves and parses data from the Feed. More...
 
void downloadRelease (Release release)
 Starts the download of a given Release. More...
 
QList< ReleasegetUpdates (Release currentRelease=Release(QCoreApplication::applicationVersion()))
 Returns a list of all Releases in the Feed that are newer than the given Release. More...
 
QList< ReleasegetReleases ()
 Returns a list of all Releases in the Feed. More...
 
QTemporaryFile * getDownloadFile ()
 Returns the pointer to a QTemporaryFile for a downloaded file. More...
 
bool isReady ()
 Returns true if Feed information has been retrieved successfully. More...
 

Detailed Description

The Feed class provides methods for accessing DBLSQD Feeds and downloading Releases.

A Feed is a representation of an Application’s Releases. This class can retrieve Feeds via HTTP(S) and offers convenience methods for

Constructor & Destructor Documentation

◆ Feed()

dblsqd::Feed::Feed ( QString  baseUrl = "",
QString  channel = "release",
QString  os = QString(),
QString  arch = QString(),
QString  type = QString() 
)

Constructs a new Feed object.

See also
setUrl()

Member Function Documentation

◆ downloadError

void dblsqd::Feed::downloadError ( QString  message)
signal

This signal is emitted when there was an error downloading or verifying a Release. When downloadError() is emitted, downloadFinished() is not emitted.

See also
downloadFinished() downloadRelease()

◆ downloadFinished

void dblsqd::Feed::downloadFinished ( )
signal

This signal is emitted when the download of a Release was successful. A QTemporaryFile* of the downloaded file can then be retrieved with getDownloadFile().

See also
downloadRelease()

◆ downloadProgress

void dblsqd::Feed::downloadProgress ( qint64  bytesReceived,
qint64  bytesTotal 
)
signal

This signal is emitted during the download of a Release through downloadRelease().

See also
downloadRelease()

◆ downloadRelease()

void dblsqd::Feed::downloadRelease ( Release  release)

Starts the download of a given Release.

See also
downloadFinished() downloadError() downloadProgress()

◆ getDownloadFile()

QTemporaryFile * dblsqd::Feed::getDownloadFile ( )

Returns the pointer to a QTemporaryFile for a downloaded file.

If called before downloadFinished() was emitted, this might return a NULL pointer.

◆ getReleases()

QList< Release > dblsqd::Feed::getReleases ( )

Returns a list of all Releases in the Feed.

The list is sorted in descending order by version number/release date. If called before ready() was emitted, an empty list is returned.

See also
getReleases()

◆ getUpdates()

QList< Release > dblsqd::Feed::getUpdates ( Release  currentRelease = Release(QCoreApplication::applicationVersion()))

Returns a list of all Releases in the Feed that are newer than the given Release.

The list is sorted in descending order by version number/release date. If called before ready() was emitted, an empty list is returned.

See also
getReleases()

◆ isReady()

bool dblsqd::Feed::isReady ( )

Returns true if Feed information has been retrieved successfully.

A ready Feed might not contain any release information. If downloading the Feed failed, false is returned.

◆ load()

void dblsqd::Feed::load ( )

Retrieves and parses data from the Feed.

A Feed URL must have been set before with setUrl(). Emits ready() or loadError() on completion.

◆ loadError

void dblsqd::Feed::loadError ( QString  message)
signal

This signal is emitted when a Feed could not be downloaded. When loadError() is emitted, ready() is not emitted.

See also
ready() load()

◆ ready

void dblsqd::Feed::ready ( )
signal

This signal is emitted when a Feed has been successfully downloaded and parsed.

See also
loadError() load()

This signal is emitted when a updates are available and the UpdateDialog is ready to be shown with show() or exec().

◆ setUrl() [1/2]

void dblsqd::Feed::setUrl ( QUrl  url)

Sets the Feed URL.

This method can be used to manually set the Feed URL.

◆ setUrl() [2/2]

void dblsqd::Feed::setUrl ( QString  baseUrl,
QString  channel = "release",
QString  os = QString(),
QString  arch = QString(),
QString  type = QString() 
)

Sets the Feed URL by specifying its components.

The only required component is baseUrl which must be the base URL for an Application provided by the DBSLQD CLI Tool. It should include the full schema and does not require a trailing "/".


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