/***************************************************************************
- * Copyright (C) 2005-2013 by the Quassel Project *
+ * Copyright (C) 2005-2020 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
#include "coreinfo.h"
-// this file is needed to make automoc work
+CoreInfo::CoreInfo(QObject* parent)
+ : SyncableObject(parent)
+{}
+
+QVariantMap CoreInfo::coreData() const
+{
+ return _coreData;
+}
+
+void CoreInfo::setCoreData(const QVariantMap& coreData)
+{
+ _coreData = coreData;
+ SYNC(ARG(coreData));
+ emit coreDataChanged(coreData);
+}
+
+void CoreInfo::setConnectedClientData(const int peerCount, const QVariantList peerData)
+{
+ _coreData["sessionConnectedClients"] = peerCount;
+ _coreData["sessionConnectedClientData"] = peerData;
+ setCoreData(_coreData);
+}
+
+void CoreInfo::reset()
+{
+ // Clear any stored data
+ _coreData.clear();
+ // Propagate changes to listeners
+ emit coreDataChanged(_coreData);
+}