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  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 
21 #ifndef _OSL_PROCESS_H_
22 #define _OSL_PROCESS_H_
23 
24 #include "sal/config.h"
25 
26 #include "osl/file.h"
27 #include "osl/pipe.h"
28 #include "osl/security.h"
29 #include "osl/socket.h"
30 #include "osl/time.h"
31 #include "rtl/locale.h"
32 #include "rtl/textenc.h"
33 #include "rtl/ustring.h"
34 #include "sal/saldllapi.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 
41 typedef sal_Int32 oslProcessOption;
42 #define osl_Process_WAIT 0x0001 /* wait for completion */
43 #define osl_Process_SEARCHPATH 0x0002 /* search path for executable */
44 #define osl_Process_DETACHED 0x0004 /* run detached */
45 #define osl_Process_NORMAL 0x0000 /* run in normal window */
46 #define osl_Process_HIDDEN 0x0010 /* run hidden */
47 #define osl_Process_MINIMIZED 0x0020 /* run in minimized window */
48 #define osl_Process_MAXIMIZED 0x0040 /* run in maximized window */
49 #define osl_Process_FULLSCREEN 0x0080 /* run in fullscreen window */
50 
51 typedef sal_Int32 oslProcessData;
52 
53 /* defines for osl_getProcessInfo , can be OR'ed */
54 #define osl_Process_IDENTIFIER 0x0001 /* retrieves the process identifier */
55 #define osl_Process_EXITCODE 0x0002 /* retrieves exit code of the process */
56 #define osl_Process_CPUTIMES 0x0004 /* retrieves used cpu time */
57 #define osl_Process_HEAPUSAGE 0x0008 /* retrieves the used size of heap */
58 
59 typedef sal_uInt32 oslProcessIdentifier;
60 typedef sal_uInt32 oslProcessExitCode;
61 
62 typedef enum {
63  osl_Process_E_None, /* no error */
64  osl_Process_E_NotFound, /* image not found */
65  osl_Process_E_TimedOut, /* timout occurred */
66  osl_Process_E_NoPermission, /* permission denied */
67  osl_Process_E_Unknown, /* unknown error */
68  osl_Process_E_InvalidError, /* unmapped error */
71 
72 typedef enum {
73  osl_Process_TypeNone, /* no descriptor */
74  osl_Process_TypeSocket, /* socket */
79 
80 typedef sal_Int32 oslDescriptorFlag;
81 #define osl_Process_DFNONE 0x0000
82 #define osl_Process_DFWAIT 0x0001
83 
84 #ifdef SAL_W32
85 # pragma pack(push, 8)
86 #endif
87 
88 typedef struct {
89  sal_uInt32 Size;
90  oslProcessData Fields;
91  oslProcessIdentifier Ident;
92  oslProcessExitCode Code;
95  sal_uInt32 HeapUsage;
97 
98 #if defined( SAL_W32)
99 # pragma pack(pop)
100 #endif
101 
110 typedef void* oslProcess;
111 
173  rtl_uString* ustrImageName,
174  rtl_uString* ustrArguments[],
175  sal_uInt32 nArguments,
176  oslProcessOption Options,
177  oslSecurity Security,
178  rtl_uString* ustrDirectory,
179  rtl_uString* ustrEnvironments[],
180  sal_uInt32 nEnvironmentVars,
181  oslProcess* pProcess);
182 
183 
259  rtl_uString* strImageName,
260  rtl_uString* ustrArguments[],
261  sal_uInt32 nArguments,
262  oslProcessOption Options,
263  oslSecurity Security,
264  rtl_uString* ustrDirectory,
265  rtl_uString* ustrEnvironments[],
266  sal_uInt32 nEnvironmentVars,
267  oslProcess* pProcess,
268  oslFileHandle* pChildInputWrite,
269  oslFileHandle* pChildOutputRead,
270  oslFileHandle* pChildErrorRead);
271 
280  oslProcess Process);
281 
282 
289 SAL_DLLPUBLIC oslProcess SAL_CALL osl_getProcess(
290  oslProcessIdentifier Ident);
291 
292 
297  oslProcess Process);
298 
299 
306  oslProcess Process);
307 
326  oslProcess Process, const TimeValue* pTimeout);
327 
344  oslProcess Process, oslProcessData Fields, oslProcessInfo* pInfo);
345 
352  rtl_uString **strFile);
353 
358 SAL_DLLPUBLIC sal_uInt32 SAL_CALL osl_getCommandArgCount(void);
359 
367  sal_uInt32 nArg, rtl_uString **strCommandArg);
368 
382 SAL_DLLPUBLIC void SAL_CALL osl_setCommandArgs (int argc, char **argv);
383 
389  rtl_uString *strVar, rtl_uString **strValue);
390 
398  rtl_uString *strVar, rtl_uString *strValue);
399 
406  rtl_uString *strVar);
407 
415  rtl_uString **pustrWorkingDir );
416 
427  rtl_Locale ** ppLocale );
428 
436  rtl_Locale * pLocale );
437 
438 
440  oslPipe Pipe, oslSocket Socket );
441 
443  oslPipe Pipe );
444 
445 #ifdef __cplusplus
446 }
447 #endif
448 
449 #endif /* _OSL_PROCESS_H_ */
450 
451 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */