refs #198, enabled settings context to read / write JSON settings from/to file

This commit is contained in:
Klaus Basan
2014-04-01 12:22:06 +02:00
parent 4a180fc27f
commit fad31aa09a
5 changed files with 178 additions and 30 deletions

View File

@@ -36,7 +36,7 @@ namespace BlackCore
void CContextSettingsProxy::relaySignals(const QString &serviceName, QDBusConnection &connection)
{
connection.connect(serviceName, IContextSettings::ObjectPath(), IContextSettings::InterfaceName(),
"changedNetworkSettings", this, SIGNAL(changedNetworkSettings()));
"changedSettings", this, SIGNAL(changedSettings(uint)));
}
/*
@@ -65,8 +65,35 @@ namespace BlackCore
}
/*
* Write settings
*/
BlackMisc::CStatusMessage CContextSettingsProxy::write() const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::CStatusMessage>(QLatin1Literal("write"));
}
/*
* Read settings
*/
CStatusMessage CContextSettingsProxy::read()
{
return this->m_dBusInterface->callDBusRet<BlackMisc::CStatusMessage>(QLatin1Literal("read"));
}
/*
* File name
*/
QString CContextSettingsProxy::getSettingsFileName() const
{
return this->m_dBusInterface->callDBusRet<QString>(QLatin1Literal("getSettingsFileName"));
}
/*
* As JSON string
*/
QString CContextSettingsProxy::getSettingsAsJsonString() const
{
return this->m_dBusInterface->callDBusRet<QString>(QLatin1Literal("getSettingsAsJsonString"));
}
} // namespace