#ifndef BANBAN_OTA_FULLOTA2_H #define BANBAN_OTA_FULLOTA2_H typedef enum { BANBAN_FULLOTA2_OK = 0, BANBAN_FULLOTA2_ERR_ARGUMENT = -1, BANBAN_FULLOTA2_ERR_BUSY = -2, BANBAN_FULLOTA2_ERR_TASK = -3, BANBAN_FULLOTA2_ERR_HTTP = -4, BANBAN_FULLOTA2_ERR_LENGTH = -5, BANBAN_FULLOTA2_ERR_SPACE = -6, BANBAN_FULLOTA2_ERR_INIT = -7, BANBAN_FULLOTA2_ERR_WRITE = -8, BANBAN_FULLOTA2_ERR_FLUSH = -9, BANBAN_FULLOTA2_ERR_VERIFY = -10 } banban_fullfota2_result_t; typedef void (*banban_fullfota2_finished_cb_t)(int result); /* Download percentage in 10% steps; reporting must not cancel the download. */ typedef void (*banban_fullfota2_progress_cb_t)(int progress); int banban_fullfota2_start(const char *url, banban_fullfota2_progress_cb_t progress_cb, banban_fullfota2_finished_cb_t finished_cb); int banban_fullfota2_is_running(void); void banban_fullfota2_discard_staged_package(void); #endif