xref: /aoo41x/main/sal/inc/rtl/process.h (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _RTL_PROCESS_H_
28 #define _RTL_PROCESS_H_
29 
30 #include <sal/types.h>
31 #include <osl/process.h>
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 
38 /**
39 	gets a 16-byte fixed size identifier which is guaranteed not to change
40 	during the current process.
41 
42 	The current implementation creates a 16-byte uuid without using
43 	the ethernet address of system. Thus the
44 	identifier is different from identifiers created
45 	in other processes with a very probability.
46 
47 	@param pTargetUUID 16 byte of memory
48     @see rtl_createUiid()
49  */
50 void SAL_CALL rtl_getGlobalProcessId( sal_uInt8 *pTargetUUID );
51 
52 /** Get the nArg-th command-line argument passed to the main-function of this process.
53 
54 	This functions differs from osl_getCommandArg() in filtering any bootstrap values
55 	given by command args, that means that all arguments starting with "-env:" will be
56 	ignored by this function.
57 
58     @param nArg [in] The number of the argument to return.
59 	@param strCommandArg [out] The string receives the nArg-th command-line argument.
60 	@return osl_Process_E_None or does not return.
61 	@see osl_getCommandArg()
62 	@see rtl_getCommandArgCount()
63 */
64 oslProcessError SAL_CALL rtl_getAppCommandArg(sal_uInt32 nArg, rtl_uString **strCommandArg);
65 
66 /** Returns the number of command line arguments at process start.
67 
68 	This functions differs from osl_getCommandArg() in filtering any bootstrap values
69 	given by command args, that means that all arguments starting with "-env:" will be
70 	ignored by this function.
71 
72 	@return the number of commandline arguments passed to the main-function of this process.
73     @see osl_getCommandArgCount()
74 	@see rtl_getCommandArg()
75 */
76 sal_uInt32 SAL_CALL rtl_getAppCommandArgCount();
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif
83