1 /* 2 * Copyright (c) 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 EDM_ADMIN_H 17 #define EDM_ADMIN_H 18 19 #include <string> 20 #include <vector> 21 #include "ability_info.h" 22 #include "admin_type.h" 23 #include "edm_errors.h" 24 #include "ent_info.h" 25 #include "parcel_macro.h" 26 27 namespace OHOS { 28 namespace EDM { 29 struct AdminInfo { 30 AdminType adminType_; 31 std::string packageName_; 32 std::string className_; 33 EntInfo entInfo_; 34 std::vector<std::string> permission_; 35 }; 36 37 class Admin { 38 public: 39 virtual bool CheckPermission(const std::string &permission); 40 virtual AdminType GetAdminType(); 41 virtual ~Admin() = default; 42 AdminInfo adminInfo_; 43 }; 44 } // namespace EDM 45 } // namespace OHOS 46 47 #endif // EDM_ADMIN_H 48