mirror of
https://github.com/QuasarApp/QtAndroidTools.git
synced 2025-05-07 17:49:35 +00:00
Added function for abort, peuse and continue the apk expansions file download
This commit is contained in:
parent
25d2d91cbe
commit
741aa75595
@ -213,7 +213,22 @@ QString QAndroidApkExpansionFiles::patchFileName()
|
|||||||
return FileName;
|
return FileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QAndroidApkExpansionFiles::sendRequest(REQUEST_ID requestID)
|
void QAndroidApkExpansionFiles::abortDownload()
|
||||||
|
{
|
||||||
|
SendRequest(REQUEST_ABORT_DOWNLOAD);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QAndroidApkExpansionFiles::pauseDownload()
|
||||||
|
{
|
||||||
|
SendRequest(REQUEST_PAUSE_DOWNLOAD);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QAndroidApkExpansionFiles::continueDownload()
|
||||||
|
{
|
||||||
|
SendRequest(REQUEST_CONTINUE_DOWNLOAD);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QAndroidApkExpansionFiles::SendRequest(REQUEST_ID requestID)
|
||||||
{
|
{
|
||||||
if(m_JavaApkExpansionDownloader.isValid())
|
if(m_JavaApkExpansionDownloader.isValid())
|
||||||
{
|
{
|
||||||
|
@ -47,7 +47,6 @@ class QAndroidApkExpansionFiles : public QObject
|
|||||||
Q_DISABLE_COPY(QAndroidApkExpansionFiles)
|
Q_DISABLE_COPY(QAndroidApkExpansionFiles)
|
||||||
Q_ENUMS(DOWNLOAD_STATE)
|
Q_ENUMS(DOWNLOAD_STATE)
|
||||||
Q_ENUMS(APKEF_STATE)
|
Q_ENUMS(APKEF_STATE)
|
||||||
Q_ENUMS(REQUEST_ID)
|
|
||||||
Q_ENUMS(STRING_ID)
|
Q_ENUMS(STRING_ID)
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -90,13 +89,6 @@ public:
|
|||||||
APKEF_INVALID_SALT,
|
APKEF_INVALID_SALT,
|
||||||
APKEF_UNKNOWN_ERROR
|
APKEF_UNKNOWN_ERROR
|
||||||
};
|
};
|
||||||
enum REQUEST_ID
|
|
||||||
{
|
|
||||||
REQUEST_ABORT_DOWNLOAD = 0,
|
|
||||||
REQUEST_PAUSE_DOWNLOAD,
|
|
||||||
REQUEST_CONTINUE_DOWNLOAD,
|
|
||||||
REQUEST_DOWNLOAD_STATUS
|
|
||||||
};
|
|
||||||
enum STRING_ID
|
enum STRING_ID
|
||||||
{
|
{
|
||||||
STRING_IDLE = 0,
|
STRING_IDLE = 0,
|
||||||
@ -130,7 +122,9 @@ public:
|
|||||||
Q_INVOKABLE QString patchFileName();
|
Q_INVOKABLE QString patchFileName();
|
||||||
Q_INVOKABLE APKEF_STATE startDownloadFiles();
|
Q_INVOKABLE APKEF_STATE startDownloadFiles();
|
||||||
Q_INVOKABLE QString getString(int stringID);
|
Q_INVOKABLE QString getString(int stringID);
|
||||||
Q_INVOKABLE void sendRequest(REQUEST_ID requestID);
|
Q_INVOKABLE void abortDownload();
|
||||||
|
Q_INVOKABLE void pauseDownload();
|
||||||
|
Q_INVOKABLE void continueDownload();
|
||||||
|
|
||||||
const QString& getBase64PublicKey() const;
|
const QString& getBase64PublicKey() const;
|
||||||
void setBase64PublicKey(const QString &Base64PublicKey);
|
void setBase64PublicKey(const QString &Base64PublicKey);
|
||||||
@ -163,4 +157,12 @@ private:
|
|||||||
APP_STATE_DESTROY
|
APP_STATE_DESTROY
|
||||||
};
|
};
|
||||||
void SetNewAppState(APP_STATE NewState);
|
void SetNewAppState(APP_STATE NewState);
|
||||||
|
enum REQUEST_ID
|
||||||
|
{
|
||||||
|
REQUEST_ABORT_DOWNLOAD = 0,
|
||||||
|
REQUEST_PAUSE_DOWNLOAD,
|
||||||
|
REQUEST_CONTINUE_DOWNLOAD,
|
||||||
|
REQUEST_DOWNLOAD_STATUS
|
||||||
|
};
|
||||||
|
void SendRequest(REQUEST_ID requestID);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user