zbackup/config.hh

30 lines
769 B
C++
Raw Normal View History

// Copyright (c) 2012-2014 Konstantin Isakov <ikm@zbackup.org> and ZBackup contributors, see CONTRIBUTORS
// Part of ZBackup. Licensed under GNU GPLv2 or later + OpenSSL, see LICENSE
#ifndef CONFIG_HH_INCLUDED__
#define CONFIG_HH_INCLUDED__
#include <string>
#include <google/protobuf/text_format.h>
using std::string;
class ZConfig: public ZBackupBase
{
public:
ZConfig( string const & storageDir, string const & password );
// Print current configuration to screen
2014-12-30 17:13:48 +03:00
void show();
2014-12-29 17:24:09 +03:00
// Edit current configuration in default editor
2014-12-30 17:13:48 +03:00
// returns true if configuration is changed
bool edit();
2014-12-29 17:24:09 +03:00
private:
string toString( google::protobuf::Message const & message );
bool parse( const string & str, google::protobuf::Message * mutable_message );
};
#endif