trfPublic.h
上传用户:maryhy001
上传日期:2007-05-02
资源大小:2317k
文件大小:1k
- #ifndef _TRF_PUBLIC_H
- #define _TRF_PUBLIC_H
- #include "sqlstr.h"
- #include "vnclog.h"
- //define
- #define SVR_DIRPORT 5557
- #define MAX_SQL_SIZE 1024
- #define MAX_USR_SIZE 32
- const char ENCRYPTKEY[8] = "fakeyou";
- //////////////////////////////////////////////////////////////////////////
- //Agent package type.
- typedef enum {RAG_STATE=1, RAG_VERIFYPWD = 2, RAG_EXECUSRSQL = 3} RAGPACKTYPE;
- typedef enum {KAG_STATE=1, KAG_VERIFYPWD = 2, KAG_EXECUSRSQL = 3} KAGPACKTYPE;
- typedef enum {K_OK=1, K_FAILED = 2} KAGPACKRET;
- //@1---Agent requirest package
- typedef struct tagRAgentPack {
- LONG size;
- RAGPACKTYPE type;
- LPVOID data;
- }RAGENTPACK, *PRAGENTPACK;
- //@2---Agent response package
- typedef struct tagKAgentPack {
-
- int type; //KAGPACKTYPE
- int ret; //KAGPACKRET
-
- }KAGENTPACK, *PKAGENTPACK;
- //@3---Author information package
- typedef struct tagAuthorInfo {
- char username[MAX_USR_SIZE+1];
- char passwrd[8+1];
- }AUTHORINFO, *PAUTHORINFO;
- //@4---Executing client sql sentence
- typedef struct tagExecSqlInfo {
-
- char sql[MAX_SQL_SIZE+1];
- BYTE needretval;
-
- }EXECSQLINFO, *PEXECSQLINFO;
- //////////////////////////////////////////////////////////////////////////
- typedef enum { NT_DEPART = 1, NT_AGENT = 2 } USRTREE_NODE_TYPE;
- typedef struct tagAGInfo {
-
- string shostname;
- string shostip;
-
- }AGINFO, *PAGINFO;
- #endif //_TRF_PUBLIC_H