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 OHOS_DISTRIBUTED_DATA_ADAPTER_COMMUNICATOR_COMMU_TYPES_H 17 #define OHOS_DISTRIBUTED_DATA_ADAPTER_COMMUNICATOR_COMMU_TYPES_H 18 #include <string> 19 #include "store_errno.h" 20 #include "visibility.h" 21 namespace OHOS::AppDistributedKv { 22 using Status = DistributedKv::Status; 23 struct API_EXPORT DeviceInfo { 24 std::string uuid; 25 std::string udid; 26 std::string networkId; 27 std::string deviceName; 28 uint32_t deviceType; 29 }; 30 31 enum DeviceType { 32 SMART_WATCH, 33 KID_WATCH, 34 PHONE, 35 OTHERS, 36 }; 37 38 struct API_EXPORT PipeInfo { 39 std::string pipeId; 40 std::string userId; 41 }; 42 43 struct API_EXPORT DeviceId { 44 std::string deviceId; 45 }; 46 47 enum class API_EXPORT MessageType { 48 DEFAULT = 0, 49 FILE = 1, 50 }; 51 52 struct API_EXPORT MessageInfo { 53 MessageType msgType; 54 }; 55 56 enum class API_EXPORT DeviceChangeType { 57 DEVICE_OFFLINE = 0, 58 DEVICE_ONLINE = 1, 59 DEVICE_ONREADY = 2, 60 }; 61 62 enum class API_EXPORT DeviceStatus { 63 OFFLINE = 0, 64 ONLINE = 1, 65 }; 66 } 67 #endif // OHOS_DISTRIBUTED_DATA_ADAPTER_COMMUNICATOR_COMMU_TYPES_H 68