wire up thin_restore to use the restore_emitter
This commit is contained in:
parent
2937ed2d2b
commit
8f9d71ccc8
@ -1,6 +1,7 @@
|
||||
#include "emitter.h"
|
||||
#include "human_readable_format.h"
|
||||
#include "metadata.h"
|
||||
#include "restore_emitter.h"
|
||||
#include "xml_format.h"
|
||||
|
||||
#include <fstream>
|
||||
@ -17,9 +18,10 @@ namespace po = boost::program_options;
|
||||
|
||||
namespace {
|
||||
void restore(string const &backup_file, string const &dev) {
|
||||
emitter::ptr hr = create_human_readable_emitter(cout);
|
||||
metadata::ptr md(new metadata(dev));
|
||||
emitter::ptr restorer = create_restore_emitter(md);
|
||||
ifstream in(backup_file.c_str(), ifstream::in);
|
||||
parse_xml(in, hr);
|
||||
parse_xml(in, restorer);
|
||||
in.close();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user