2015-04-26 18:14:08 +02:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Wireless daemon for Linux
|
|
|
|
*
|
2019-10-25 00:43:08 +02:00
|
|
|
* Copyright (C) 2013-2019 Intel Corporation. All rights reserved.
|
2015-04-26 18:14:08 +02:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-11-01 22:37:11 +01:00
|
|
|
#include <time.h>
|
|
|
|
|
2015-04-26 18:14:08 +02:00
|
|
|
struct l_settings;
|
2016-06-09 19:55:24 +02:00
|
|
|
enum security;
|
2015-04-26 18:14:08 +02:00
|
|
|
|
|
|
|
ssize_t read_file(void *buffer, size_t len, const char *path_fmt, ...)
|
|
|
|
__attribute__((format(printf, 3, 4)));
|
|
|
|
|
2020-01-22 18:15:19 +01:00
|
|
|
ssize_t write_file(const void *buffer, size_t len, bool preserve_times,
|
|
|
|
const char *path_fmt, ...)
|
|
|
|
__attribute__((format(printf, 4, 5)));
|
2015-04-26 18:14:08 +02:00
|
|
|
|
2019-09-08 18:24:23 +02:00
|
|
|
bool storage_create_dirs(void);
|
2019-09-08 19:18:48 +02:00
|
|
|
void storage_cleanup_dirs(void);
|
|
|
|
char *storage_get_path(const char *format, ...);
|
|
|
|
char *storage_get_hotspot_path(const char *format, ...);
|
2019-09-08 18:24:23 +02:00
|
|
|
|
2016-06-10 16:59:59 +02:00
|
|
|
const char *storage_network_ssid_from_path(const char *path,
|
|
|
|
enum security *type);
|
2018-08-09 16:33:43 +02:00
|
|
|
char *storage_get_network_file_path(enum security type, const char *ssid);
|
2016-06-09 19:55:24 +02:00
|
|
|
|
2018-08-01 03:56:41 +02:00
|
|
|
struct l_settings *storage_network_open(enum security type, const char *ssid);
|
|
|
|
int storage_network_touch(enum security type, const char *ssid);
|
|
|
|
void storage_network_sync(enum security type, const char *ssid,
|
2015-04-26 18:14:08 +02:00
|
|
|
struct l_settings *settings);
|
2018-08-01 03:56:41 +02:00
|
|
|
int storage_network_remove(enum security type, const char *ssid);
|
2019-03-15 19:32:01 +01:00
|
|
|
|
|
|
|
struct l_settings *storage_known_frequencies_load(void);
|
|
|
|
void storage_known_frequencies_sync(struct l_settings *known_freqs);
|