19 #include <boost/archive/xml_iarchive.hpp>
20 #include <boost/archive/xml_oarchive.hpp>
32 RestoreFromFactory = 0x00000001,
33 RestoreFromLocal = 0x00000002,
38 KeepRestoreFromLocal = 0x80000000,
39 RestoreAll = RestoreFromFactory | RestoreFromLocal
55 virtual bool createAndWriteToBackupFile(
const std::ostringstream& str,
const std::string& path);
58 const std::string& backupFile()
const;
61 virtual bool backupExists()
const;
64 virtual bool factoryExists()
const;
68 virtual void backup();
72 virtual void deleteBackup();
75 virtual void restore(
bool fromFactory =
false);
78 virtual void getRestorableNames(
NameList& names);
82 virtual void restore(
bool fromFactory,
bool selectedOnly);
96 virtual std::string backupClassType()
const = 0;
104 virtual void write(boost::archive::xml_oarchive& ar) = 0;
108 virtual void read(boost::archive::xml_iarchive& ar) = 0;
111 void setManagerDestroyed(
bool b)
113 myManagerDestroyed = b;
120 const RestoreFlags& f = RestoreAll);
124 return myRestoreWhenRestored;
130 const RestoreFlags& f = RestoreAll);
134 virtual std::string backupName()
const;
136 void setBackupsPath(
const std::string& s)
141 const std::string& backupsPath()
const
143 return myBackupsPath;
146 void setFactoryFile(
const std::string& s)
151 const std::string& factoryFile()
const
153 return myFactoryFile;
166 virtual bool restore(
bool fromFactory,
167 std::vector<DtSettingsBackup*>& hasBeenRestored,
bool selectedOnly);