Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
sol_update Struct Reference

Structure containing function that need to be implemented by Soletta update modules. More...

#include <sol-update-modules.h>

Data Fields

uint16_t api_version
 API version. More...
 
bool(* cancel )(struct sol_update_handle *handle)
 Cancel ongoing update tasks. More...
 
struct sol_update_handle *(* check )(void(*cb)(void *data, int status, const struct sol_update_info *response), const void *data)
 Checks for updates. More...
 
struct sol_update_handle *(* fetch )(void(*cb)(void *data, int status), const void *data, bool resume)
 Fetch updates. More...
 
int(* get_progress )(struct sol_update_handle *handle)
 Get update task progress. More...
 
int(* init )(void)
 Function called when module is loaded. More...
 
struct sol_update_handle *(* install )(void(*cb)(void *data, int status), const void *data)
 Install updates. More...
 
void(* shutdown )(void)
 Function called when module is unloaded. More...
 

Detailed Description

Structure containing function that need to be implemented by Soletta update modules.

Field Documentation

uint16_t sol_update::api_version

API version.

bool(* sol_update::cancel)(struct sol_update_handle *handle)

Cancel ongoing update tasks.

See Also
sol_update_cancel
struct sol_update_handle*(* sol_update::check)(void(*cb)(void *data, int status, const struct sol_update_info *response), const void *data)

Checks for updates.

See Also
sol_update_check
struct sol_update_handle*(* sol_update::fetch)(void(*cb)(void *data, int status), const void *data, bool resume)

Fetch updates.

See Also
sol_update_fetch
int(* sol_update::get_progress)(struct sol_update_handle *handle)

Get update task progress.

See Also
sol_update_get_progress
int(* sol_update::init)(void)

Function called when module is loaded.

An opportunity to do setup tasks, like checking if an update completed successfully.

Must return 0 on success, and a negative number on failure.

struct sol_update_handle*(* sol_update::install)(void(*cb)(void *data, int status), const void *data)

Install updates.

See Also
sol_update_install
void(* sol_update::shutdown)(void)

Function called when module is unloaded.

Cleanup tasks can be performed when this function is called.


The documentation for this struct was generated from the following file: