1/*
2 * Copyright (c) 2024 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 OHOS_DM_KV_INFO_H
17#define OHOS_DM_KV_INFO_H
18
19#include <string>
20
21namespace OHOS {
22namespace DistributedHardware {
23const std::string DB_KEY_DELIMITER = "###";
24const std::string UDID_HASH_KEY = "udidHash";
25const std::string APP_ID_KEY = "appID";
26const std::string ANOY_DEVICE_ID_KEY = "anoyDeviceId";
27const std::string SALT_KEY = "salt";
28const std::string LAST_MODIFY_TIME_KEY = "lastModifyTime";
29
30typedef struct DmKVValue {
31    std::string udidHash;
32    std::string appID;
33    std::string anoyDeviceId;
34    std::string salt;
35    int64_t lastModifyTime;
36    explicit DmKVValue() : udidHash(""), appID(""), anoyDeviceId(""), salt(""), lastModifyTime(0) {}
37} DmKVValue;
38void ConvertDmKVValueToJson(const DmKVValue &kvValue, std::string &result);
39void ConvertJsonToDmKVValue(const std::string &result, DmKVValue &kvValue);
40} // namespace DistributedHardware
41} // namespace OHOS
42#endif // OHOS_DM_KV_INFO_H
43