1 /* 2 * Copyright (c) 2022-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 #include "permission_manager.h" 17 18 #include "dm_constants.h" 19 20 namespace OHOS { 21 namespace DistributedHardware { 22 DM_IMPLEMENT_SINGLE_INSTANCE(PermissionManager); 23 CheckPermission(void)24bool PermissionManager::CheckPermission(void) 25 { 26 return true; 27 } 28 CheckNewPermission(void)29bool PermissionManager::CheckNewPermission(void) 30 { 31 return true; 32 } 33 CheckMonitorPermission(void)34bool PermissionManager::CheckMonitorPermission(void) 35 { 36 return true; 37 } 38 GetCallerProcessName(std::string & processName)39int32_t PermissionManager::GetCallerProcessName(std::string &processName) 40 { 41 (void)processName; 42 return DM_OK; 43 } 44 CheckProcessNameValidOnAuthCode(const std::string & processName)45bool PermissionManager::CheckProcessNameValidOnAuthCode(const std::string &processName) 46 { 47 (void)processName; 48 return true; 49 } 50 CheckProcessNameValidOnPinHolder(const std::string & processName)51bool PermissionManager::CheckProcessNameValidOnPinHolder(const std::string &processName) 52 { 53 (void)processName; 54 return true; 55 } 56 CheckWhiteListSystemSA(const std::string & pkgName)57bool PermissionManager::CheckWhiteListSystemSA(const std::string &pkgName) 58 { 59 (void)pkgName; 60 return true; 61 } 62 GetWhiteListSystemSA()63std::unordered_set<std::string> PermissionManager::GetWhiteListSystemSA() 64 { 65 return std::unordered_set<std::string>{}; 66 } 67 CheckSystemSA(const std::string & pkgName)68bool PermissionManager::CheckSystemSA(const std::string &pkgName) 69 { 70 (void)pkgName; 71 return true; 72 } 73 CheckProcessNameValidModifyLocalDeviceName(const std::string & processName)74bool PermissionManager::CheckProcessNameValidModifyLocalDeviceName(const std::string &processName) 75 { 76 (void)processName; 77 return true; 78 } 79 CheckProcessNameValidOnSetDnPolicy(const std::string & processName)80bool PermissionManager::CheckProcessNameValidOnSetDnPolicy(const std::string &processName) 81 { 82 (void)processName; 83 return true; 84 } 85 CheckProcessNameValidModifyRemoteDeviceName(const std::string & processName)86bool PermissionManager::CheckProcessNameValidModifyRemoteDeviceName(const std::string &processName) 87 { 88 (void)processName; 89 return true; 90 } 91 CheckProcessNameValidOnGetDeviceInfo(const std::string & processName)92bool PermissionManager::CheckProcessNameValidOnGetDeviceInfo(const std::string &processName) 93 { 94 (void)processName; 95 return true; 96 } 97 CheckProcessNameValidPutDeviceProfileInfoList(const std::string & processName)98bool PermissionManager::CheckProcessNameValidPutDeviceProfileInfoList(const std::string &processName) 99 { 100 (void)processName; 101 return true; 102 } 103 } // namespace DistributedHardware 104 } // namespace OHOS 105