| 
    libwebsockets
    
   Lightweight C library for HTML5 websockets 
   | 
 
 This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | lws_ota_ops_t | 
Macros | |
| #define | LWSOTAFIN_OK 0 | 
| #define | LWSOTAFIN_BAD 1 | 
Typedefs | |
| typedef void * | lws_ota_process_t | 
| typedef void(* | lws_ota_cb_t) (void *ctx, lws_ota_ret_t r) | 
Enumerations | |
| enum | lws_ota_ret_t {  LWSOTARET_OK , LWSOTARET_ONGOING , LWSOTARET_REJECTED , LWSOTARET_NOSLOT , LWSOTARET_UPDATE_AVAILABLE , LWSOTARET_PROGRESS , LWSOTARET_FAILED , LWSOTARET_COMPLETED }  | 
| enum | lws_ota_async_t { LWS_OTA_ASYNC_START = 1 , LWS_OTA_ASYNC_WRITE , LWS_OTA_ASYNC_ABORT , LWS_OTA_ASYNC_FINALIZE } | 
Functions | |
| LWS_VISIBLE LWS_EXTERN const char * | lws_ota_variant_name (void) | 
| LWS_VISIBLE LWS_EXTERN int | lws_plat_ota_start (struct lws_ota *g) | 
| LWS_VISIBLE LWS_EXTERN void | lws_plat_ota_queue (struct lws_ota *g, lws_ota_async_t a) | 
| LWS_VISIBLE LWS_EXTERN int | lws_plat_ota_report_current (struct lws_ota *g, int bad) | 
| LWS_VISIBLE LWS_EXTERN int | lws_plat_ota_get_last_fw_unixtime (uint64_t *fw_unixtime) | 
| struct lws_ota_ops_t | 
 Collaboration diagram for lws_ota_ops_t:| Data Fields | ||
|---|---|---|
| int(*)(struct lws_ota *g) | ota_start | 
 Creates the ota task and queues LWS_OTA_ASYNC_START on it.  | 
| void(*)(struct lws_ota *g, lws_ota_async_t a) | ota_queue | 
 Queue next command to OTA task (args are in g)  | 
| int(*)(struct lws_ota *g, int bad) | ota_report_current | 
 Report information to the platform code about how we feel about the current boot... if we can check the OTA then we report it seems in good shape (bad = 0), if we can identify it's brain-damaged then (bad = 1). What action the platform takes about these reports is up to the platform code  | 
| int(*)(lws_ota_ret_t state, int percent) | ota_progress | 
 Gets called so the platform can represent OTA progress, give platform a chance to choose what to do about an available update  | 
| int(*)(uint64_t *fw_unixtime) | ota_get_last_fw_unixtime | 
 tries to recover the newest firmware unixtime that had been OTA'd into fw_unixtime, updates from same or earlier unixtime are ignored for update purposes.  | 
| int | ota_periodic_check_secs | 
 Check after this many seconds for a new update  | 
| typedef void* lws_ota_process_t | 
| typedef void(* lws_ota_cb_t) (void *ctx, lws_ota_ret_t r) | 
| enum lws_ota_ret_t | 
| Enumerator | |
|---|---|
| LWSOTARET_OK | |
| LWSOTARET_ONGOING | |
| LWSOTARET_REJECTED | |
| LWSOTARET_NOSLOT | |
| LWSOTARET_UPDATE_AVAILABLE | |
| LWSOTARET_PROGRESS | |
| LWSOTARET_FAILED | |
| LWSOTARET_COMPLETED | |
| enum lws_ota_async_t | 
| Enumerator | |
|---|---|
| LWS_OTA_ASYNC_START | |
| LWS_OTA_ASYNC_WRITE | |
| LWS_OTA_ASYNC_ABORT | |
| LWS_OTA_ASYNC_FINALIZE | |
| LWS_VISIBLE LWS_EXTERN const char * lws_ota_variant_name | ( | void | ) | 
lws_ota_variant_name() - returns the build variant name
Returns a string that uniquely identifies the kind of firmware build this device is running.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_plat_ota_start | ( | struct lws_ota * | g | ) | 
| LWS_VISIBLE LWS_EXTERN void lws_plat_ota_queue | ( | struct lws_ota * | g, | 
| lws_ota_async_t | a ) | 
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_plat_ota_report_current | ( | struct lws_ota * | g, | 
| int | bad ) | 
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_plat_ota_get_last_fw_unixtime | ( | uint64_t * | fw_unixtime | ) |