1 /* 2 * Copyright (C) 2022-2023 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 MISCSERVICES_PASTEBOARD_DFX_TYPES_H 17 #define MISCSERVICES_PASTEBOARD_DFX_TYPES_H 18 19 #include <map> 20 #include <memory> 21 #include <string> 22 23 namespace OHOS { 24 namespace MiscServices { 25 enum TimeConsumingStatistic : std::int32_t { 26 TCS_TIME_CONSUMING_LEVEL_ONE = 0, 27 TCS_TIME_CONSUMING_LEVEL_TWO, 28 TCS_TIME_CONSUMING_LEVEL_THREE, 29 TCS_TIME_CONSUMING_LEVEL_FOUR, 30 TCS_TIME_CONSUMING_LEVEL_FIVE, 31 TCS_TIME_CONSUMING_LEVEL_SIX, 32 TCS_TIME_CONSUMING_LEVEL_SEVEN, 33 TCS_TIME_CONSUMING_LEVEL_EIGHT, 34 TCS_TIME_CONSUMING_LEVEL_NINE, 35 TCS_TIME_CONSUMING_LEVEL_TEN, 36 TCS_TIME_CONSUMING_LEVEL_ELEVEN, 37 }; 38 39 enum BehaviourPasteboardState : std::int32_t { 40 BPS_COPY_STATE = 0, 41 BPS_PASTE_STATE, 42 BPS_REMOTE_PASTE_STATE, 43 BPS_INVALID_STATE, 44 }; 45 46 enum StatisticPasteboardState : std::int32_t { 47 SPS_COPY_STATE = 0, 48 SPS_PASTE_STATE, 49 SPS_REMOTE_PASTE_STATE, 50 SPS_INVALID_STATE, 51 }; 52 53 enum DataRange : std::int32_t { 54 DR_ZERO_TO_HUNDRED_KB = 0, 55 DR_HUNDRED_TO_FIVE_HUNDREDS_KB, 56 DR_FIVE_HUNDREDS_TO_THOUSAND_KB, 57 DR_ONE_TO_FIVE_MB, 58 DR_FIVE_TO_TEN_MB, 59 DR_TEN_TO_FIFTY_MB, 60 DR_OVER_FIFTY_MB, 61 }; 62 63 struct PasteboardFaultMsg { 64 int32_t userId; 65 std::string errorCode; 66 }; 67 68 struct PasteboardBehaviourMsg { 69 int pasteboardState; 70 std::string bundleName; 71 }; 72 73 struct TimeConsumingStat { 74 int pasteboardState; 75 int dataSize; 76 int timeConsuming; 77 }; 78 79 enum class ReportStatus { 80 SUCCESS = 0, 81 ERROR = 1, 82 }; 83 } // namespace MiscServices 84 } // namespace OHOS 85 #endif // MISCSERVICES_PASTEBOARD_DFX_TYPES_H 86