Unverified Commit ad1de0b3 authored by Me No Dev's avatar Me No Dev Committed by GitHub

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
parent 1f2ba1f8
......@@ -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
......
#pragma once
#include "NetworkClientSecure.h"
#define WiFiClientSecure NetworkClientSecure
typedef NetworkClientSecure WiFiClientSecure;
#include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h>
#include <uri/UriRegex.h>
#include <SD.h>
......
#pragma once
#include "NetworkClient.h"
#define WiFiClient NetworkClient
typedef NetworkClient WiFiClient;
#pragma once
#include "NetworkServer.h"
#define WiFiServer NetworkServer
typedef NetworkServer WiFiServer;
#pragma once
#include "NetworkUdp.h"
#define WiFiUDP NetworkUDP
typedef NetworkUDP WiFiUDP;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment