Hush lite wallet
https://faq.hush.is/sdl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
727 B
42 lines
727 B
4 years ago
|
#include "ChatDataStore.h"
|
||
|
|
||
|
ChatDataStore* ChatDataStore::getInstance()
|
||
|
{
|
||
|
if(!ChatDataStore::instanced)
|
||
|
{
|
||
|
ChatDataStore::instanced = true;
|
||
|
ChatDataStore::instance = new ChatDataStore();
|
||
|
}
|
||
|
|
||
|
return ChatDataStore::instance;
|
||
|
}
|
||
|
|
||
|
void ChatDataStore::clear()
|
||
|
{
|
||
|
this->data.clear();
|
||
|
}
|
||
|
|
||
|
|
||
|
void ChatDataStore::setData(QString key, ChatItem value)
|
||
|
{
|
||
|
this->data[key] = value;
|
||
|
}
|
||
|
|
||
|
ChatItem ChatDataStore::getData(QString key)
|
||
|
{
|
||
|
return this->data[key];
|
||
|
}
|
||
|
|
||
|
QString ChatDataStore::dump()
|
||
|
{
|
||
|
return "";
|
||
|
}
|
||
|
|
||
|
std::map<QString, ChatItem> ChatDataStore::getAllRawChatItems()
|
||
|
{
|
||
|
return this->data;
|
||
|
}
|
||
|
|
||
|
|
||
|
ChatDataStore* ChatDataStore::instance = nullptr;
|
||
|
bool ChatDataStore::instanced = false;
|