blob: 86399946cb364b97094edfb848eeffd2d4fea711 [file] [log] [blame]
#ifndef _WEFOTA_DEVICE_H_
#define _WEFOTA_DEVICE_H_
#include "cfg_api.h"
#define FOTA_INTERVAL_MIN (3600 * 24)
#define FOTA_INTERVAL_RANDOM (3600 * 2)
#define FOTA_DOWNLOAD_FILEPATH "/cache/zte_fota/delta.package"
#define FOTA_UPDATE_STATUS_FILE "/cache/zte_fota/update_status"
#define FOTA_NEED_CONTINUE_PREVIOUS_UPGRADE 2
int get_iccid(char *iccid);
int get_imei(char *imei);
int get_version(char *version);
int is_data_connected(void);
int get_wefota_server1_cfg(char *ip, int *port);
int set_wefota_server2_cfg(const char *ip, int port);
int get_last_work_time(int *time, int *interval);
int set_last_work_time(int time, int interval);
int start_wefota_install(void);
int wait_fota_conditions(void);
int set_wefota_upgrade_flag_cfg(const char *state);
int fota_is_file_exist(const char* path);
int fota_read_file(const char*path, char*buf, size_t sz);
int fota_read_file_int(const char* path, int *val);
int fota_get_update_status(int *fota_status);
void wefota_upgrade_without_verify(void);
#endif