1 /* 2 * Copyright (c) 2020 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 /** 17 * @addtogroup wifiservice 18 * @{ 19 * 20 * @brief Provides functions for the Wi-Fi station and hotspot modes. 21 * 22 * You can use this module to enable and disable the Wi-Fi station or hotspot mode, connect to and disconnect from a 23 * station or hotspot, query the station or hotspot status, and listen for events. \n 24 * 25 * @since 7 26 */ 27 28 /** 29 * @file station_info.h 30 * 31 * @brief Defines the structure and macro of the station information contained in the event information. 32 * 33 * The station information is passed to {@link OnHotspotStaJoin} or {@link OnHotspotStaLeave} invoked when a specified 34 * event occurs. 35 * 36 * @since 7 37 */ 38 39 #ifndef HARMONY_OS_LITE_WIFI_STATION_INFO_H 40 #define HARMONY_OS_LITE_WIFI_STATION_INFO_H 41 #include "wifi_device_config.h" 42 43 /** 44 * @brief Represents the station information. 45 * 46 * The station information is returned when {@link OnHotspotStaJoin} or {@link OnHotspotStaLeave} is called. \n 47 * 48 * @since 7 49 */ 50 typedef struct { 51 /** Network name of the station */ 52 char *name; 53 /** MAC address. For its length, see {@link WIFI_MAC_LEN}. */ 54 unsigned char macAddress[WIFI_MAC_LEN]; 55 /** IP address of the station */ 56 unsigned int ipAddress; 57 unsigned short disconnectedReason; 58 } StationInfo; 59 60 #endif // HARMONY_OS_LITE_WIFI_STATION_INFO_H 61 /** @} */ 62