yast2-core
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
liby2
src
include
y2
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
31
class
Y2ProgramComponent
:
public
Y2Component
32
{
36
string
chroot_path
;
37
41
string
bin_file
;
42
46
bool
is_non_y2
;
47
51
string
component_name
;
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
82
Parser
parser
;
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
98
~Y2ProgramComponent
();
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
137
YCPValue
receiveFromExternal
();
138
139
140
bool
remote
()
const
;
141
142
143
private
:
148
void
launchExternalProgram
(
char
**
argv
);
149
153
void
terminateExternalProgram
();
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
1.8.2