33 SCPM(
int options=0, std::ostream &info_out=cout, std::ostream &hash_out=cout, std::string root=
"" );
36 bool Enable(
bool force=
false );
39 bool Active( std::string &profile );
40 bool List( std::vector<std::string> &profiles );
42 bool Add( std::string profile,
bool auto_switch=
true );
43 bool Copy( std::string source_profile, std::string profile );
44 bool Create( std::string profile, std::string source_profile );
45 bool Delete( std::string profile );
46 bool Rename( std::string profile, std::string newprofile );
51 bool Modify( std::string profile, std::string action );
52 bool Set( std::string command, std::string argument, std::string profile=
"" );
53 bool Get( std::string command, std::string &result, std::string profile=
"" );
56 bool ShowChanges( std::ostream &output, std::string resource_type,
57 std::string resource_name,
bool backup=
false,
string version=
"" );
61 bool ListResourceSets( std::vector<std::string> &predefined, std::vector<std::string> &individual );
66 bool GetResourceGroup(
const std::string &name, std::vector<resource_entry_t> &group,
68 bool GetResourceGroup(
const std::string &name, std::vector<resource_entry_t> &group,
69 std::string &description,
bool nouser=
false );
70 bool SetResourceGroup(
const std::string &name,
const std::vector<resource_entry_t> &group,
71 const std::string &description );
83 bool SetConfigOption(
const std::string &option,
const std::string &value );
87 bool Update(
const std::string &scriptname, std::vector<pair<std::string, std::string> > resources );
88 bool UpdateResources( );
89 bool RestoreBackup(
const std::vector<pair<string, string> > &resources,
const std::vector<std::string> &versions,
const std::string &profile );
90 bool RemoveBackup(
const std::vector<pair<string, string> > &resources,
const std::vector<std::string> &versions,
const std::string &profile );
91 bool ListBackups(
const std::string &profile, std::vector<backup_info_t> *reslist );
92 bool AddBackup(
const std::vector<pair<string, string> > &resources,
const std::string &profile);
93 bool Recover(
bool rollback=
false );
99 struct prepare_failed{};
101 std::vector<resource_group_t> &GetGroupsByResource(
const std::string &resname,
const std::string &restype );
102 void Prepare(
bool write_access=
false );
107 bool switch_prepared;