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 BOOMERANG_DATA_H 17 #define BOOMERANG_DATA_H 18 19 #include <string> 20 #include "pixel_map.h" 21 22 namespace OHOS { 23 namespace Msdp { 24 namespace DeviceStatus { 25 constexpr int32_t SCREENSHOT_STATUS { 1 }; 26 enum BoomerangType { 27 BOOMERANG_TYPE_INVALID = -1, 28 BOOMERANG_TYPE_BOOMERANG, 29 BOOMERANG_TYPE_MAX 30 }; 31 32 enum BoomerangStatus { 33 BOOMERANG_STATUS_INVALID = -1, 34 BOOMERANG_STATUS_NOT_SCREEN_SHOT, 35 BOOMERANG_STATUS_SCREEN_SHOT, 36 }; 37 38 struct BoomerangData { 39 BoomerangType type { BOOMERANG_TYPE_INVALID }; 40 BoomerangStatus status { BOOMERANG_STATUS_INVALID }; 41 42 bool operator !=(const BoomerangData &r) const 43 { 44 if (type == r.type && status - r.status) { 45 return false; 46 } 47 return true; 48 } 49 }; 50 } // namespace DeviceStatus 51 } // namespace Msdp 52 } // namespace OHOS 53 #endif // BOOMERANG_DATA_H