DBLSQD Qt SDK
|
The Feed class provides methods for accessing DBLSQD Feeds and downloading Releases. More...
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< Release > | getUpdates (Release currentRelease=Release(QCoreApplication::applicationVersion())) |
Returns a list of all Releases in the Feed that are newer than the given Release. More... | |
QList< Release > | getReleases () |
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... | |
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
dblsqd::Feed::Feed | ( | QString | baseUrl = "" , |
QString | channel = "release" , |
||
QString | os = QString() , |
||
QString | arch = QString() , |
||
QString | type = QString() |
||
) |
|
signal |
This signal is emitted when there was an error downloading or verifying a Release. When downloadError() is emitted, downloadFinished() is not emitted.
|
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().
|
signal |
This signal is emitted during the download of a Release through downloadRelease().
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.
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.
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.
bool dblsqd::Feed::isReady | ( | ) |
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.
|
signal |
This signal is emitted when a Feed could not be downloaded. When loadError() is emitted, ready() is not emitted.
|
signal |
This signal is emitted when a Feed has been successfully downloaded and parsed.
This signal is emitted when a updates are available and the UpdateDialog is ready to be shown with show() or exec().
void dblsqd::Feed::setUrl | ( | QUrl | url | ) |
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 "/".