yast2-core
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
agent-process
src
ProcessAgent.h
Go to the documentation of this file.
1
/* ProcessAgent.h
2
*
3
* ------------------------------------------------------------------------------
4
* Copyright (c) 2008 Novell, Inc. All Rights Reserved.
5
*
6
*
7
* This program is free software; you can redistribute it and/or modify it under
8
* the terms of the GNU General Public License as published by the
9
* Free Software Foundation; either version 2 of the License, or (at your
10
* option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful, but WITHOUT
13
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License along with
17
* this program; if not, contact Novell, Inc.
18
*
19
* To contact Novell about this file by physical or electronic mail, you may find
20
* current contact information at www.novell.com.
21
* ------------------------------------------------------------------------------
22
*
23
* An agent for managing multiple processes.
24
*
25
* Authors: Ladislav Slezák <lslezak@novell.com>
26
*
27
* $Id: ProcessAgent.h 27914 2006-02-13 14:32:08Z locilka $
28
*/
29
30
#ifndef _ProcessAgent_h
31
#define _ProcessAgent_h
32
33
#include <
Y2.h
>
34
#include <
scr/SCRAgent.h
>
35
36
#include <map>
37
38
class
Process
;
39
43
class
ProcessAgent
:
public
SCRAgent
44
{
45
private
:
50
// typedef of internal data representation
51
typedef
map<pid_t, Process*>
ProcessContainer
;
52
53
ProcessContainer
_processes
;
54
55
private
:
56
57
YCPValue
ProcessOutput
(std::string &
output
);
58
59
public
:
63
ProcessAgent
();
64
68
virtual
~ProcessAgent
();
69
75
virtual
YCPValue
Read
(
const
YCPPath
&path,
76
const
YCPValue
& arg =
YCPNull
(),
77
const
YCPValue
& opt =
YCPNull
());
78
82
virtual
YCPBoolean
Write
(
const
YCPPath
&path,
83
const
YCPValue
& value,
84
const
YCPValue
& arg =
YCPNull
());
85
89
virtual
YCPValue
Execute
(
const
YCPPath
&path,
90
const
YCPValue
& value =
YCPNull
(),
91
const
YCPValue
& arg =
YCPNull
());
92
96
virtual
YCPList
Dir
(
const
YCPPath
& path);
97
101
virtual
YCPValue
otherCommand
(
const
YCPTerm
& term);
102
};
103
104
#endif
/* _ProcessAgent_h */
Generated on a sunny day for yast2-core by
1.8.2