+void Client::recvSessionData(const QString &key, const QVariant &data) {
+ sessionData[key] = data;
+ emit sessionDataChanged(key, data);
+ emit sessionDataChanged(key);
+ qDebug() << "stored data in client:" << key;
+}
+
+void Client::storeSessionData(const QString &key, const QVariant &data) {
+ // Not sure if this is a good idea, but we'll try it anyway:
+ // Calling this function only sends a signal to core. Data is stored upon reception of the update signal,
+ // rather than immediately.
+ emit instance()->sendSessionData(key, data);
+}
+
+QVariant Client::retrieveSessionData(const QString &key, const QVariant &def) {
+ if(instance()->sessionData.contains(key)) return instance()->sessionData[key];
+ else return def;
+}
+