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