1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @addtogroup AbilityAccessControl
18  * @{
19  *
20  * @brief Provides the capability to manage access token.
21  *
22  * @since 12
23  */
24 
25 /**
26  * @file ability_access_control.h
27  *
28  * @brief Declares the APIs for managing access token.
29  *
30  * @library ability_access_control.so
31  * @kit AbilityKit
32  * @syscap SystemCapability.Security.AccessToken
33  * @since 12
34  */
35 
36 #ifndef ABILITY_ACCESS_CONTROL_H
37 #define ABILITY_ACCESS_CONTROL_H
38 
39 #include <stdbool.h>
40 #include <stdint.h>
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /**
47  * @brief Checks whether this application has been granted the given permission.
48  *
49  * @param permission - Name of the permission to be granted.
50  * @return true  - The permission has been granted to this application.
51  *         false - The permission has not been granted to this application.
52  * @since 12
53  */
54 bool OH_AT_CheckSelfPermission(const char *permission);
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
60 /** @} */
61 #endif /* ABILITY_ACCESS_CONTROL_H */
62