Adds methods to set/get navigation apps etag response header.

Signed-off-by: Camila San <hello@camila.codes>
This commit is contained in:
Camila San 2018-04-10 15:38:59 +02:00
parent d7286872f6
commit 77ebccee72
No known key found for this signature in database
GPG Key ID: 7A4A6121E88E2AD4
2 changed files with 21 additions and 0 deletions

View File

@ -187,6 +187,16 @@ void AccountState::setNotificationsEtagResponseHeader(const QByteArray &value)
_notificationsEtagResponseHeader = value;
}
QByteArray AccountState::navigationAppsEtagResponseHeader() const
{
return _navigationAppsEtagResponseHeader;
}
void AccountState::setNavigationAppsEtagResponseHeader(const QByteArray &value)
{
_navigationAppsEtagResponseHeader = value;
}
void AccountState::checkConnectivity()
{
if (isSignedOut() || _waitingForNewCredentials) {

View File

@ -141,6 +141,16 @@ public:
*/
void setNotificationsEtagResponseHeader(const QByteArray &value);
/** Saves the ETag Response header from the last Navigation Apps api
* request with statusCode 200.
*/
QByteArray navigationAppsEtagResponseHeader() const;
/** Returns the ETag Response header from the last Navigation Apps api
* request with statusCode 200.
*/
void setNavigationAppsEtagResponseHeader(const QByteArray &value);
public slots:
/// Triggers a ping to the server to update state and
/// connection status and errors.
@ -168,6 +178,7 @@ private:
QElapsedTimer _timeSinceLastETagCheck;
QPointer<ConnectionValidator> _connectionValidator;
QByteArray _notificationsEtagResponseHeader;
QByteArray _navigationAppsEtagResponseHeader;
/**
* Starts counting when the server starts being back up after 503 or