Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CSettingsMigration Class Reference

#include <SettingsMigration.h>

Public Member Functions

 CSettingsMigration ()
 
 CSettingsMigration (KODI::SETTINGS::MigrationStepList steps)
 
bool UpdateXMLSettings (TiXmlElement *root, int currentVersion, int targetVersion)
 Upgrade the settings contained in root from fromVersion to targetVersion. Multiple steps will be executed automatically when fromVersion is more than one version away from targetVersion.
 

Constructor & Destructor Documentation

◆ CSettingsMigration() [1/2]

CSettingsMigration::CSettingsMigration ( )

◆ CSettingsMigration() [2/2]

CSettingsMigration::CSettingsMigration ( KODI::SETTINGS::MigrationStepList steps)

Member Function Documentation

◆ UpdateXMLSettings()

bool CSettingsMigration::UpdateXMLSettings ( TiXmlElement * root,
int currentVersion,
int targetVersion )

Upgrade the settings contained in root from fromVersion to targetVersion. Multiple steps will be executed automatically when fromVersion is more than one version away from targetVersion.

Parameters
[in,out]rootSettings XML representation.
[in]fromVersionVersion to upgrade from.
[in]targetVersionVersion to upgrade to.
Returns
False for catastrophic failure (for example root left in an inconsistent state due to out of memory. A setting that doesn't convert properly due to an invalid value is not a catastrophic failure: the situation is logged and the setting receives its default value). True otherwise.
Todo
would be nice to include the filename or something to identify more precisely in the log

The documentation for this class was generated from the following files: