blob: 86399946cb364b97094edfb848eeffd2d4fea711 [file] [log] [blame]
zw.wang96c5d4e2025-07-01 11:35:13 +08001#ifndef _WEFOTA_DEVICE_H_
2#define _WEFOTA_DEVICE_H_
3
4#include "cfg_api.h"
5
6#define FOTA_INTERVAL_MIN (3600 * 24)
7#define FOTA_INTERVAL_RANDOM (3600 * 2)
8#define FOTA_DOWNLOAD_FILEPATH "/cache/zte_fota/delta.package"
9#define FOTA_UPDATE_STATUS_FILE "/cache/zte_fota/update_status"
10#define FOTA_NEED_CONTINUE_PREVIOUS_UPGRADE 2
11
12int get_iccid(char *iccid);
13int get_imei(char *imei);
14int get_version(char *version);
15int is_data_connected(void);
16int get_wefota_server1_cfg(char *ip, int *port);
17int set_wefota_server2_cfg(const char *ip, int port);
18int get_last_work_time(int *time, int *interval);
19int set_last_work_time(int time, int interval);
20int start_wefota_install(void);
21int wait_fota_conditions(void);
22int set_wefota_upgrade_flag_cfg(const char *state);
23int fota_is_file_exist(const char* path);
24int fota_read_file(const char*path, char*buf, size_t sz);
25int fota_read_file_int(const char* path, int *val);
26int fota_get_update_status(int *fota_status);
27void wefota_upgrade_without_verify(void);
28
29#endif