56 lines
1.3 KiB
C
56 lines
1.3 KiB
C
/*
|
|
* tempstick_wifi_client.h
|
|
*
|
|
* Created on: Jul 28, 2023
|
|
* Author: Sword
|
|
*/
|
|
|
|
#ifndef MAIN_WIFI_CLIENT_H_
|
|
#define MAIN_WIFI_CLIENT_H_
|
|
|
|
#define WIFI_OK 0
|
|
#define WIFI_FAIL -1
|
|
#define WIFI_MCU_UPDATE_NEEDED 2
|
|
|
|
#define WIFI_OK 0
|
|
#define WIFI_FAIL -1
|
|
#define WIFI_MCU_UPDATE_NEEDED 2
|
|
|
|
typedef enum
|
|
{
|
|
GET_CONFIGURATIONS,
|
|
GET_MCU_UPDATE_VERSION,
|
|
GET_MODEM_UPDATE_VERSION
|
|
}get_req_type_t;
|
|
|
|
typedef enum
|
|
{
|
|
SERVER_ONE,
|
|
SERVER_TWO,
|
|
SERVER_THREE
|
|
}server_type_t;
|
|
|
|
#include "wifi_Init.h"
|
|
#include "main.h"
|
|
#if (WIFI_NEEDED == 1)
|
|
esp_err_t http_client_test(char *url);
|
|
esp_err_t http_client_post(char *url, char *params, char *response);
|
|
void http_client_post_stop(void);
|
|
esp_err_t http_client_get(const char *url1, char *response);
|
|
|
|
<<<<<<< HEAD
|
|
=======
|
|
esp_err_t http_get_response_buf(char* bufptr, int len);
|
|
|
|
>>>>>>> 4ea13f8 (Added azuma wifi switch backup code)
|
|
esp_err_t http_client_do_get_request(get_req_type_t target_url, char* device_imei, char *response_buf);
|
|
esp_err_t http_client_do_post_request(char *post_params, char *response_buf);
|
|
void wifi_set_post_str_type(deviceToServer_msgType_t str);;
|
|
|
|
bool registerAcctWithServer(char *typeStr, char *customerAccountIdStr, char *customerAccountPasswordStr, char *customerAccountPasswordAgainStr, char *responseStr, uint16_t responseStrSize);
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* MAIN_WIFI_CLIENT_H_ */
|