33 SCPM(
int options=0, std::ostream &info_out=std::cout, std::ostream &hash_out=std::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, std::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<std::pair<std::string, std::string> > resources );
88 bool UpdateResources( );
89 bool RestoreBackup(
const std::vector<std::pair<std::string, std::string> > &resources,
90 const std::vector<std::string> &versions,
const std::string &profile );
91 bool RemoveBackup(
const std::vector<std::pair<std::string, std::string> > &resources,
92 const std::vector<std::string> &versions,
const std::string &profile );
93 bool ListBackups(
const std::string &profile, std::vector<backup_info_t> *reslist );
94 bool AddBackup(
const std::vector<std::pair<std::string, std::string> > &resources,
95 const std::string &profile);
96 bool Recover(
bool rollback=
false );
102 struct prepare_failed{};
104 std::vector<resource_group_t> &GetGroupsByResource(
const std::string &resname,
105 const std::string &restype );
106 void Prepare(
bool write_access=
false );
111 bool switch_prepared;