|
yast2-snapper
|
00001 /* SnapperAgent.h 00002 * 00003 * Snapper agent implementation 00004 * 00005 * Authors: Jiri Suchomel <jsuchome@suse.cz> 00006 * 00007 * $Id: SnapperAgent.h 63174 2011-01-13 10:50:42Z jsuchome $ 00008 */ 00009 00010 #ifndef _SnapperAgent_h 00011 #define _SnapperAgent_h 00012 00013 #include <Y2.h> 00014 #include <scr/SCRAgent.h> 00015 00016 #include <snapper/Snapper.h> 00017 #include <snapper/Factory.h> 00018 #include <snapper/Snapshot.h> 00019 #include <snapper/Comparison.h> 00020 #include <snapper/File.h> 00021 00025 class SnapperAgent : public SCRAgent 00026 { 00027 private: 00032 snapper::Snapper* sh; 00033 bool snapper_initialized; 00034 string snapper_error; 00035 00040 string getValue (const YCPMap &map, const YCPString &key, const string &deflt); 00041 00048 int getIntValue ( const YCPMap &map, const YCPString &key, const int deflt); 00049 00054 YCPList getListValue (const YCPMap &map, const YCPString &key); 00055 00056 public: 00060 SnapperAgent(); 00061 00065 virtual ~SnapperAgent(); 00066 00072 virtual YCPValue Read ( const YCPPath &path, 00073 const YCPValue& arg = YCPNull(), 00074 const YCPValue& opt = YCPNull()); 00075 00079 virtual YCPBoolean Write(const YCPPath &path, 00080 const YCPValue& arg, 00081 const YCPValue& arg2 = YCPNull()); 00082 00086 virtual YCPValue Execute(const YCPPath &path, 00087 const YCPValue& arg = YCPNull(), 00088 const YCPValue& arg2 = YCPNull()); 00089 00093 virtual YCPList Dir(const YCPPath& path); 00094 00098 virtual YCPValue otherCommand(const YCPTerm& term); 00099 }; 00100 00101 #endif /* _SnapperAgent_h */
1.7.5.1