feat(net): Switch to typedefs for WiFiClient, WiFiServer, WiFiUdp and WiFiClientSecure (#9909)

* feat(net): Deprecate old WiFi APIs

Deprecates WiFiClient, WiFiServer, WiFiUdp and WiFiClientSecure

* fix(net): add defines to WiFi.h

Defines are added to not cause deprecation warnings. Will be removed in the future

* fix(net): Use typedefs instead to help with forward declarations

Defines do not allow forward declarations
This commit is contained in:
Me No Dev 2024-06-24 10:26:22 +03:00 committed by GitHub
parent 1f2ba1f87f
commit ad1de0b37c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 6 additions and 7 deletions

View File

@ -355,7 +355,7 @@ config ARDUINO_SELECTIVE_ESPmDNS
config ARDUINO_SELECTIVE_HTTPClient
bool "Enable HTTPClient"
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Network
select ARDUINO_SELECTIVE_WiFiClientSecure
select ARDUINO_SELECTIVE_NetworkClientSecure
default y
config ARDUINO_SELECTIVE_NetBIOS
@ -375,7 +375,7 @@ config ARDUINO_SELECTIVE_WiFi
default y
config ARDUINO_SELECTIVE_NetworkClientSecure
bool "Enable WiFiClientSecure"
bool "Enable NetworkClientSecure"
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Network
default y

View File

@ -1,3 +1,3 @@
#pragma once
#include "NetworkClientSecure.h"
#define WiFiClientSecure NetworkClientSecure
typedef NetworkClientSecure WiFiClientSecure;

View File

@ -1,5 +1,4 @@
#include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h>
#include <uri/UriRegex.h>
#include <SD.h>

View File

@ -1,3 +1,3 @@
#pragma once
#include "NetworkClient.h"
#define WiFiClient NetworkClient
typedef NetworkClient WiFiClient;

View File

@ -1,3 +1,3 @@
#pragma once
#include "NetworkServer.h"
#define WiFiServer NetworkServer
typedef NetworkServer WiFiServer;

View File

@ -1,3 +1,3 @@
#pragma once
#include "NetworkUdp.h"
#define WiFiUDP NetworkUDP
typedef NetworkUDP WiFiUDP;