Move function definition to aul header
[platform/core/appfw/aul-1.git] / include / aul_proc_group.h
1 /*
2  * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __AUL_PROC_GROUP_H__
18 #define __AUL_PROC_GROUP_H__
19
20 #include <sys/types.h>
21 #include <unistd.h>
22
23 #include <aul.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /**
30  * @brief Adds the process to the process group.
31  * @remarks This function is only for App Framework internally.
32  * @remarks If the pid is not equal to the process ID of the caller,
33  *          the caller MUST have a permission that is signed by platform certificate.
34  *          If the caller doesn't have the permission, the function returns AUL_R_EILLACC.
35  * @since_tizen 6.5
36  * @param[in]   pid             The process ID
37  * @return @c 0 on success,
38  *         otherwise a negative error value
39  * @retval #AUL_R_OK Successful
40  * @retval #AUL_R_EINVAL Invalid parameter
41  * @retval #AUL_R_ECOMM Communication error on send
42  * @retval #AUL_R_EILLACC Permission denied
43  */
44 int aul_proc_group_add(pid_t pid);
45
46 /**
47  * @brief Removes the process from the process group.
48  * @remarks This function is only for App Framework internally.
49  * @remarks If the pid is not equal to the process ID of the caller,
50  *          the caller MUST have a permission that is signed by platform certificate.
51  *          If the caller doesn't have the permission, the function returns AUL_R_EILLACC.
52  * @since_tizen 6.5
53  * @param[in]   pid             The process ID
54  * @return @c 0 on success,
55  *         otherwise a negative error value
56  * @retval #AUL_R_OK Successful
57  * @retval #AUL_R_EINVAL Invalid parameter
58  * @retval #AUL_R_ECOMM Communication error on send
59  * @retval #AUL_R_EILLACC Permission denied
60  */
61 int aul_proc_group_remove(pid_t pid);
62
63 #ifdef __cplusplus
64 }
65 #endif
66
67 #endif /* __AUL_PROC_GROUP_H__ */