yast2-core
Y2ProgramComponent.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: Y2ProgramComponent.h
14 
15  Author: Mathias Kettner <kettner@suse.de>
16  Maintainer: Arvin Schnell <arvin@suse.de>
17 
18 /-*/
19 // -*- c++ -*-
20 
21 /*
22  * Component that starts an external Y2 program
23  */
24 
25 #ifndef Y2ProgramComponent_h
26 #define Y2ProgramComponent_h
27 
28 #include "Y2.h"
29 #include <ycp/Parser.h>
30 
32 {
36  string chroot_path;
37 
41  string bin_file;
42 
46  bool is_non_y2;
47 
52 
56  int argc;
57 
61  char **argv;
62 
66  int to_external[2];
67 
71  int from_external[2];
72 
77  pid_t pid;
78 
83 
88  int level;
89 
90 public:
91 
92  Y2ProgramComponent (string chroot_path, string binpath,
93  const char *component_name, bool non_y2, int level);
94 
99 
103  string name() const;
104 
110  YCPValue evaluate(const YCPValue& command);
111 
118  void result(const YCPValue& result);
119 
125  void setServerOptions(int argc, char **argv);
126 
130  YCPValue doActualWork(const YCPList& arglist, Y2Component *user_interface);
131 
132  void sendToExternal(const string&);
133 
138 
139 
140  bool remote () const;
141 
142 
143 private:
148  void launchExternalProgram(char** argv);
149 
154 
158  void sendToExternal(const YCPValue&);
159 
163  bool externalProgramOK() const;
164 };
165 
166 
167 #endif // Y2ProgramComponent_h

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