2 * Copyright (C) 2017-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
9 #include "SettingUrlEncodedString.h"
12 #include "settings/lib/SettingsManager.h"
17 CSettingUrlEncodedString::CSettingUrlEncodedString(
18 const std::string
& id
, CSettingsManager
* settingsManager
/* = nullptr */)
19 : CSettingString(id
, settingsManager
)
22 CSettingUrlEncodedString::CSettingUrlEncodedString(
23 const std::string
& id
,
25 const std::string
& value
,
26 CSettingsManager
* settingsManager
/* = nullptr */)
27 : CSettingString(id
, label
, value
, settingsManager
)
30 CSettingUrlEncodedString::CSettingUrlEncodedString(const std::string
&id
, const CSettingUrlEncodedString
&setting
)
31 : CSettingString(id
, setting
)
34 std::string
CSettingUrlEncodedString::GetDecodedValue() const
36 return CURL::Decode(CSettingString::GetValue());
39 bool CSettingUrlEncodedString::SetDecodedValue(const std::string
&decodedValue
)
41 return CSettingString::SetValue(CURL::Encode(decodedValue
));
44 } /* namespace ADDON */