1 /* 2 * Copyright (c) 2023 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 INTERFACES_INNER_API_RESTRICTIONS_INCLUDE_RESTRICTIONS_PROXY_H 17 #define INTERFACES_INNER_API_RESTRICTIONS_INCLUDE_RESTRICTIONS_PROXY_H 18 #include "enterprise_device_mgr_proxy.h" 19 20 namespace OHOS { 21 namespace EDM { 22 class RestrictionsProxy { 23 public: 24 static std::shared_ptr<RestrictionsProxy> GetRestrictionsProxy(); 25 int32_t SetPrinterDisabled(const AppExecFwk::ElementName &admin, bool isDisabled); 26 int32_t SetHdcDisabled(const AppExecFwk::ElementName &admin, bool isDisabled); 27 int32_t IsPrinterDisabled(AppExecFwk::ElementName *admin, bool &result); 28 int32_t IsHdcDisabled(AppExecFwk::ElementName *admin, bool &result); 29 int32_t DisableMicrophone(const AppExecFwk::ElementName &admin, bool disable); 30 int32_t IsMicrophoneDisabled(AppExecFwk::ElementName *admin, bool &result); 31 int32_t SetFingerprintAuthDisabled(const AppExecFwk::ElementName &admin, bool disable); 32 int32_t IsFingerprintAuthDisabled(AppExecFwk::ElementName *admin, bool &result); 33 34 private: 35 static std::shared_ptr<RestrictionsProxy> instance_; 36 static std::mutex mutexLock_; 37 }; 38 } // namespace EDM 39 } // namespace OHOS 40 #endif // INTERFACES_INNER_API_RESTRICTIONS_INCLUDE_RESTRICTIONS_PROXY_H