Ref T709, settings provider to get settings

* allows to use the provider without and overhead
* single source, can be made threadsafe

Signed-off-by: Klaus Basan <klaus.basan@klausbasan.de>
This commit is contained in:
Klaus Basan
2019-07-30 00:52:46 +02:00
committed by Mat Sutcliffe
parent 7004e85117
commit 006fbc88ae
2 changed files with 28 additions and 0 deletions

View File

@@ -27,5 +27,17 @@ namespace XSwiftBus
// void
}
CSettings ISettingsProvider::getSettings() const
{
std::lock_guard<std::mutex> l(m_settingsMutex);
return m_pluginSettings;
}
void ISettingsProvider::setSettings(const CSettings &settings)
{
std::lock_guard<std::mutex> l(m_settingsMutex);
m_pluginSettings = settings;
}
} // ns