diff options
Diffstat (limited to 'xbmc/settings/SettingsValueXmlSerializer.h')
-rw-r--r-- | xbmc/settings/SettingsValueXmlSerializer.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/xbmc/settings/SettingsValueXmlSerializer.h b/xbmc/settings/SettingsValueXmlSerializer.h new file mode 100644 index 0000000..010c036 --- /dev/null +++ b/xbmc/settings/SettingsValueXmlSerializer.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2019 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#pragma once + +#include "settings/lib/ISettingsValueSerializer.h" + +#include <memory> + +class CSetting; +class CSettingCategory; +class CSettingGroup; +class CSettingSection; +class TiXmlNode; + +class CSettingsValueXmlSerializer : public ISettingsValueSerializer +{ +public: + CSettingsValueXmlSerializer() = default; + ~CSettingsValueXmlSerializer() = default; + + // implementation of ISettingsValueSerializer + std::string SerializeValues(const CSettingsManager* settingsManager) const override; + +private: + void SerializeSection(TiXmlNode* parent, const std::shared_ptr<CSettingSection>& section) const; + void SerializeCategory(TiXmlNode* parent, + const std::shared_ptr<CSettingCategory>& category) const; + void SerializeGroup(TiXmlNode* parent, const std::shared_ptr<CSettingGroup>& group) const; + void SerializeSetting(TiXmlNode* parent, const std::shared_ptr<CSetting>& setting) const; +}; |