|
yast2-snapper
|
An interface class between YaST2 and Snapper Agent. More...
#include <SnapperAgent.h>
Public Member Functions | |
| SnapperAgent () | |
| virtual | ~SnapperAgent () |
| virtual YCPValue | Read (const YCPPath &path, const YCPValue &arg=YCPNull(), const YCPValue &opt=YCPNull()) |
| virtual YCPBoolean | Write (const YCPPath &path, const YCPValue &arg, const YCPValue &arg2=YCPNull()) |
| virtual YCPValue | Execute (const YCPPath &path, const YCPValue &arg=YCPNull(), const YCPValue &arg2=YCPNull()) |
| virtual YCPList | Dir (const YCPPath &path) |
| virtual YCPValue | otherCommand (const YCPTerm &term) |
Private Member Functions | |
| string | getValue (const YCPMap &map, const YCPString &key, const string &deflt) |
| int | getIntValue (const YCPMap &map, const YCPString &key, const int deflt) |
| YCPList | getListValue (const YCPMap &map, const YCPString &key) |
Private Attributes | |
| snapper::Snapper * | sh |
| bool | snapper_initialized |
| string | snapper_error |
An interface class between YaST2 and Snapper Agent.
| SnapperAgent::SnapperAgent | ( | ) |
Default constructor.
Constructor
References log_do(), log_query(), sh, snapper_error, and snapper_initialized.
|
virtual |
|
virtual |
Provides SCR Dir ().
Dir
|
virtual |
Provides SCR Execute ().
Execute
Execute (.snapper) call: Initialize snapper object
Rollback the list of given files from snapshot num1 to num2 (system by default)
References getIntValue(), getListValue(), getValue(), PC, sh, snapper_error, and snapper_initialized.
|
private |
|
private |
Search the map for value of given key; key is string and value is YCPList
Referenced by Execute().
|
private |
search the map for value of given key; both key and value have to be strings when key is not present, default value is returned
Referenced by Execute().
|
virtual |
Used for mounting the agent.
otherCommand
|
virtual |
Provides SCR Read ().
| path | Path that should be read. |
| arg | Additional parameter. |
Read
Read (.snapper.error) -> returns last error message
Read (.snapper.path, $[ "num" : num]) -> returns the path to directory with given snapshot
Read(.snapper.snapshots) -> return list of snapshot description maps
Read(.snapper.diff_list) -> show difference between snapnots num1 and num2 as list.
Read(.snapper.diff_index) -> show difference between snapnots num1 and num2 as one-level map: (mapping each file to its changes)
Read(.snapper.diff_tree) -> show difference between snapnots num1 and num2 as tree.
References getIntValue(), make_ycpmap(), PC, sh, snapper_error, snapper_initialized, and Tree::trees.
|
virtual |
Provides SCR Write ().
Write
|
private |
Agent private variables and methods
Referenced by Execute(), Read(), SnapperAgent(), and ~SnapperAgent().
|
private |
Referenced by Execute(), Read(), and SnapperAgent().
|
private |
Referenced by Execute(), Read(), and SnapperAgent().
1.8.1