153c3577eSopenharmony_ci/* 253c3577eSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 353c3577eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 453c3577eSopenharmony_ci * you may not use this file except in compliance with the License. 553c3577eSopenharmony_ci * You may obtain a copy of the License at 653c3577eSopenharmony_ci * 753c3577eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 853c3577eSopenharmony_ci * 953c3577eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1053c3577eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1153c3577eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1253c3577eSopenharmony_ci * See the License for the specific language governing permissions and 1353c3577eSopenharmony_ci * limitations under the License. 1453c3577eSopenharmony_ci */ 1553c3577eSopenharmony_ci 1653c3577eSopenharmony_ci#ifndef OHOS_SENSITIVE_H 1753c3577eSopenharmony_ci#define OHOS_SENSITIVE_H 1853c3577eSopenharmony_ci 1953c3577eSopenharmony_ci#include <string> 2053c3577eSopenharmony_ci#include "visibility.h" 2153c3577eSopenharmony_ci#include "iprocess_system_api_adapter.h" 2253c3577eSopenharmony_ci#include "dev_slinfo_mgr.h" 2353c3577eSopenharmony_ci 2453c3577eSopenharmony_cinamespace OHOS { 2553c3577eSopenharmony_cinamespace DistributedKv { 2653c3577eSopenharmony_ciclass Sensitive final { 2753c3577eSopenharmony_cipublic: 2853c3577eSopenharmony_ci explicit Sensitive(std::string deviceId); 2953c3577eSopenharmony_ci explicit Sensitive(); 3053c3577eSopenharmony_ci Sensitive(const Sensitive &sensitive); 3153c3577eSopenharmony_ci Sensitive &operator=(const Sensitive &sensitive); 3253c3577eSopenharmony_ci Sensitive(Sensitive &&sensitive) noexcept; 3353c3577eSopenharmony_ci Sensitive &operator=(Sensitive &&sensitive) noexcept; 3453c3577eSopenharmony_ci ~Sensitive() = default; 3553c3577eSopenharmony_ci operator bool() const; 3653c3577eSopenharmony_ci bool operator >= (const DistributedDB::SecurityOption &option); 3753c3577eSopenharmony_ci uint32_t GetDeviceSecurityLevel(); 3853c3577eSopenharmony_ci 3953c3577eSopenharmony_ciprivate: 4053c3577eSopenharmony_ci uint32_t GetSensitiveLevel(const std::string &udid); 4153c3577eSopenharmony_ci bool InitDEVSLQueryParams(DEVSLQueryParams *params, const std::string &udid); 4253c3577eSopenharmony_ci std::string deviceId {}; 4353c3577eSopenharmony_ci uint32_t securityLevel = 0; 4453c3577eSopenharmony_ci}; 4553c3577eSopenharmony_ci} // namespace DistributedKv 4653c3577eSopenharmony_ci} // namespace OHOS 4753c3577eSopenharmony_ci#endif // OHOS_SENSITIVE_H