zw.wang | 96c5d4e | 2025-07-01 11:35:13 +0800 | [diff] [blame^] | 1 | #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 |
|
| 12 | int get_iccid(char *iccid);
|
| 13 | int get_imei(char *imei);
|
| 14 | int get_version(char *version);
|
| 15 | int is_data_connected(void);
|
| 16 | int get_wefota_server1_cfg(char *ip, int *port);
|
| 17 | int set_wefota_server2_cfg(const char *ip, int port);
|
| 18 | int get_last_work_time(int *time, int *interval);
|
| 19 | int set_last_work_time(int time, int interval);
|
| 20 | int start_wefota_install(void);
|
| 21 | int wait_fota_conditions(void);
|
| 22 | int set_wefota_upgrade_flag_cfg(const char *state);
|
| 23 | int fota_is_file_exist(const char* path);
|
| 24 | int fota_read_file(const char*path, char*buf, size_t sz);
|
| 25 | int fota_read_file_int(const char* path, int *val);
|
| 26 | int fota_get_update_status(int *fota_status);
|
| 27 | void wefota_upgrade_without_verify(void);
|
| 28 |
|
| 29 | #endif
|