aboutsummaryrefslogtreecommitdiff
path: root/lib/connectiondata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connectiondata.cpp')
-rw-r--r--lib/connectiondata.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/connectiondata.cpp b/lib/connectiondata.cpp
index cbc36420..e2a0f06f 100644
--- a/lib/connectiondata.cpp
+++ b/lib/connectiondata.cpp
@@ -42,6 +42,7 @@ public:
QString lastEvent;
QString userId;
QString deviceId;
+ std::vector<QString> needToken;
mutable unsigned int txnCounter = 0;
const qint64 txnBase = QDateTime::currentMSecsSinceEpoch();
@@ -143,6 +144,12 @@ const QString& ConnectionData::deviceId() const { return d->deviceId; }
const QString& ConnectionData::userId() const { return d->userId; }
+bool ConnectionData::needsToken(const QString& requestName) const
+{
+ return std::find(d->needToken.cbegin(), d->needToken.cend(), requestName)
+ != d->needToken.cend();
+}
+
void ConnectionData::setDeviceId(const QString& deviceId)
{
d->deviceId = deviceId;
@@ -150,6 +157,11 @@ void ConnectionData::setDeviceId(const QString& deviceId)
void ConnectionData::setUserId(const QString& userId) { d->userId = userId; }
+void ConnectionData::setNeedsToken(const QString& requestName)
+{
+ d->needToken.push_back(requestName);
+}
+
QString ConnectionData::lastEvent() const { return d->lastEvent; }
void ConnectionData::setLastEvent(QString identifier)