HQDEST.H
上传用户:bjghjy
上传日期:2007-01-07
资源大小:379k
文件大小:2k
- #ifndef _INC_DESTINFO
- #define _INC_DESTINFO
- #include <time.h>
- #define REQ_HQ10 0 // refresh hq list
- #define REQ_GRA10 1 // refresh graph, mmp, maxmin
- #define REQ_HQCHKUSR 2
- #define REQ_HQ01 3
- #define MAX_USER_COUNT 200
- #define MAX_PARA_COUNT 40
- #define HQ_USERID_SIZE 6
- #define HQ_USERPWD_SIZE 6
- typedef struct tag_ZS_GRAPH
- {
- MAXMIN_DATA Maxmin[2];
- }ZS_GRAPH, *LPZS_GRAPH;
- typedef struct tag_GRAPH
- {
- MMP mmp;
- }GRAPH, *LPGRAPH;
- typedef struct tag_DP_MAIN
- {
- float zs;
- float zd;
- int cjzje;
- float npbl;
- int cjss;
- short upCount, downCount, equalCount;
- }DP_MAIN, *LPDP_MAIN;
- typedef struct tag_DEST_INFO
- {
- int sd;
- short curJys;
- short reqType; // hq refresh, mindata refresh
- short *params; // * for hq refresh: recFirst, recCount
- // for sel hq refresh: recCount, recList;
- // for graph refresh: recEnd
- short graNo,graEnd;
- int *lpCjss;
- int cjss;
- int inactive;
- short paramsCount;
- BYTE isDead, isUsing,version;
- LPGRAPH lpGraph;
- LPZS_GRAPH lpZsGraph;
- DP_MAIN DpData[2];
- char userID[HQ_USERID_SIZE+1];
- time_t startTime;
- int recNum;
- struct tag_DEST_INFO *lpNext;
- }DEST_INFO, *LPDEST_INFO;
- typedef struct tag_DEST_INFOS
- {
- int destCount, aliveCount;
- BOOL isUsing;
- LPDEST_INFO lpDestHead;
- }DEST_INFOS;
- extern DEST_INFOS dest_infos;
- BOOL DestInit(void);
- void DestExit(void);
- long GetDestCount(void);
- int LockDest(LPDEST_INFO lpDest,int num);
- void UnlockDest(LPDEST_INFO lpDestTmp);
- int CheckDest(int sd, struct sockaddr *dest, int curJys,
- int reqType, short *params, short paramsCount,BYTE version);
- int CreateScanDestThread(void);
- void DelDeads(void);
- void CheckDestEcho(int sd, struct sockaddr *);
- int HqDestSetDead(struct sockaddr *);
- int HqDestSetDeadByPrt(LPDEST_INFO lpDestTmp);
- int HqDestSetDeadBySd(int sd);
- int HqDestStopBySd(int sd);
- int HqDestActiveUsr(int sd, struct sockaddr * dest, LPSTR usrID,int ret);
- LPDEST_INFO GetDest(struct sockaddr *dest);
- LPDEST_INFO GetDestBySd(int sd);
- LPDEST_INFO GetAnotherUserById(char *Id,int sd);
- #endif