1 /* 2 * Copyright (C) 2021 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_WIFI_SCAN_CONTROL_MSG_H 17 #define OHOS_WIFI_SCAN_CONTROL_MSG_H 18 19 #include "wifi_hid2d_msg.h" 20 #include "wifi_scan_msg.h" 21 #include "wifi_p2p_msg.h" 22 #include "define.h" 23 24 namespace OHOS { 25 namespace Wifi { 26 struct Hid2dInfo { 27 Hid2dUpperScene softBusScene; 28 Hid2dUpperScene castScene; 29 Hid2dUpperScene shareScene; 30 Hid2dUpperScene mouseCrossScene; 31 Hid2dUpperScene miraCastScene; 32 P2pConnectedState p2pConnectState; 33 int p2pEnhanceState; 34 Hid2dInfoHid2dInfo35 Hid2dInfo() 36 { 37 p2pConnectState = P2pConnectedState::P2P_DISCONNECTED; 38 p2pEnhanceState = 0; 39 } 40 }; 41 42 struct WifiScanDeviceInfo { 43 int appId; 44 int idelState; 45 int thermalLevel; 46 int screenState; 47 int staScene; 48 int staSceneForbidCount; 49 int freezeState; 50 int noChargerState; 51 int gnssFixState; 52 std::string packageName; 53 time_t staCurrentTime; 54 bool isAbsFreezeScaned; 55 bool externScan; 56 bool isSystemApp; 57 ScanMode scanMode; 58 Hid2dInfo hid2dInfo; 59 ScanControlInfo scanControlInfo; 60 std::vector<std::string> scan_thermal_trust_list; 61 std::vector<std::string> scan_frequency_trust_list; 62 std::vector<std::string> scan_screen_off_trust_list; 63 std::vector<std::string> scan_gps_block_list; 64 std::vector<std::string> scan_hid2d_list; 65 std::vector<std::string> abnormalAppList; 66 WifiScanDeviceInfoWifiScanDeviceInfo67 WifiScanDeviceInfo() 68 { 69 appId = 0; 70 idelState = MODE_STATE_CLOSE; 71 thermalLevel = 1; 72 screenState = MODE_STATE_DEFAULT; 73 staScene = SCAN_SCENE_MAX; 74 freezeState = MODE_STATE_CLOSE; 75 noChargerState = MODE_STATE_CLOSE; 76 scanMode = ScanMode::SCAN_MODE_MAX; 77 isAbsFreezeScaned = false; 78 staSceneForbidCount = 0; 79 externScan = false; 80 isSystemApp = false; 81 staCurrentTime = 0; 82 gnssFixState = 0; 83 packageName = ""; 84 } 85 }; 86 } // namespace Wifi 87 } // namespace OHOS 88 #endif