From 691467c952e2699a7370a19ff3b05b685045f39d Mon Sep 17 00:00:00 2001 From: waterwin Date: Thu, 27 Jan 2022 17:31:21 +0800 Subject: [PATCH] add data security level interface Signed-off-by: qianjiaxing --- interfaces/innerkits/include/security_label.h | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 interfaces/innerkits/include/security_label.h diff --git a/interfaces/innerkits/include/security_label.h b/interfaces/innerkits/include/security_label.h new file mode 100644 index 000000000..3727c9a61 --- /dev/null +++ b/interfaces/innerkits/include/security_label.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FOUNDATION_FILEMANAGEMENT_FILEAPI_INTERFACES_INNERKITS_SECURITY_LABEL_H +#define FOUNDATION_FILEMANAGEMENT_FILEAPI_INTERFACES_INNERKITS_SECURITY_LABEL_H + +#include + +namespace OHOS { +namespace FileIO { +class SecurityLabel { +public: + static bool SetSecurityLabel(std::string path, std::string dataLevel) + { + return true; + } + static std::string GetSecurityLabel(std::string path) + { + return "data.security.level"; + }; +}; +} // namespace FileIO +} // namespace OHOS + +#endif \ No newline at end of file -- Gitee