1/* 2 * Copyright (c) 2020-2022 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#ifndef OHOS_IAM_PERMLITE_FEATURE_H 17#define OHOS_IAM_PERMLITE_FEATURE_H 18 19#include "feature.h" 20#include "iunknown.h" 21#include "pms_types.h" 22 23#ifdef __cplusplus 24#if __cplusplus 25extern "C" { 26#endif 27#endif 28 29typedef struct PmsInnerApi { 30 INHERIT_IUNKNOWN; 31 int (*CheckPermission)(int uid, const char *permissionName); 32 int (*QueryPermission)(const char *identifier, PermissionSaved **permissions, int *permNum); 33 int (*GrantPermission)(const char *identifier, const char *permName); 34 int (*RevokePermission)(const char *identifier, const char *permName); 35 int (*GrantRuntimePermission)(int uid, const char *permissionName); 36 int (*RevokeRuntimePermission)(int uid, const char *permissionName); 37 int (*UpdatePermissionFlags)(const char *identifier, const char *permissionName, int flags); 38} PmsInnerApi; 39 40typedef struct PmsInner { 41 INHERIT_FEATURE; 42 INHERIT_IUNKNOWNENTRY(PmsInnerApi); 43 Identity identity; 44} PmsInner; 45 46#ifdef __cplusplus 47#if __cplusplus 48} 49#endif 50#endif 51#endif // OHOS_IAM_PERMLITE_FEATURE_H 52