mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-02-01 22:34:07 +01:00
97913c6f9a
Until now network.c managed the list of network_info structs including for known networks and networks that are seen in at least one device's scan results, with the is_known flag to distinguish known networks. Each time the list was processed though the code was either interested in one subset of networks or the other. Split the list into a Known Networks list and the list of other networks seen in scans. Move all code related to Known Networks to knownnetworks.c, this simplifies network.h. It also gets rid of network_info_get_known which actually returned the list of all network_infos (not just for known networks), which logically should have been private to network.c. Update device.c and scan.c to use functions specific to Known Networks instead of filtering the lists by the is_known flag. This will also allow knownnetworks.c to export DBus objects and/or properties for the Known Networks information because it now knows when Known Networks are added, removed or modified by IWD.
38 lines
1.3 KiB
C
38 lines
1.3 KiB
C
/*
|
|
*
|
|
* Wireless daemon for Linux
|
|
*
|
|
* Copyright (C) 2016 Intel Corporation. All rights reserved.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*
|
|
*/
|
|
|
|
enum security;
|
|
struct network_info;
|
|
|
|
typedef bool (*known_networks_foreach_func_t)(const struct network_info *info,
|
|
void *user_data);
|
|
|
|
bool known_networks_foreach(known_networks_foreach_func_t function,
|
|
void *user_data);
|
|
bool known_networks_has_hidden(void);
|
|
struct network_info *known_networks_find(const char *ssid,
|
|
enum security security);
|
|
void known_networks_connected(struct network_info *network);
|
|
|
|
bool known_networks_init(void);
|
|
void known_networks_exit(void);
|