mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 21:13:35 +00:00
[traffic] API to reconfigure a running HttpTrafficSource
Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
@@ -2589,6 +2589,11 @@ void Framework::SaveTrafficEnabled(bool trafficEnabled)
|
||||
settings::Set(kTrafficEnabledKey, trafficEnabled);
|
||||
}
|
||||
|
||||
void Framework::SetTrafficHttpEnabled(bool enabled)
|
||||
{
|
||||
m_trafficManager.SetHttpTraffSource(enabled, LoadTrafficHttpUrl());
|
||||
}
|
||||
|
||||
bool Framework::LoadTrafficHttpEnabled()
|
||||
{
|
||||
bool enabled;
|
||||
@@ -2602,6 +2607,11 @@ void Framework::SaveTrafficHttpEnabled(bool trafficHttpEnabled)
|
||||
settings::Set(kTrafficHttpEnabledKey, trafficHttpEnabled);
|
||||
}
|
||||
|
||||
void Framework::SetTrafficHttpUrl(std::string url)
|
||||
{
|
||||
m_trafficManager.SetHttpTraffSource(LoadTrafficHttpEnabled(), url);
|
||||
}
|
||||
|
||||
std::string Framework::LoadTrafficHttpUrl()
|
||||
{
|
||||
std::string url;
|
||||
|
||||
Reference in New Issue
Block a user