libwebsockets
Lightweight C library for HTML5 websockets
lws-ota.h File Reference
+ 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)
 

Macro Definition Documentation

◆ LWSOTAFIN_OK

#define LWSOTAFIN_OK   0

Definition at line 112 of file lws-ota.h.

◆ LWSOTAFIN_BAD

#define LWSOTAFIN_BAD   1

Definition at line 113 of file lws-ota.h.

Typedef Documentation

◆ lws_ota_process_t

typedef void* lws_ota_process_t

Definition at line 41 of file lws-ota.h.

◆ lws_ota_cb_t

typedef void(* lws_ota_cb_t) (void *ctx, lws_ota_ret_t r)

Definition at line 64 of file lws-ota.h.

Enumeration Type Documentation

◆ lws_ota_ret_t

Enumerator
LWSOTARET_OK 
LWSOTARET_ONGOING 
LWSOTARET_REJECTED 
LWSOTARET_NOSLOT 
LWSOTARET_UPDATE_AVAILABLE 
LWSOTARET_PROGRESS 
LWSOTARET_FAILED 
LWSOTARET_COMPLETED 

Definition at line 43 of file lws-ota.h.

43 {
45 LWSOTARET_ONGOING, /* result not ready to read yet */
48
lws_ota_ret_t
Definition: lws-ota.h:43
@ LWSOTARET_UPDATE_AVAILABLE
Definition: lws-ota.h:49
@ LWSOTARET_REJECTED
Definition: lws-ota.h:46
@ LWSOTARET_OK
Definition: lws-ota.h:44
@ LWSOTARET_PROGRESS
Definition: lws-ota.h:50
@ LWSOTARET_NOSLOT
Definition: lws-ota.h:47
@ LWSOTARET_FAILED
Definition: lws-ota.h:51
@ LWSOTARET_ONGOING
Definition: lws-ota.h:45
@ LWSOTARET_COMPLETED
Definition: lws-ota.h:52

◆ lws_ota_async_t

Enumerator
LWS_OTA_ASYNC_START 
LWS_OTA_ASYNC_WRITE 
LWS_OTA_ASYNC_ABORT 
LWS_OTA_ASYNC_FINALIZE 

Definition at line 55 of file lws-ota.h.

55 {
lws_ota_async_t
Definition: lws-ota.h:55
@ LWS_OTA_ASYNC_START
Definition: lws-ota.h:56
@ LWS_OTA_ASYNC_WRITE
Definition: lws-ota.h:57
@ LWS_OTA_ASYNC_ABORT
Definition: lws-ota.h:58
@ LWS_OTA_ASYNC_FINALIZE
Definition: lws-ota.h:59

Function Documentation

◆ lws_ota_variant_name()

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.

◆ lws_plat_ota_start()

LWS_VISIBLE LWS_EXTERN int lws_plat_ota_start ( struct lws_ota *  g)

◆ lws_plat_ota_queue()

LWS_VISIBLE LWS_EXTERN void lws_plat_ota_queue ( struct lws_ota *  g,
lws_ota_async_t  a 
)

◆ lws_plat_ota_report_current()

LWS_VISIBLE LWS_EXTERN int lws_plat_ota_report_current ( struct lws_ota *  g,
int  bad 
)

◆ lws_plat_ota_get_last_fw_unixtime()

LWS_VISIBLE LWS_EXTERN int lws_plat_ota_get_last_fw_unixtime ( uint64_t *  fw_unixtime)