code_app/sdk/webservice/WebMsg.h

76 lines
1.1 KiB
C++

#ifndef __WEBMSG_H__
#define __WEBMSG_H__
#include "base/HGDef.h"
#include "base/HGInc.h"
#include "HttpHead.h"
#include <string>
#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
struct WebMsg
{
HGUInt msgId; /* WEB_MSGID_** */
HGUInt svrType; /* svrType */
HGUInt usrId; /* usrId */
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__ */