1 /* 2 * Copyright (c) 2021 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 DSLM_SERVICE_H 17 #define DSLM_SERVICE_H 18 19 #include "iremote_stub.h" 20 #include "nocopyable.h" 21 #include "system_ability.h" 22 23 #include "idevice_security_level.h" 24 25 namespace OHOS { 26 namespace Security { 27 namespace DeviceSecurityLevel { 28 class DslmService : public SystemAbility, public IRemoteStub<IDeviceSecurityLevel> { 29 DECLARE_SYSTEM_ABILITY(DslmService); 30 31 public: 32 DISALLOW_COPY_AND_MOVE(DslmService); 33 explicit DslmService(int32_t saId, bool runOnCreate); 34 virtual ~DslmService() = default; 35 void OnStart() override; 36 void OnStop() override; 37 int32_t Dump(int fd, const std::vector<std::u16string> &args) override; 38 int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; 39 40 private: 41 int32_t ProcessGetDeviceSecurityLevel(MessageParcel &data, MessageParcel &reply); 42 }; 43 } // DeviceSecurityLevel 44 } // Security 45 } // OHOS 46 47 #endif // DSLM_SERVICE_H