xref: /aoo41x/main/sal/inc/rtl/process.h (revision 9eab2a37)
1*9eab2a37SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*9eab2a37SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*9eab2a37SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*9eab2a37SAndrew Rist  * distributed with this work for additional information
6*9eab2a37SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*9eab2a37SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*9eab2a37SAndrew Rist  * "License"); you may not use this file except in compliance
9*9eab2a37SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*9eab2a37SAndrew Rist  *
11*9eab2a37SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*9eab2a37SAndrew Rist  *
13*9eab2a37SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*9eab2a37SAndrew Rist  * software distributed under the License is distributed on an
15*9eab2a37SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*9eab2a37SAndrew Rist  * KIND, either express or implied.  See the License for the
17*9eab2a37SAndrew Rist  * specific language governing permissions and limitations
18*9eab2a37SAndrew Rist  * under the License.
19*9eab2a37SAndrew Rist  *
20*9eab2a37SAndrew Rist  *************************************************************/
21*9eab2a37SAndrew Rist 
22*9eab2a37SAndrew Rist 
23cdf0e10cSrcweir #ifndef _RTL_PROCESS_H_
24cdf0e10cSrcweir #define _RTL_PROCESS_H_
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <sal/types.h>
27cdf0e10cSrcweir #include <osl/process.h>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #ifdef __cplusplus
30cdf0e10cSrcweir extern "C" {
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir 
33cdf0e10cSrcweir 
34cdf0e10cSrcweir /**
35cdf0e10cSrcweir 	gets a 16-byte fixed size identifier which is guaranteed not to change
36cdf0e10cSrcweir 	during the current process.
37cdf0e10cSrcweir 
38cdf0e10cSrcweir 	The current implementation creates a 16-byte uuid without using
39cdf0e10cSrcweir 	the ethernet address of system. Thus the
40cdf0e10cSrcweir 	identifier is different from identifiers created
41cdf0e10cSrcweir 	in other processes with a very probability.
42cdf0e10cSrcweir 
43cdf0e10cSrcweir 	@param pTargetUUID 16 byte of memory
44cdf0e10cSrcweir     @see rtl_createUiid()
45cdf0e10cSrcweir  */
46cdf0e10cSrcweir void SAL_CALL rtl_getGlobalProcessId( sal_uInt8 *pTargetUUID );
47cdf0e10cSrcweir 
48cdf0e10cSrcweir /** Get the nArg-th command-line argument passed to the main-function of this process.
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 	This functions differs from osl_getCommandArg() in filtering any bootstrap values
51cdf0e10cSrcweir 	given by command args, that means that all arguments starting with "-env:" will be
52cdf0e10cSrcweir 	ignored by this function.
53cdf0e10cSrcweir 
54cdf0e10cSrcweir     @param nArg [in] The number of the argument to return.
55cdf0e10cSrcweir 	@param strCommandArg [out] The string receives the nArg-th command-line argument.
56cdf0e10cSrcweir 	@return osl_Process_E_None or does not return.
57cdf0e10cSrcweir 	@see osl_getCommandArg()
58cdf0e10cSrcweir 	@see rtl_getCommandArgCount()
59cdf0e10cSrcweir */
60cdf0e10cSrcweir oslProcessError SAL_CALL rtl_getAppCommandArg(sal_uInt32 nArg, rtl_uString **strCommandArg);
61cdf0e10cSrcweir 
62cdf0e10cSrcweir /** Returns the number of command line arguments at process start.
63cdf0e10cSrcweir 
64cdf0e10cSrcweir 	This functions differs from osl_getCommandArg() in filtering any bootstrap values
65cdf0e10cSrcweir 	given by command args, that means that all arguments starting with "-env:" will be
66cdf0e10cSrcweir 	ignored by this function.
67cdf0e10cSrcweir 
68cdf0e10cSrcweir 	@return the number of commandline arguments passed to the main-function of this process.
69cdf0e10cSrcweir     @see osl_getCommandArgCount()
70cdf0e10cSrcweir 	@see rtl_getCommandArg()
71cdf0e10cSrcweir */
72cdf0e10cSrcweir sal_uInt32 SAL_CALL rtl_getAppCommandArgCount();
73cdf0e10cSrcweir 
74cdf0e10cSrcweir #ifdef __cplusplus
75cdf0e10cSrcweir }
76cdf0e10cSrcweir #endif
77cdf0e10cSrcweir 
78cdf0e10cSrcweir #endif
79