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 FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BMS_PARAM_H
17#define FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BMS_PARAM_H
18
19#include "rdb_data_manager.h"
20
21namespace OHOS {
22namespace AppExecFwk {
23class BmsParam {
24public:
25    BmsParam();
26    ~BmsParam();
27
28    /**
29     * @brief Get bms param.
30     * @param key Indicates the key.
31     * @param value Indicates the value.
32     * @return Returns true if this function is successfully called; returns false otherwise.
33     */
34    bool GetBmsParam(const std::string &key, std::string &value);
35    /**
36     * @brief Save the bms param.
37     * @param paramKeyInfo Indicates the bms param key.
38     * @param paramValueInfo Indicates the bms param value.
39     * @return Returns true if this function is successfully called; returns false otherwise.
40     */
41    bool SaveBmsParam(const std::string &paramKeyInfo, const std::string &paramValueInfo);
42
43    /**
44     * @brief Delete bms param.
45     * @param key Indicates the key.
46     * @return Returns true if this function is successfully called; returns false otherwise.
47     */
48    bool DeleteBmsParam(const std::string &key);
49
50private:
51    std::shared_ptr<RdbDataManager> rdbDataManager_ = nullptr;
52};
53} // namespace AppExecFwk
54} // namespace OHOS
55#endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BMS_PARAM_H