68 lines
2.5 KiB
C
68 lines
2.5 KiB
C
#ifndef SERVER_RESPONSE_H
|
|
#define SERVER_RESPONSE_H
|
|
|
|
#include "types.h"
|
|
|
|
void res_null_req(mg_connection* conn);
|
|
void res_must_get(mg_connection* conn);
|
|
void res_must_post(mg_connection* conn);
|
|
void res_need_token(mg_connection* conn);
|
|
void res_check_exist_fail(mg_connection* conn);
|
|
void res_user_exist(mg_connection* conn);
|
|
void res_not_exist(mg_connection* conn);
|
|
void res_permission_denied(mg_connection* conn);
|
|
void res_need_user_id(mg_connection* conn);
|
|
void res_need_password(mg_connection* conn);
|
|
void res_need_action(mg_connection* conn);
|
|
void res_bad_action(mg_connection* conn);
|
|
|
|
void res_auth_fail(mg_connection* conn);
|
|
void res_unauth(mg_connection* conn);
|
|
void res_auth(mg_connection* conn);
|
|
|
|
void res_delete_account_fail(mg_connection* conn);
|
|
void res_delete_account(mg_connection* conn);
|
|
|
|
void res_login_fail(mg_connection* conn);
|
|
void res_incorrect(mg_connection* conn);
|
|
void res_login(mg_connection* conn, const char* token);
|
|
|
|
void res_register_fail(mg_connection* conn);
|
|
void res_register(mg_connection* conn);
|
|
|
|
void res_repasswd_fail(mg_connection* conn);
|
|
void res_repasswd(mg_connection* conn);
|
|
|
|
void res_logout_fail(mg_connection* conn);
|
|
void res_logout(mg_connection* conn);
|
|
|
|
void res_check_permission_fail(mg_connection* conn);
|
|
void res_permission(mg_connection* conn, int permission);
|
|
|
|
void res_repermission_fail(mg_connection* conn);
|
|
void res_repermission(mg_connection* conn);
|
|
|
|
void res_need_xxx(mg_connection* conn, const char* xxx);
|
|
void res_500(mg_connection* conn, const char* error);
|
|
void res_404(mg_connection* conn, const char* error);
|
|
void res_200(mg_connection* conn, const char* success);
|
|
|
|
void res_add_problem(mg_connection* conn, int id);
|
|
void res_query_problem(mg_connection* conn, const char* problem, const char* check_error);
|
|
void res_query_problem2(mg_connection* conn, const char* problem, const char* answer, const char* check_error);
|
|
void res_check_answer(mg_connection* conn, int flag);
|
|
void res_all_problems(mg_connection* conn, const char* problems);
|
|
|
|
void res_get_record(mg_connection* conn, const char* record);
|
|
void res_all_records(mg_connection* conn, const char* records);
|
|
void res_all_records_by(mg_connection* conn, const char* records);
|
|
void res_all_records_of(mg_connection* conn, const char* records);
|
|
void res_records_count(mg_connection* conn, int count);
|
|
void res_have_ac(mg_connection* conn, int status);
|
|
|
|
void res_add_set(mg_connection* conn, int id);
|
|
void res_get_set(mg_connection* conn, const char* set);
|
|
void res_all_sets(mg_connection* conn, const char* sets);
|
|
void res_sets_count(mg_connection* conn, int count);
|
|
|
|
#endif |