2
0

abup_http.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef __ABUP_REQUEST__
  2. #define __ABUP_REQUEST__
  3. #include "abup_typedef.h"
  4. #include "abup_hal_uart.h"
  5. typedef struct
  6. {
  7. abup_uint8 type[32];
  8. abup_uint16 content_len;
  9. abup_uint8* content;
  10. }ABUP_ALIGN(1) abup_http_parameter;
  11. extern abup_int abup_http_content_len;
  12. extern void abup_fota_make_json_request(abup_int8 state,abup_char *ptr,abup_uint len);
  13. extern abup_int8 *abup_make_http_data(abup_uint8 state);
  14. extern abup_bool abup_parse_http_data(abup_char* data,abup_http_parameter* http_parameter,abup_uint16 count);
  15. extern abup_char* abup_is_http_data(abup_char* data,abup_uint16 len);
  16. extern abup_uint abup_http_callback(abup_uint8 state,abup_char *data, abup_uint len);
  17. void abup_http_get_new_version(void);
  18. abup_char* abup_get_http_server_host(void);
  19. void abup_http_report_result(void);
  20. extern abup_char * abup_get_signptr(abup_char *buf,abup_int *len,abup_char* mid,abup_char *productId, abup_char* productSecret,abup_uint32 utc_time);
  21. extern abup_uint8 *abup_get_common_data(void);
  22. extern abup_uint abup_get_common_data_len(void);
  23. extern abup_bool abup_get_domain(abup_char *server,abup_char* domain,abup_int16 domain_len,abup_int* port);
  24. #endif