@@ -63,146 +63,20 @@ void ESP8266HTTPUpdate::setAuthorization(const String &auth)
63
63
_auth = auth;
64
64
}
65
65
66
- #if HTTPUPDATE_1_2_COMPATIBLE
67
- HTTPUpdateResult ESP8266HTTPUpdate::update (const String& url, const String& currentVersion,
68
- const String& httpsFingerprint, bool reboot)
69
- {
70
- rebootOnUpdate (reboot );
71
- #pragma GCC diagnostic push
72
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
73
- return update (url, currentVersion, httpsFingerprint);
74
- #pragma GCC diagnostic pop
75
- }
76
-
77
- HTTPUpdateResult ESP8266HTTPUpdate::update (const String& url, const String& currentVersion)
78
- {
79
- HTTPClient http;
80
- #pragma GCC diagnostic push
81
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
82
- http.begin (url);
83
- #pragma GCC diagnostic pop
84
- return handleUpdate (http, currentVersion, false );
85
- }
86
-
87
- HTTPUpdateResult ESP8266HTTPUpdate::update (const String& url, const String& currentVersion,
88
- const String& httpsFingerprint)
89
- {
90
- HTTPClient http;
91
- #pragma GCC diagnostic push
92
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
93
- http.begin (url, httpsFingerprint);
94
- #pragma GCC diagnostic pop
95
- return handleUpdate (http, currentVersion, false );
96
- }
97
-
98
- HTTPUpdateResult ESP8266HTTPUpdate::update (const String& url, const String& currentVersion,
99
- const uint8_t httpsFingerprint[20 ])
100
- {
101
- HTTPClient http;
102
- #pragma GCC diagnostic push
103
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
104
- http.begin (url, httpsFingerprint);
105
- #pragma GCC diagnostic pop
106
- return handleUpdate (http, currentVersion, false );
107
- }
108
- #endif
109
-
110
66
HTTPUpdateResult ESP8266HTTPUpdate::update (WiFiClient& client, const String& url, const String& currentVersion)
111
67
{
112
68
HTTPClient http;
113
69
http.begin (client, url);
114
70
return handleUpdate (http, currentVersion, false );
115
71
}
116
72
117
- #if HTTPUPDATE_1_2_COMPATIBLE
118
- HTTPUpdateResult ESP8266HTTPUpdate::updateSpiffs (const String& url, const String& currentVersion, const String& httpsFingerprint)
119
- {
120
- HTTPClient http;
121
- #pragma GCC diagnostic push
122
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
123
- http.begin (url, httpsFingerprint);
124
- #pragma GCC diagnostic pop
125
- return handleUpdate (http, currentVersion, true );
126
- }
127
-
128
- HTTPUpdateResult ESP8266HTTPUpdate::updateSpiffs (const String& url, const String& currentVersion, const uint8_t httpsFingerprint[20 ])
129
- {
130
- HTTPClient http;
131
- #pragma GCC diagnostic push
132
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
133
- http.begin (url, httpsFingerprint);
134
- #pragma GCC diagnostic pop
135
- return handleUpdate (http, currentVersion, true );
136
- }
137
-
138
- HTTPUpdateResult ESP8266HTTPUpdate::updateSpiffs (const String& url, const String& currentVersion)
139
- {
140
- HTTPClient http;
141
- #pragma GCC diagnostic push
142
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
143
- http.begin (url);
144
- #pragma GCC diagnostic pop
145
- return handleUpdate (http, currentVersion, true );
146
- }
147
- #endif
148
-
149
73
HTTPUpdateResult ESP8266HTTPUpdate::updateFS (WiFiClient& client, const String& url, const String& currentVersion)
150
74
{
151
75
HTTPClient http;
152
76
http.begin (client, url);
153
77
return handleUpdate (http, currentVersion, true );
154
78
}
155
79
156
- #if HTTPUPDATE_1_2_COMPATIBLE
157
- HTTPUpdateResult ESP8266HTTPUpdate::update (const String& host, uint16_t port, const String& uri, const String& currentVersion,
158
- bool https, const String& httpsFingerprint, bool reboot)
159
- {
160
- (void )https;
161
- rebootOnUpdate (reboot );
162
- if (httpsFingerprint.length () == 0 ) {
163
- #pragma GCC diagnostic push
164
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
165
- return update (host, port, uri, currentVersion);
166
- } else {
167
- return update (host, port, uri, currentVersion, httpsFingerprint);
168
- #pragma GCC diagnostic pop
169
- }
170
- }
171
-
172
- HTTPUpdateResult ESP8266HTTPUpdate::update (const String& host, uint16_t port, const String& uri,
173
- const String& currentVersion)
174
- {
175
- HTTPClient http;
176
- #pragma GCC diagnostic push
177
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
178
- http.begin (host, port, uri);
179
- #pragma GCC diagnostic pop
180
- return handleUpdate (http, currentVersion, false );
181
- }
182
-
183
- HTTPUpdateResult ESP8266HTTPUpdate::update (const String& host, uint16_t port, const String& url,
184
- const String& currentVersion, const String& httpsFingerprint)
185
- {
186
- HTTPClient http;
187
- #pragma GCC diagnostic push
188
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
189
- http.begin (host, port, url, httpsFingerprint);
190
- #pragma GCC diagnostic pop
191
- return handleUpdate (http, currentVersion, false );
192
- }
193
-
194
- HTTPUpdateResult ESP8266HTTPUpdate::update (const String& host, uint16_t port, const String& url,
195
- const String& currentVersion, const uint8_t httpsFingerprint[20 ])
196
- {
197
- HTTPClient http;
198
- #pragma GCC diagnostic push
199
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
200
- http.begin (host, port, url, httpsFingerprint);
201
- #pragma GCC diagnostic pop
202
- return handleUpdate (http, currentVersion, false );
203
- }
204
- #endif
205
-
206
80
HTTPUpdateResult ESP8266HTTPUpdate::update (WiFiClient& client, const String& host, uint16_t port, const String& uri,
207
81
const String& currentVersion)
208
82
{
0 commit comments