www.pudn.com > crestroncontrol.rar > UProcessMessage.h, change:2005-11-22,size:3862b


//--------------------------------------------------------------------------- 
#ifndef UProcessMessageH 
#define UProcessMessageH 
/* 
#define CC_BASE_MESSAGE_LENGTH  44 
#define CC_BUFFER_LENGTH        1024 
#define CC_ZERO                 Ox00 
#define CC_HEAD                 0xFFFFFFFF 
#define CC_FE                   0xFE 
 
#define SCR_WORD_DISPLAY            101001    //显示字幕 
#define SCR_WORD_DISPLAY_MODE       101002    //字幕显示方式 
#define SPK_ASK_SPEAK               301001    //允许某个代表发言 or 发言人请求发言 
#define SPK_CANCEL_SPEAK            301002    //取消发言 
#define SPK_START_SPEAK             301003    //开始发言 
#define SPK_END_SPEAK               301004    //结束发言 
#define SPK_SET_SPEAK_TIME          302001    //设定发言时间 
#define SPK_CANCEL_SPEAK_TIME       302002    //取消发言时间 
#define SPK_SET_SPEAK_MODE          303001    //设置操作模式 
#define SPK_GET_SPEAK_MODE          303002    //获得 
#define SPK_SET_ACTIVE_MICS         303003    //设置活动话筒数 
#define SIG_DIS_COME_RESULT         501001    //显示报道结果 
#define SIG_COME_RESULT             502001    //报道结果 
#define SIG_DELE_SIGNIN 	        503001    //代表报道 
#define SIG_DELE_SIGNOUT            503002    //代表离场 
#define VOTE_START_VOTE             601001    //开始表决 
#define VOTE_END_VOTE               601002    //结束表决 
#define VOTE_LOOK_VOTE_RESULT       601003    //察看表决结果 
#define VOTE_SELECT_VOTE_TITLE      601004    //选择表决的议题 
#define VOTE_CANCEL_VOTE_TITLE      601005    //取消选择的议题 
#define VOTE_VOTE_RESULT            602001    //表决结果 
#define MEET_DIS_MEET               701001    //显示会标 
#define MEET_MEET_CONTENT           702001    //会标内容 
#define PROG_OPEN_PROJECT           900011    //开投影仪 
#define PROG_CLOSE_PROJECT          900021    //关机 
#define PROG_PLAY_SOUCE             900031    //播放信号 
#define PROG_WORD_INTRODUCE         900004    //介绍 
*/ 
/* 
struct TSocketBuffer 
{ 
    char    Data[CC_BUFFER_LENGTH]; 
    int     Point; 
}; 
 
struct TCCBaseMessage 
{ 
    unsigned int    Head; 
    unsigned int    Length; 
    unsigned int    Class; 
    char            Buffer[32]; 
}; 
 
struct TCCBaseIntMessage 
{ 
    unsigned int    Head; 
    unsigned int    Length; 
    unsigned int    Class; 
    int				Data[8]; 
}; 
 
struct TCCBaseVoteMessage 
{ 
    unsigned int    Head; 
    unsigned int    Length; 
    unsigned int    Class; 
    int				Data[4]; 
    char			Vote[16]; 
}; 
 
struct TCCBaseMeetMessage 
{ 
    unsigned int    Head; 
    unsigned int    Length; 
    unsigned int    Class; 
    char			Meet[32]; 
}; 
 
struct TCCBaseScreenMessage 
{ 
    unsigned int    Head; 
    unsigned int    Length; 
    unsigned int    Class; 
    char            content[32];//字符内容,15个字 
}; 
 
struct TCCBaseScreenModeMessage 
{ 
    unsigned int    Head; 
    unsigned int    Length; 
    unsigned int    Class; 
    char	        name[20];//字符集 
    int             color;//颜色值 
    unsigned short  size;//大小 
    unsigned short  x; 
    unsigned short  y;//位置 
    unsigned short  type;//显示方式 
}; 
*/ 
#include <ScktComp.hpp> 
#include "UBaseControlMessage.h" 
 
typedef int (* TProccessCCBaseMessage)(TCCBaseMessage *ccBaseMessage); 
 
//--------------------------------------------------------------------------- 
class TProcessMessage 
{ 
private: 
    TSocketBuffer * mpSocketBuffer; 
    unsigned int    mpStructSize[8]; 
public: 
    // 
    TProcessMessage(); 
    ~TProcessMessage(); 
 
    void __fastcall ServerSocketMsgClientRead(TObject *Sender, TCustomWinSocket *Socket); 
    int ProccessCCMessage(TSocketBuffer *socketBuffer); 
    //int ProccessCCBaseMessage(TCCBaseMessage *ccBaseMessage); 
    int SeekNextMessage(TSocketBuffer *socketBuffer); 
 
    TProccessCCBaseMessage proccessCCBaseMessage; 
}; 
#endif