#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); #endif