2022-05-03 10:25:52 +00:00
|
|
|
|
#ifndef __WEBMSG_H__
|
|
|
|
|
#define __WEBMSG_H__
|
|
|
|
|
|
|
|
|
|
#include "../../base/HGDef.h"
|
|
|
|
|
#include "../../base/HGInc.h"
|
|
|
|
|
#include "HttpHead.h"
|
|
|
|
|
#include <string>
|
|
|
|
|
|
2022-05-09 10:58:09 +00:00
|
|
|
|
#define WEB_MSGID_QUIT 1
|
|
|
|
|
#define WEB_MSGID_CONNET 2
|
|
|
|
|
#define WEB_MSGID_DISCONNET 3
|
|
|
|
|
#define WEB_MSGID_WSCMD 4
|
|
|
|
|
#define WEB_MSGID_HTTPCMD 5
|
|
|
|
|
#define WEB_MSGID_SOCKIOCMD 6
|
|
|
|
|
#define WEB_MSGID_WSRET 7
|
|
|
|
|
#define WEB_MSGID_HTTPRET 8
|
|
|
|
|
#define WEB_MSGID_SOCKIORET 9
|
|
|
|
|
#define WEB_MSGID_OPENDEV 10
|
|
|
|
|
#define WEB_MSGID_CLOSEDEV 11
|
|
|
|
|
#define WEB_MSGID_SCANFINISH 12
|
2022-05-03 10:25:52 +00:00
|
|
|
|
|
|
|
|
|
struct WebMsg
|
|
|
|
|
{
|
|
|
|
|
HGUInt msgId; /* WEB_MSGID_** */
|
2022-05-09 10:58:09 +00:00
|
|
|
|
HGUInt svrType; /* svrType */
|
|
|
|
|
HGUInt usrId; /* usrId */
|
2022-05-03 10:25:52 +00:00
|
|
|
|
HGPointer param; /* param */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct ConnectParam
|
|
|
|
|
{
|
|
|
|
|
HGChar ip[16];
|
|
|
|
|
HGUShort port;
|
|
|
|
|
#if defined(HG_CMP_MSC)
|
|
|
|
|
SOCKET socket;
|
|
|
|
|
#else
|
|
|
|
|
int socket;
|
|
|
|
|
#endif
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct WsCmdParam
|
|
|
|
|
{
|
|
|
|
|
HGByte *data;
|
|
|
|
|
HGUInt size;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct HttpCmdParam
|
|
|
|
|
{
|
|
|
|
|
HttpHead head;
|
|
|
|
|
HGByte* data;
|
|
|
|
|
HGUInt size;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct SockIoCmdParam
|
|
|
|
|
{
|
|
|
|
|
HGByte* data;
|
|
|
|
|
HGUInt size;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct SockIoRetParam
|
|
|
|
|
{
|
|
|
|
|
HGByte* data;
|
|
|
|
|
HGUInt size;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct OpenDevParam
|
|
|
|
|
{
|
|
|
|
|
std::string devName;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct CloseDevParam
|
|
|
|
|
{
|
|
|
|
|
std::string devName;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif /* __WEBMSG_H__ */
|