yast2-core
WFMSubAgent.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | |
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
8 | |
9 | core system |
10 | (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12 
13  File: WFMSubAgent.h
14 
15  Author: Arvin Schnell <arvin@suse.de>
16  Maintainer: Arvin Schnell <arvin@suse.de>
17 
18 /-*/
19 
20 #ifndef WFMSubAgent_h
21 #define WFMSubAgent_h
22 
23 #include <string>
24 
25 using std::string;
26 
27 #include <y2/Y2Component.h>
28 
29 
34 {
35 
36 public:
37 
41  WFMSubAgent (const string&, int);
42 
46  ~WFMSubAgent ();
47 
51  bool start ();
52 
56  string get_name () const { return my_name; }
57 
61  int get_handle () const { return my_handle; }
62 
68  SCRAgent* agent () { return my_agent ? my_agent : (my_comp ? my_comp->getSCRAgent () : 0); }
69 
70 private:
71 
75  const string my_name;
76 
80  const int my_handle;
81 
86 
91 
92  WFMSubAgent (const WFMSubAgent&); // disallow
93  void operator = (const WFMSubAgent&); // disallow
94 
95 };
96 
97 
98 inline bool
99 wfmsubagent_less (const WFMSubAgent* a, int handle) // FIXME
100 {
101  return a->get_handle () < handle;
102 }
103 
104 
105 #endif // WFMSubAgent_h
Definition: WFMSubAgent.h:33
const int my_handle
Definition: WFMSubAgent.h:80
virtual SCRAgent * getSCRAgent()
Definition: Y2Component.cc:81
void operator=(const WFMSubAgent &)
Communication handle to a YaST2 component.
Definition: Y2Component.h:262
SuSE Configuration Repository Agent.
Definition: SCRAgent.h:37
SCRAgent * agent()
Definition: WFMSubAgent.h:68
bool wfmsubagent_less(const WFMSubAgent *a, int handle)
Definition: WFMSubAgent.h:99
Y2Component * my_comp
Definition: WFMSubAgent.h:85
SCRAgent * my_agent
Definition: WFMSubAgent.h:90
string get_name() const
Definition: WFMSubAgent.h:56
int get_handle() const
Definition: WFMSubAgent.h:61
~WFMSubAgent()
Definition: WFMSubAgent.cc:44
WFMSubAgent(const string &, int)
Definition: WFMSubAgent.cc:28
const string my_name
Definition: WFMSubAgent.h:75
bool start()
Definition: WFMSubAgent.cc:50

Generated on a sunny day for yast2-core by doxygen 1.8.5