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 DEVICE_SECURITY_LEVEL_PROXY 17 #define DEVICE_SECURITY_LEVEL_PROXY 18 19 #include <cstdint> 20 #include <functional> 21 22 #include "errors.h" 23 #include "iremote_broker.h" 24 #include "iremote_object.h" 25 #include "iremote_proxy.h" 26 #include "nocopyable.h" 27 #include "refbase.h" 28 29 #include "device_security_defines.h" 30 #include "idevice_security_level.h" 31 32 namespace OHOS { 33 namespace Security { 34 namespace DeviceSecurityLevel { 35 using namespace OHOS; 36 class DeviceSecurityLevelProxy : public IRemoteProxy<IDeviceSecurityLevel>, public NoCopyable { 37 public: 38 explicit DeviceSecurityLevelProxy(const sptr<IRemoteObject> &impl); 39 ~DeviceSecurityLevelProxy() override = default; 40 int32_t RequestDeviceSecurityLevel(const DeviceIdentify &identify, const RequestOption &option, 41 const sptr<IRemoteObject> &callback, uint64_t cookie); 42 43 private: 44 static inline BrokerDelegator<DeviceSecurityLevelProxy> delegator_; 45 }; 46 } // namespace DeviceSecurityLevel 47 } // namespace Security 48 } // namespace OHOS 49 50 #endif // DEVICE_SECURITY_LEVEL_PROXY