main
parent
551db17c1e
commit
3578934ed4
|
@ -3,7 +3,7 @@
|
||||||
#include <cgicc/HTTPHTMLHeader.h>
|
#include <cgicc/HTTPHTMLHeader.h>
|
||||||
|
|
||||||
// 注册请求处理函数
|
// 注册请求处理函数
|
||||||
void handleSignupRequest(cgicc::Cgicc& cgi)
|
void handleDevicesRequest(cgicc::Cgicc& cgi)
|
||||||
{
|
{
|
||||||
#if 0 // 获取表单数据
|
#if 0 // 获取表单数据
|
||||||
std::string username = cgi.getEnvironment().get("username");
|
std::string username = cgi.getEnvironment().get("username");
|
|
@ -7,6 +7,7 @@
|
||||||
#include <cgicc/HTMLClasses.h>
|
#include <cgicc/HTMLClasses.h>
|
||||||
|
|
||||||
#include "handleHeader.h"
|
#include "handleHeader.h"
|
||||||
|
|
||||||
#include "openjson.h"
|
#include "openjson.h"
|
||||||
#include "opmysql.h"
|
#include "opmysql.h"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#ifndef __HANDLER_DEFINE_INCLUDE__
|
||||||
|
#define __HANDLER_DEFINE_INCLUDE__
|
||||||
|
|
||||||
|
#include <cgicc/CgiDefs.h>
|
||||||
|
#include <cgicc/Cgicc.h>
|
||||||
|
|
||||||
|
// 你的CGI处理函数声明
|
||||||
|
void handleLoginRequest(cgicc::Cgicc& cgi);
|
||||||
|
void handleDevicesRequest(cgicc::Cgicc& cgi);
|
||||||
|
|
||||||
|
#endif //__HANDLER_DEFINE_INCLUDE__
|
|
@ -3,15 +3,12 @@
|
||||||
#include <cgicc/HTTPHTMLHeader.h>
|
#include <cgicc/HTTPHTMLHeader.h>
|
||||||
#include <cgicc/HTMLClasses.h>
|
#include <cgicc/HTMLClasses.h>
|
||||||
#include <hv/hv.h>
|
#include <hv/hv.h>
|
||||||
|
|
||||||
#include "handleHeader.h"
|
|
||||||
|
|
||||||
#include "openjson.h"
|
#include "openjson.h"
|
||||||
#include "opmysql.h"
|
#include "opmysql.h"
|
||||||
|
|
||||||
// 你的CGI处理函数声明
|
#include "handleHeader.h"
|
||||||
void handleLoginRequest(cgicc::Cgicc& cgi);
|
#include "handlers.h"
|
||||||
void handleSignupRequest(cgicc::Cgicc& cgi);
|
|
||||||
|
|
||||||
// 添加更多处理函数...
|
// 添加更多处理函数...
|
||||||
|
|
||||||
|
@ -112,9 +109,9 @@ int main()
|
||||||
handleLoginRequest(formData);
|
handleLoginRequest(formData);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (**fi == "getDevices")
|
if (**fi == "devices")
|
||||||
{
|
{
|
||||||
|
handleDevicesRequest(formData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue