MCPcopy Create free account
hub / github.com/bmorcelli/Launcher / parseContentRangeTotal

Function parseContentRangeTotal

src/onlineLauncher.cpp:241–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239bool discardHttpCb(const uint8_t *, size_t, void *) { return true; }
240
241bool parseContentRangeTotal(const char *contentRange, size_t &total) {
242 if (!contentRange) return false;
243 String range = contentRange;
244 int slash = range.lastIndexOf('/');
245 if (slash < 0 || slash + 1 >= range.length()) return false;
246 total = range.substring(slash + 1).toInt();
247 return total > 0;
248}
249
250bool getRemoteFileSize(const String &url, size_t &size, const char *hwid = nullptr) {
251 LauncherHttpResponse response;

Callers 2

getRemoteFileSizeFunction · 0.85
installExtFirmwareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected