File espos_ota_manifest.h¶
FileList > espos_ota > include > espos_ota_manifest.h
Go to the source code of this file
#include <stdbool.h>#include <stddef.h>#include "esp_err.h"
Classes¶
| Type | Name |
|---|---|
| struct | espos_ota_build_t |
Public Functions¶
| Type | Name |
|---|---|
| esp_err_t | espos_ota_manifest_pick (const char * json, size_t len, const char * manifest_url, const char * app, const char * target, const char * channel, const char * running_version, espos_ota_build_t * out) Pick the best build for (app, target, channel) from manifest JSON: highest version among matching entries; missing "channel" means "stable", missing "app" matches any. |
| bool | espos_ota_resolve_url (const char * base, const char * rel, char * out, size_t out_size) Resolve rel against base (RFC 3986-lite: absolute, "/path", "path"). |
| int | espos_ota_version_cmp (const char * a, const char * b) Compare two version strings: numeric dot-separated core (1.2.10 > 1.2.9), a "-prerelease" suffix sorts before the same core without one, then plain strcmp on the remainder. |
Macros¶
| Type | Name |
|---|---|
| define | ESPOS_OTA_NOTES_MAX 128 |
| define | ESPOS_OTA_SIZE_MAX (256u \* 1024u \* 1024u) |
| define | ESPOS_OTA_URL_MAX 256 |
| define | ESPOS_OTA_VERSION_MAX 32 |
Public Functions Documentation¶
function espos_ota_manifest_pick¶
Pick the best build for (app, target, channel) from manifest JSON: highest version among matching entries; missing "channel" means "stable", missing "app" matches any.
esp_err_t espos_ota_manifest_pick (
const char * json,
size_t len,
const char * manifest_url,
const char * app,
const char * target,
const char * channel,
const char * running_version,
espos_ota_build_t * out
)
Relative "url" is resolved against manifest_url. Returns ESP_OK with *out filled, ESP_ERR_NOT_FOUND when no entry matches, ESP_ERR_INVALID_ARG on malformed JSON / schema.
function espos_ota_resolve_url¶
Resolve rel against base (RFC 3986-lite: absolute, "/path", "path").
function espos_ota_version_cmp¶
Compare two version strings: numeric dot-separated core (1.2.10 > 1.2.9), a "-prerelease" suffix sorts before the same core without one, then plain strcmp on the remainder.
Unparsable strings compare as strings. Returns <0, 0, >0.
Macro Definition Documentation¶
define ESPOS_OTA_NOTES_MAX¶
define ESPOS_OTA_SIZE_MAX¶
define ESPOS_OTA_URL_MAX¶
define ESPOS_OTA_VERSION_MAX¶
The documentation for this class was generated from the following file espos_ota/include/espos_ota_manifest.h