91 lines
2.3 KiB
C
91 lines
2.3 KiB
C
//
|
|
// Created by cfif on 13.12.22.
|
|
//
|
|
|
|
#ifndef GONEC_ARTERY_HTTPD_TABLESPOSTGET_H
|
|
#define GONEC_ARTERY_HTTPD_TABLESPOSTGET_H
|
|
#include "httpd_post.h"
|
|
#include "httpd_get.h"
|
|
#include "Settings_General.h"
|
|
#include "Settings_Basic_Access.h"
|
|
#include "Settings_Frequency_Speed.h"
|
|
#include "Settings_Tracert.h"
|
|
#include "Settings_Transceiver.h"
|
|
#include "Settings_Network.h"
|
|
#include "Settings_Date_Time.h"
|
|
#include "Settings_RS485_Bluetooth.h"
|
|
#include "httpd_post_handlers.h"
|
|
#include "httpd_get_handlers.h"
|
|
#include "JSONSettings.h"
|
|
#include "httpd_types.h"
|
|
|
|
typedef enum {
|
|
ID_Post_Var = 0,
|
|
ID_Post_Message_Create_Cmd = 1,
|
|
ID_Post_Message_Create_Msg2 = 2,
|
|
ID_Post_Message_Create_Msg3 = 3,
|
|
ID_Post_Key_Load = 4,
|
|
ID_Post_Update_Web_File = 5,
|
|
ID_Post_Update_Main_Init_File = 6,
|
|
ID_Post_Update_Main_Write_File = 7,
|
|
ID_Post_Update_Write_Crypto = 8,
|
|
ID_Post_Update_Write_Modem = 9,
|
|
ID_Post_Update_Init_Write_Modem = 10,
|
|
ID_Post_Update_Start_Modem = 11,
|
|
ID_Post_Update_Init_Write_Crypto = 12,
|
|
ID_Post_Update_Start_Crypto = 13,
|
|
ID_Post_Update_Start_Main = 14,
|
|
ID_Post_Write_Other_File = 15,
|
|
ID_Post_sendmsg2 = 16,
|
|
ID_Post_Update_Boot_Init_File = 17,
|
|
ID_Post_Update_Boot_Write_File = 18
|
|
|
|
} idPost_t;
|
|
|
|
typedef enum {
|
|
ID_Get_Settings = 0,
|
|
ID_Get_Key_File = 1,
|
|
ID_Get_Messages_Inbox = 2,
|
|
ID_Get_Messages_Outbox = 3,
|
|
ID_Get_Messages_Sentbox = 4,
|
|
ID_Get_Messages_Content_Inbox = 5,
|
|
ID_Get_Messages_Content_Outbox = 6,
|
|
ID_Get_Messages_Content_Sentbox = 7,
|
|
ID_Get_Messages_Meta_Content_Inbox = 8,
|
|
ID_Get_Messages_Meta_Content_Outbox = 9,
|
|
ID_Get_Messages_Meta_Content_Sentbox = 10,
|
|
ID_Get_Get_Version = 11
|
|
} idGet_t;
|
|
|
|
struct tablePostGetSetting {
|
|
const void *json;
|
|
const char *path;
|
|
};
|
|
|
|
|
|
typedef idPostResult_t (*tPostMethod)(tHttpPostSetting *env);
|
|
typedef idPostResult_t (*tGetMethod)(tHttpSetting *env);
|
|
|
|
struct tablePost {
|
|
const char *path;
|
|
uint8_t id;
|
|
};
|
|
|
|
struct tableGet {
|
|
const char *path;
|
|
uint8_t id;
|
|
tGetMethod method;
|
|
};
|
|
|
|
struct tableKeysAddr {
|
|
uint32_t addr;
|
|
uint8_t countPage;
|
|
};
|
|
|
|
extern const struct tablePostGetSetting tablePostGetSettings[];
|
|
extern const struct tablePost tablePosts[];
|
|
extern const struct tableGet tableGets[];
|
|
extern const struct to_json jsonResponse_Post[];
|
|
|
|
#endif //GONEC_ARTERY_HTTPD_TABLESPOSTGET_H
|