From v4.4 to v4.5
Template Streams
The TemplateStream
class has been updated to improve tag recognition (Pull Request #2400).
This means regular {varname}
tags are sufficient for most purposes, including JSON templates.
The IFS::JsonDirectoryTemplate
previously used double-brace tags such as {{varname}}
.
It now uses regular tags by default, so if you use this class either:
Add a call to
TemplateStream::setDoubleBraces()
in your code, orUpdate your templates to use single braces
Eclipse Project Files
Starting with version 4.5.x we don’t provide Eclipse meta files in our samples.
These can be generated using the ide-eclipse
makefile target.
For more information read the updated Using with Eclipse CDT.
Esp8266 toolchain
Sming now requires the ESP Quick Toolchain for building.
Support for the old legacy toolchains (ESP open SDK, UDK) have been dropped. They may still work but are no longer tested.
user_config.h
This header file is part of the original ESP8266 SDK code and is now deprecated. Libraries should use only the necessary headers. Applications do not require it.
Breaking Changes
Undeprecated HttpRequest::getQueryParameter()
and removed a lot of old deprecated code.
Removed
WebsocketClient::disconnect()
. UseWebsocketClient::close()
instead.Removed
TimerDelegateStdFunction
. UseTimerDelegate
instead.Removed class
URL
. Use classUrl
instead.Removed
TemplateVariables
. UseTemplateStream::Variables
instead.Removed
StreamTransformer::transformCallback
. Create inherited class and overrideStreamTransformer::transform()
method instead.Removed
StreamTransformer::StreamTransformer(IDataSourceStream* stream, const StreamTransformerCallback& callback, size_t resultSize, size_t blockSize)
. Instead, create inherited class, overrideStreamTransformer::transform()
method and use alternative constructor.Removed
SslValidatorCallback
. UseSsl::ValidatorCallback
instead.Removed
SslSessionId
andSSLSessionId
. UseSsl::SessionId
instead.Removed
SslKeyCertPair
andSSLKeyCertPair
. UseSsl::KeyCertPair
instead.Removed
SslCertificate
. UseSsl::Certificate
instead.Removed
SeekOriginFlags
. UseSeekOrigin
instead.Removed
eSO_FileStart
. UseSeekOrigin::Start
instead.Removed
eSO_CurrentPos
. UseSeekOrigin::Current
instead.Removed
eSO_FileEnd
. UseSeekOrigin::End
instead.Removed
OtaUpgrade::BasicStream::errorToString()
. UsetoString()
instead.Removed deprecated stuff in Mqtt, including
MQTT_MAX_BUFFER_SIZE
andMQTT_MSG_PUBREC
.Removed
MqttClient::publishWithQoS(const String& topic, const String& message, int QoS, bool retained, MqttMessageDeliveredCallback onDelivery)
. Usebool MqttClient::publish(const String& topic, const String& message, uint8_t flags)
instead. If you want to have a callback that should be triggered on successful delivery of messages, useMqttClient::setEventHandler()
.Removed
MqttClient::setCallback(MqttStringSubscriptionCallback subscriptionCallback)
. UseMqttClient::setEventHandler()
instead.Removed
MqttClient::setWill (const String& topic, const String& message, int QoS, bool retained)
. UseMqttClient::setWill()
instead.Removed
MqttMessageDeliveredCallback
andMqttStringSubscriptionCallback
. UseMqttDelegate
instead.Removed
IDataSourceStream::length()
. UseIDataSourceStream::available()
instead.Removed
HttpServer::setDefaultResource(HttpResource* resource)
. Usepaths.setDefault()
instead.Removed
HttpServer::addPath(String path, const HttpPathDelegate& callback)
,HttpServer::addPath (const String& path, const HttpResourceDelegate& onRequestComplete)
andHttpServer::addPath (const String& path, HttpResource* resource)
. Use paths.set() instead.Removed
HttpResponse::toString(const HttpResponse& res)
. Use :HttpResponse::toString()
method ortoString()
global function instead.Removed
HttpResponse::sendTemplate(IDataSourceStream* newTemplateInstance)
. UseHttpResponse::sendNamedStream()
instead.Renamed
commandFunctionDelegate
toCommandFunctionDelegate
.Removed
DateTime::convertFromUnixTime(time_t timep, int8_t* psec, int8_t* pmin, int8_t* phour, int8_t* pday, int8_t* pwday, int8_t* pmonth, int16_t* pyear)
. UseDateTime::fromUnixTime()
instead.Removed
DateTime::convertToUnixTime (uint8_t sec, uint8_t min, uint8_t hour, uint8_t day, uint8_t month, uint16_t year)
. UseDateTime::toUnixTime()
instead.Removed
DateTime::fromUnixTime(time_t timep, int8_t* psec, int8_t* pmin, int8_t* phour, int8_t* pday, int8_t* pwday, int8_t* pmonth, int16_t* pyear)
. Use unsigned version insteadvoid DateTime::fromUnixTime(time_t, uint8_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*, uint16_t*)
.Removed
DateTime::parseHttpDate(const String& httpDate)
. UseDateTime::fromHttpDate()
instead.Renamed
DNSServer
class toDnsServer
.Removed
eFO_Append
. UseFile::Append
instead.Removed
eFO_CreateIfNotExist
. UseFile::Create
instead.Removed
eFO_CreateNewAlways
. UseFile::CreateNewAlways
instead.Removed
eFO_ReadOnly
. UseFile::ReadOnly
instead.Removed
eFO_ReadWrite
. UseFile::ReadWrite
instead.Removed
eFO_Truncate
. UseFile::Truncate
instead.Removed
eFO_WriteOnly
. UseFile::WriteOnly
instead.Removed
eSO_FileStart
. UseSeekOrigin::Start
instead.Removed
eSO_CurrentPos
. UseSeekOrigin::Current
instead.Removed
eSO_FileEnd
. UseSeekOrigin::End
instead.Removed
fileList()
function. UseDirectory
object, orfileOpenDir()
/fileReadDir()
/fileCloseDir()
functions.Removed
FileStream::attach(const String& fileName, FileOpenFlags openFlags=File::ReadOnly)
. UseFileStream::open()
instead.Removed
FTPServer
. UseFtpServer
instead.Removed
FtpServer::checkUser(const String& login, const String& pass)
. UseFtpServer::validateUser()
insteadRenamed
Hardware_Timer
toHardwareTimer
.Renamed
HardwareSerial::setCallback(StreamDataReceivedDelegate dataReceivedDelegate)
toHardwareSerial::onDataReceived()
.Removed
HttpClient::request(const String& url)
. UseHttpClient::createRequest()
instead.Removed
HttpConnection::getLastModifiedDate()
. UsegetResponse()->headers.getLastModifiedDate()
instead.Removed
HttpConnection::getResponseCode()
. UsegetResponse()->code
instead.Removed
HttpConnection::getResponseHeader(const String& headerName, const String& defaultValue)
. UsegetResponse()->headers[]
instead.Removed
HttpConnection::getResponseHeaders()
. UsegetResponse()->headers
instead.Removed
HttpConnection::getResponseString (). Use ``getResponse()->getBody()
instead.Removed
HttpConnection::getServerDate (). Use ``getResponse()->headers.getServerDate()
instead.Removed
httpGetErrorName (HttpError err)
. UsetoString()
instead.Renamed
HttpPartProducerDelegate
type toMultipartStream::Producer
.Renamed
HttpPartResult
type toMultipartStream::BodyPart
.Removed
HttpRequest::getPath()
. Userequest.uri.Path
instead.Removed
HttpRequest::operator=(const HttpRequest& rhs)
. UseHttpRequest::clone()
instead.Removed
HttpRequest::setPostParameters(const HttpParams& params)
. Userequest.postParams = params
instead.Removed
HttpResponse::hasHeader(const String& name)
. Useheaders.contains()
instead.Removed
HttpResponse::forbidden()
. Useresponse.code = HTTP_STATUS_FORBIDDEN
instead.Removed
HttpResponse::notFound()
. Useresponse.code = HTTP_STATUS_NOT_FOUND
instead.Removed
HttpResponse::redirect(const String& location)
. Useheaders[HTTP_HEADER_LOCATION]
instead.