7fd59977 |
1 | |
2 | --Copyright: Matra Datavision 1992,1993 |
3 | |
4 | -- File: OSD_Process.cdl |
5 | -- Created: Tue 18 1992 |
6 | -- Author: Stephan GARNAUD (ARM) |
7 | -- <sga@sparc4> |
8 | -- Modified: |
9 | --- Stephane Routelous ( stephane.routelous@altavista.net ) : |
10 | -- add ShowWindow flag to allow show/hide of the window ( only used on WNT ) |
11 | |
12 | |
13 | class Process from OSD |
14 | |
15 | ---Purpose: A set of system process tools |
16 | |
17 | uses Date from Quantity, Error, Path, File, AsciiString from TCollection |
18 | raises OSDError |
19 | |
20 | is |
21 | |
22 | Create returns Process; |
23 | ---Purpose: Initializes the object and prepare for a possible dump |
24 | ---Level: Advanced |
25 | |
26 | Spawn (me : in out; cmd : AsciiString; ShowWindow : Boolean from Standard = Standard_True) is static; |
27 | ---Purpose: Issues a shell command |
28 | --- ShowWindow : flag to allow show/hide of the window ( only used on WNT ) |
29 | ---Level: Advanced |
30 | |
31 | TerminalType (me : in out; Name : out AsciiString) is static; |
32 | ---Purpose: Returns the terminal used (vt100, vt200 ,sun-cmd ...) |
33 | ---Level: Advanced |
34 | |
35 | SystemDate (me : out) returns Date is static; |
36 | ---Purpose: Gets system date. |
37 | ---Level: Advanced |
38 | |
39 | UserId (me : in out) returns Integer is static; |
40 | ---Purpose: Returns the 'User Id'. |
41 | ---Level: Advanced |
42 | |
43 | UserName (me : in out) returns AsciiString is static; |
44 | ---Purpose: Returns the user name. |
45 | ---Level: Advanced |
46 | |
47 | IsSuperUser (me: in out) returns Boolean is static; |
48 | ---Purpose: Returns True if the process user is the super-user. |
49 | ---Level: Advanced |
50 | |
51 | ProcessId ( me : in out ) returns Integer is static; |
52 | ---Purpose: Returns the 'Process Id' |
53 | ---Level: Advanced |
54 | |
55 | CurrentDirectory (me : in out) returns Path is static; |
56 | ---Purpose: Returns the current path where the process is. |
57 | ---Level: Advanced |
58 | |
59 | SetCurrentDirectory (me : in out; where : Path) is static; |
60 | ---Purpose: Changes the current process directory. |
61 | ---Level: Advanced |
62 | |
63 | Failed (me) returns Boolean is static; |
64 | ---Purpose: Returns TRUE if an error occurs |
65 | ---Level: Advanced |
66 | |
67 | Reset (me : in out) is static; |
68 | ---Purpose: Resets error counter to zero |
69 | ---Level: Advanced |
70 | |
71 | Perror (me : in out) |
72 | ---Purpose: Raises OSD_Error |
73 | ---Level: Advanced |
74 | raises OSDError is static; |
75 | |
76 | Error (me) returns Integer is static; |
77 | ---Purpose: Returns error number if 'Failed' is TRUE. |
78 | ---Level: Advanced |
79 | |
80 | fields |
81 | |
82 | myError : Error; |
83 | end Process from OSD; |
84 | |
85 | |