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 QString getErrorMessage ()
 Method to check the descriptive error message. More...
 
Q_INVOKABLE int checkForUpdate ()
 Creates the network request using the updateHostUrl. More...
 
Q_INVOKABLE int 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::Updater ( QObject *  parent = nullptr)
explicit

Construct a new instance of the Updater class.

Parameters
parentObject which Updater should be child of.

Member Function Documentation

◆ bytesDownloaded

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.

◆ checkForUpdate()

int Updater::checkForUpdate ( )

Creates the network request using the updateHostUrl.

This method blocks until the finished signal is caught.

Returns
int - 1 if found, 0 if not found, -1 if an error occurred

◆ downloadUpdate()

int 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
int - True if the download finished successfully, false otherwise

◆ getDownloadFileName()

QString Updater::getDownloadFileName ( )

Method to check the downloaded file name.

Returns
QString - The name of the downloaded file

◆ getDownloadSize()

qint64 Updater::getDownloadSize ( )

Method to check the size of the download.

Returns
qint64 - The size of the download file

◆ getErrorMessage()

QString Updater::getErrorMessage ( )

Method to check the descriptive error message.

Returns
QString - The error in human-readable format

◆ getNumBytesDownloaded()

qint64 Updater::getNumBytesDownloaded ( )

Method to check how many bytes have been downloaded.

Returns
qint64 - The number of bytes downloaded

◆ getUpdateHost()

QString Updater::getUpdateHost ( )

Method to check the downloaded file name.

Returns
QString - The name of the downloaded file

◆ parseTagName()

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)

◆ setUpdateHost()

void Updater::setUpdateHost ( QString  updateHostUrl)

Sets the update host for the Updater.

Parameters
updateHostUrl- String host URL

◆ startHulaLoopApp()

void Updater::startHulaLoopApp ( )

Opens the HulaLoop application.

This method is called only if no update was found.

◆ startHulaLoopInstaller()

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: