2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
4 * Licensed under the Flora License, Version 1.1 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 #include <net_connection.h>
23 * @brief Called whenever WiFi connection has changed.
24 * @param[in] ap_mac The MAC address of access point.
25 * @param[in] ap_ssid The SSID of the access point.
26 * @param[in] ip_addr Device IP address.
27 * @param[in] user_data The user defined data.
29 typedef void (*wifi_connection_changed_cb)(const char *ap_mac, const char *ap_ssid, char *ip_addr, void *user_data);
32 * @brief Initializes network utils.
37 * @brief Finalizes network utils.
42 * @brief Sets WiFi connection changed callback.
43 * @param[in] callback Callback to be set.
44 * @param[in] user_data User defined data.
46 int net_util_set_wifi_connection_changed_cb(wifi_connection_changed_cb callback, void *user_data);
49 * @brief Gets access point MAC address.
50 * @param[out] mac The MAC address.
52 int net_util_get_ap_mac(char **mac);
55 * @brief Gets access point SSID.
56 * @param[out] The SSID.
58 int net_util_get_ap_ssid(char **ssid);
61 * @brief Gets device IP address.
62 * @param[out] The IP address
64 int net_util_get_ip_addr(char **ip);