yast2-profile-manager
SCPMAgent.h
Go to the documentation of this file.
1 /* SCPMAgent.h
2  *
3  * SCPM agent implementation
4  *
5  * Authors: Jiri Suchomel <jsuchome@suse.cz>
6  *
7  * $Id: SCPMAgent.h 26456 2005-12-07 16:11:23Z jsuchome $
8  */
9 
10 #ifndef _SCPMAgent_h
11 #define _SCPMAgent_h
12 
13 #include <Y2.h>
14 #include <scr/SCRAgent.h>
15 
16 using namespace std;
17 
18 #include <iostream>
19 #include <scpm.h>
20 
21 #include <string>
22 #include <vector>
23 
24 #include <unistd.h>
25 #include <sys/types.h>
26 #include <sys/wait.h>
27 #include <libintl.h>
28 #include <fstream>
29 #include <pthread.h>
30 
31 
35 class SCPMAgent : public SCRAgent
36 {
37 private:
38  SCPM *scpm;
39 
40  int options;
41  ofstream output, hash;
42  string changesfile, tmpfile, hashfile;
43 
44  pthread_t pt;
45 
50 
54  static void *call_enable( SCPMAgent *);
55 
59  static void *call_recover (SCPMAgent *);
60 
64  static void *call_rollback (SCPMAgent *);
65  // ----------------------
66 
70  resource_group_t frommap_rg(YCPMap map);
71 
75  YCPMap tomap_rg(resource_group_t rgroup);
76 
80  vector<resource_entry_t> fromlist_re(YCPList list);
81 
85  resource_entry_t frommap_re(YCPMap map);
86 
90  YCPMap tomap_re(resource_entry_t rentry);
91 
92 public:
96  SCPMAgent();
97 
101  virtual ~SCPMAgent();
102 
108  virtual YCPValue Read(const YCPPath &path,
109  const YCPValue& arg = YCPNull(),
110  const YCPValue& opt = YCPNull());
111 
115  virtual YCPBoolean Write(const YCPPath &path,
116  const YCPValue& value,
117  const YCPValue& arg = YCPNull());
118 
122  virtual YCPValue Execute(const YCPPath &path,
123  const YCPValue& value = YCPNull(),
124  const YCPValue& arg = YCPNull());
125 
129  virtual YCPList Dir(const YCPPath& path);
130 
134  virtual YCPValue otherCommand(const YCPTerm& term);
135 };
136 
137 #endif /* _SCPMAgent_h */

Generated on a sunny day for yast2-profile-manager by doxygen 1.8.2