mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
Ref T709, changed DBus function to get/setSettingsJson, disambiguate from get/setSettings (returning CSettings)
This commit is contained in:
committed by
Mat Sutcliffe
parent
77883edf9c
commit
79f347cc1b
@@ -157,15 +157,15 @@ namespace XSwiftBus
|
||||
return path;
|
||||
}
|
||||
|
||||
std::string CService::getSettings() const
|
||||
std::string CService::getSettingsJson() const
|
||||
{
|
||||
return s_settingsProvider->getSettings().toXSwiftBusJsonString();
|
||||
return this->getSettings().toXSwiftBusJsonString();
|
||||
}
|
||||
|
||||
void CService::setSettings(const std::string &jsonString)
|
||||
void CService::setSettingsJson(const std::string &jsonString)
|
||||
{
|
||||
const CSettings s(jsonString);
|
||||
s_settingsProvider->setSettings(s);
|
||||
this->setSettings(s);
|
||||
INFO_LOG("Received settings " + s.convertToString());
|
||||
}
|
||||
|
||||
@@ -666,14 +666,14 @@ namespace XSwiftBus
|
||||
toggleMessageBoxVisibility();
|
||||
});
|
||||
}
|
||||
else if (message.getMethodName() == "getSettings")
|
||||
else if (message.getMethodName() == "getSettingsJson")
|
||||
{
|
||||
queueDBusCall([ = ]()
|
||||
{
|
||||
sendDBusReply(sender, serial, getSettings());
|
||||
sendDBusReply(sender, serial, getSettingsJson());
|
||||
});
|
||||
}
|
||||
else if (message.getMethodName() == "setSettings")
|
||||
else if (message.getMethodName() == "setSettingsJson")
|
||||
{
|
||||
maybeSendEmptyDBusReply(wantsReply, sender, serial);
|
||||
std::string json;
|
||||
@@ -681,7 +681,7 @@ namespace XSwiftBus
|
||||
message.getArgument(json);
|
||||
queueDBusCall([ = ]()
|
||||
{
|
||||
setSettings(json);
|
||||
setSettingsJson(json);
|
||||
});
|
||||
}
|
||||
else
|
||||
|
||||
@@ -235,10 +235,10 @@ namespace XSwiftBus
|
||||
void setDisappearMessageWindow(bool enabled) { m_disappearMessageWindow = enabled; }
|
||||
|
||||
//! Get settings in JSON format
|
||||
std::string getSettings() const;
|
||||
std::string getSettingsJson() const;
|
||||
|
||||
//! Set settings
|
||||
void setSettings(const std::string &jsonString);
|
||||
void setSettingsJson(const std::string &jsonString);
|
||||
|
||||
//! Perform generic processing
|
||||
int process();
|
||||
|
||||
Reference in New Issue
Block a user