RetroArch/wifi/wifi_driver.h

94 lines
2.5 KiB
C
Raw Normal View History

2016-09-21 16:06:14 +02:00
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
2017-01-22 13:40:32 +01:00
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2014-2017 - Jean-André Santoni
*
2016-09-21 16:06:14 +02:00
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WIFI_DRIVER__H
#define __WIFI_DRIVER__H
#include <stdint.h>
#include <boolean.h>
#include <retro_common_api.h>
2016-09-21 19:46:02 +02:00
#include <lists/string_list.h>
2016-09-21 16:06:14 +02:00
RETRO_BEGIN_DECLS
enum rarch_wifi_ctl_state
{
RARCH_WIFI_CTL_NONE = 0,
RARCH_WIFI_CTL_DESTROY,
RARCH_WIFI_CTL_DEINIT,
RARCH_WIFI_CTL_SET_ACTIVE,
RARCH_WIFI_CTL_UNSET_ACTIVE,
RARCH_WIFI_CTL_IS_ACTIVE,
RARCH_WIFI_CTL_FIND_DRIVER,
RARCH_WIFI_CTL_SET_CB,
RARCH_WIFI_CTL_STOP,
RARCH_WIFI_CTL_START,
RARCH_WIFI_CTL_INIT
};
typedef struct wifi_driver
{
2016-09-23 01:38:19 +02:00
void *(*init)(void);
2016-09-21 16:06:14 +02:00
void (*free)(void *data);
bool (*start)(void *data);
void (*stop)(void *data);
void (*scan)(void *data);
void (*get_ssids)(void *data, struct string_list *list);
bool (*ssid_is_online)(void *data, unsigned i);
bool (*connect_ssid)(void *data, unsigned i, const char* passphrase);
void (*tether_start_stop)(void *data, bool start, char* configfile);
2016-09-21 19:46:02 +02:00
2016-09-21 16:06:14 +02:00
const char *ident;
} wifi_driver_t;
extern wifi_driver_t wifi_connmanctl;
/**
* config_get_wifi_driver_options:
*
* Get an enumerated list of all wifi driver names,
* separated by '|'.
*
* Returns: string listing of all wifi driver names,
* separated by '|'.
**/
const char* config_get_wifi_driver_options(void);
void driver_wifi_stop(void);
bool driver_wifi_start(void);
2018-06-21 07:52:01 +02:00
void driver_wifi_scan(void);
void driver_wifi_get_ssids(struct string_list *list);
bool driver_wifi_ssid_is_online(unsigned i);
2016-09-21 21:58:15 +02:00
2016-09-23 13:16:27 +02:00
bool driver_wifi_connect_ssid(unsigned i, const char* passphrase);
2016-09-22 16:44:51 +02:00
void driver_wifi_tether_start_stop(bool start, char* configfile);
bool wifi_driver_ctl(enum rarch_wifi_ctl_state state, void *data);
2016-09-21 16:06:14 +02:00
RETRO_END_DECLS
#endif