HulaLoop
Simple cross-platform audio loopback and recording.
Signals | Public Member Functions | Properties | List of all members
hula::Updater Class Reference
Inheritance diagram for hula::Updater:
Inheritance graph
[legend]
Collaboration diagram for hula::Updater:
Collaboration graph
[legend]

Signals

void bytesDownloaded ()
 A signal emitted when QNetworkReply's readyRead signal is triggered. More...
 

Public Member Functions

 Updater (QObject *parent=nullptr)
 Construct a new instance of the Updater class. More...
 
 ~Updater ()
 Destroys the Updater object.
 
void setUpdateHost (QString)
 Sets the update host for the Updater. More...
 
QString getUpdateHost ()
 Method to check the downloaded file name. More...
 
QString getDownloadFileName ()
 Method to check the downloaded file name. More...
 
qint64 getNumBytesDownloaded ()
 Method to check how many bytes have been downloaded. More...
 
qint64 getDownloadSize ()
 Method to check the size of the download. More...
 
QList< int > parseTagName (const QString &)
 A method to parse the tag name returned from the GitHub Releases API. More...
 
Q_INVOKABLE bool checkForUpdate ()
 Creates the network request using the updateHostUrl. More...
 
Q_INVOKABLE bool downloadUpdate ()
 Creates the network request using the downloadHostUrl. More...
 
Q_INVOKABLE void startHulaLoopInstaller ()
 Opens the HulaLoop installer application. More...
 
Q_INVOKABLE void startHulaLoopApp ()
 Opens the HulaLoop application. More...
 

Properties

QString updateHostUrl
 Exposes the updateHostUrl property to QML.
 
qint64 downloadSize
 Exposes the downloadSize property to QML.
 
qint64 numBytesDownloaded
 Exposes the numBytesDownloaded property to QML.
 

Constructor & Destructor Documentation

Updater::Updater ( QObject *  parent = nullptr)
explicit

Construct a new instance of the Updater class.

Parameters
parentObject which Updater should be child of.

Member Function Documentation

void hula::Updater::bytesDownloaded ( )
signal

A signal emitted when QNetworkReply's readyRead signal is triggered.

This method informs the QML side of how many bytes were read by the network request and is used to update the progress bar accordingly.

bool Updater::checkForUpdate ( )

Creates the network request using the updateHostUrl.

This method blocks until the finished signal is caught.

Returns
bool - True if an update was found, false otherwise
bool Updater::downloadUpdate ( )

Creates the network request using the downloadHostUrl.

This method writes incrementally to a file in the system's temporary directory and blocks until the finished signal is caught.

Returns
bool - True if the download finished successfully, false otherwise
QString Updater::getDownloadFileName ( )

Method to check the downloaded file name.

Returns
QString - The name of the downloaded file
qint64 Updater::getDownloadSize ( )

Method to check the size of the download.

Returns
qint64 - The size of the download file
qint64 Updater::getNumBytesDownloaded ( )

Method to check how many bytes have been downloaded.

Returns
qint64 - The number of bytes downloaded
QString Updater::getUpdateHost ( )

Method to check the downloaded file name.

Returns
QString - The name of the downloaded file
QList< int > Updater::parseTagName ( const QString &  tagName)

A method to parse the tag name returned from the GitHub Releases API.

Parameters
tagName- QString containing the GitHub Releases tag name
Returns
QList<int> - A QList holding the version segments (major, minor, revision, build)
void Updater::setUpdateHost ( QString  updateHostUrl)

Sets the update host for the Updater.

Parameters
updateHostUrl- String host URL
void Updater::startHulaLoopApp ( )

Opens the HulaLoop application.

This method is called only if no update was found.

void Updater::startHulaLoopInstaller ( )

Opens the HulaLoop installer application.

This method is called only if an update was found.


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