My Project
UDK 3.2.7 C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
process.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * Copyright 2000, 2010 Oracle and/or its affiliates.
7  *
8  * OpenOffice.org - a multi-platform office productivity suite
9  *
10  * This file is part of OpenOffice.org.
11  *
12  * OpenOffice.org is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 3
14  * only, as published by the Free Software Foundation.
15  *
16  * OpenOffice.org is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License version 3 for more details
20  * (a copy is included in the LICENSE file that accompanied this code).
21  *
22  * You should have received a copy of the GNU Lesser General Public License
23  * version 3 along with OpenOffice.org. If not, see
24  * <http://www.openoffice.org/license.html>
25  * for a copy of the LGPLv3 License.
26  *
27  ************************************************************************/
28 
29 
30 #ifndef _OSL_PROCESS_H_
31 #define _OSL_PROCESS_H_
32 
33 #include <rtl/ustring.h>
34 #include <rtl/textenc.h>
35 #include <rtl/locale.h>
36 
37 #include <osl/time.h>
38 #include <osl/file.h>
39 #include <osl/pipe.h>
40 #include <osl/socket.h>
41 #include <osl/security.h>
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 
48 typedef sal_Int32 oslProcessOption;
49 #define osl_Process_WAIT 0x0001 /* wait for completion */
50 #define osl_Process_SEARCHPATH 0x0002 /* search path for executable */
51 #define osl_Process_DETACHED 0x0004 /* run detached */
52 #define osl_Process_NORMAL 0x0000 /* run in normal window */
53 #define osl_Process_HIDDEN 0x0010 /* run hidden */
54 #define osl_Process_MINIMIZED 0x0020 /* run in minimized window */
55 #define osl_Process_MAXIMIZED 0x0040 /* run in maximized window */
56 #define osl_Process_FULLSCREEN 0x0080 /* run in fullscreen window */
57 
58 typedef sal_Int32 oslProcessData;
59 
60 /* defines for osl_getProcessInfo , can be OR'ed */
61 #define osl_Process_IDENTIFIER 0x0001 /* retrieves the process identifier */
62 #define osl_Process_EXITCODE 0x0002 /* retrieves exit code of the process */
63 #define osl_Process_CPUTIMES 0x0004 /* retrieves used cpu time */
64 #define osl_Process_HEAPUSAGE 0x0008 /* retrieves the used size of heap */
65 
66 typedef sal_uInt32 oslProcessIdentifier;
67 typedef sal_uInt32 oslProcessExitCode;
68 
69 typedef enum {
70  osl_Process_E_None, /* no error */
71  osl_Process_E_NotFound, /* image not found */
72  osl_Process_E_TimedOut, /* timout occurred */
73  osl_Process_E_NoPermission, /* permission denied */
74  osl_Process_E_Unknown, /* unknown error */
75  osl_Process_E_InvalidError, /* unmapped error */
78 
79 typedef enum {
80  osl_Process_TypeNone, /* no descriptor */
81  osl_Process_TypeSocket, /* socket */
86 
87 typedef sal_Int32 oslDescriptorFlag;
88 #define osl_Process_DFNONE 0x0000
89 #define osl_Process_DFWAIT 0x0001
90 
91 #ifdef SAL_W32
92 # pragma pack(push, 8)
93 #endif
94 
95 typedef struct {
96  sal_uInt32 Size;
97  oslProcessData Fields;
98  oslProcessIdentifier Ident;
99  oslProcessExitCode Code;
102  sal_uInt32 HeapUsage;
104 
105 #if defined( SAL_W32)
106 # pragma pack(pop)
107 #endif
108 
117 typedef void* oslProcess;
118 
180  rtl_uString* ustrImageName,
181  rtl_uString* ustrArguments[],
182  sal_uInt32 nArguments,
183  oslProcessOption Options,
184  oslSecurity Security,
185  rtl_uString* ustrDirectory,
186  rtl_uString* ustrEnvironments[],
187  sal_uInt32 nEnvironmentVars,
188  oslProcess* pProcess);
189 
190 
266  rtl_uString* strImageName,
267  rtl_uString* ustrArguments[],
268  sal_uInt32 nArguments,
269  oslProcessOption Options,
270  oslSecurity Security,
271  rtl_uString* ustrDirectory,
272  rtl_uString* ustrEnvironments[],
273  sal_uInt32 nEnvironmentVars,
274  oslProcess* pProcess,
275  oslFileHandle* pChildInputWrite,
276  oslFileHandle* pChildOutputRead,
277  oslFileHandle* pChildErrorRead);
278 
287  oslProcess Process);
288 
289 
296 SAL_DLLPUBLIC oslProcess SAL_CALL osl_getProcess(
297  oslProcessIdentifier Ident);
298 
299 
304  oslProcess Process);
305 
306 
313  oslProcess Process);
314 
333  oslProcess Process, const TimeValue* pTimeout);
334 
351  oslProcess Process, oslProcessData Fields, oslProcessInfo* pInfo);
352 
359  rtl_uString **strFile);
360 
365 SAL_DLLPUBLIC sal_uInt32 SAL_CALL osl_getCommandArgCount(void);
366 
374  sal_uInt32 nArg, rtl_uString **strCommandArg);
375 
389 SAL_DLLPUBLIC void SAL_CALL osl_setCommandArgs (int argc, char **argv);
390 
396  rtl_uString *strVar, rtl_uString **strValue);
397 
405  rtl_uString *strVar, rtl_uString *strValue);
406 
413  rtl_uString *strVar);
414 
422  rtl_uString **pustrWorkingDir );
423 
434  rtl_Locale ** ppLocale );
435 
443  rtl_Locale * pLocale );
444 
445 
447  oslPipe Pipe, oslSocket Socket );
448 
450  oslPipe Pipe );
451 
452 #ifdef __cplusplus
453 }
454 #endif
455 
456 #endif /* _OSL_PROCESS_H_ */
457 
458 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */