18 #include <boost/archive/xml_iarchive.hpp>
19 #include <boost/archive/xml_oarchive.hpp>
31 RestoreFromFactory = 0x00000001,
32 RestoreFromLocal = 0x00000002,
37 KeepRestoreFromLocal = 0x80000000,
38 RestoreAll = RestoreFromFactory | RestoreFromLocal
54 virtual bool createAndWriteToBackupFile(
const std::ostringstream& str,
const std::string& path);
57 const std::string& backupFile()
const;
60 virtual bool backupExists()
const;
63 virtual bool factoryExists()
const;
67 virtual void backup();
71 virtual void deleteBackup();
74 virtual void restore(
bool fromFactory =
false);
77 virtual void getRestorableNames(
NameList& names);
81 virtual void restore(
bool fromFactory,
bool selectedOnly);
95 virtual std::string backupClassType()
const = 0;
103 virtual void write(boost::archive::xml_oarchive& ar) = 0;
107 virtual void read(boost::archive::xml_iarchive& ar) = 0;
110 void setManagerDestroyed(
bool b)
112 myManagerDestroyed = b;
119 const RestoreFlags& f = RestoreAll);
123 return myRestoreWhenRestored;
129 const RestoreFlags& f = RestoreAll);
133 virtual std::string backupName()
const;
135 void setBackupsPath(
const std::string& s)
140 const std::string& backupsPath()
const
142 return myBackupsPath;
145 void setFactoryFile(
const std::string& s)
150 const std::string& factoryFile()
const
152 return myFactoryFile;
165 virtual bool restore(
bool fromFactory,
166 std::vector<DtSettingsBackup*>& hasBeenRestored,
bool selectedOnly);