📄 taomessage.h
字号:
GET_COMPONENTS = 0x82, GET_COMPONENTGROUPS = 0x83, GET_CONFIG = 0x84, GET_TERM_LISTENERS = 0x85, NUM_COMPONENTS = 0x86, NUM_TERM_LISTENERS = 0x87, PICKUP = 0x88, REMOVE_TERM_LISTENER = 0x89, TERMINAL_RESULT = 0x8a, SET_INBOUND_CODEC_CPU_LIMIT = 0x8b,/* ----------------------------- PHONEBUTTON --------------------------------- */ BUTTON_PRESS = 0x90, BUTTON_DOWN = 0x91, BUTTON_UP = 0x92, BUTTON_GET_INFO = 0x93, BUTTON_SET_INFO = 0x94, BUTTON_GET_PHONELAMP = 0x95,/* ----------------------------- PHONEHOOKSWITCH --------------------------------- */ HOOKSWITCH_SET_STATE = 0xa0, HOOKSWITCH_GET_STATE = 0xa1, HOOKSWITCH_GET_CALL = 0xa2,/* ----------------------------- PHONELAMP --------------------------------- */ LAMP_GET_MODE = 0xb0, LAMP_GET_SUPPORTED_MODES = 0xb1, LAMP_GET_BUTTON = 0xb2, LAMP_SET_MODE = 0xb3,/* ----------------------------- PHONEDISPALY --------------------------------- */ DISPLAY_GET_DISPLAY = 0xb4, DISPLAY_GET_ROWS = 0xb5, DISPLAY_GET_COLS = 0xb6, DISPLAY_GET_CONTRAST = 0xb7, DISPLAY_SET_DISPLAY = 0xb8, DISPLAY_SET_CONTRAST = 0xb9,/* ----------------------------- PHONEMIC --------------------------------- */ MIC_GET_GAIN = 0xc0, MIC_SET_GAIN = 0xc1,/* ----------------------------- PHONERINGER --------------------------------- */ RINGER_SET_INFO = 0xc2, RINGER_SET_PATTERN = 0xc3, RINGER_SET_VOLUME = 0xc4, RINGER_GET_INFO = 0xc5, RINGER_GET_PATTERN = 0xc6, RINGER_GET_VOLUME = 0xc7, RINGER_GET_MAX_PATTERN_INDEX = 0xc8, RINGER_GET_NUMBER_OF_RINGS = 0xc9, RINGER_IS_ON = 0xca,/* ----------------------------- PHONESPEAKER --------------------------------- */ SPEAKER_SET_VOLUME = 0xcb, SPEAKER_GET_VOLUME = 0xcc, SPEAKER_GET_NOMINAL_VOLUME = 0xcd,/* ----------------------------- PHONEGROUP --------------------------------- */ PHONEGROUP_ACTIVATE = 0xd0, PHONEGROUP_DEACTIVATE = 0xd1, PHONEGROUP_GET_COMPONENTS = 0xd2, PHONEGROUP_GET_DESCRIPTION = 0xd3, PHONEGROUP_GET_TYPE = 0xd4, PHONEGROUP_IS_ACTIVATED = 0xd5, EXTSPEAKER_SET_VOLUME = 0xd6, EXTSPEAKER_GET_VOLUME = 0xd7, EXTSPEAKER_GET_NOMINAL_VOLUME = 0xd8, COMPONENT_RESULT = 0xd9 };#ifdef TAOMSG_DEBUG static unsigned int mMsgCnt;#endif/* ============================ CREATORS ================================== */ TaoMessage(); TaoMessage(const UtlString& msgString); //:Constructor TaoMessage(UtlString& msgString, UtlString delimiter); //:Constructor TaoMessage(const unsigned char msgType, const unsigned char cmd, const int msgId, TaoObjHandle handle, TaoObjHandle socket, const int argCnt, const UtlString& agrList); //:Constructor TaoMessage(TaoListenerEventMessage& rEventMessage, TaoObjHandle hSocket); TaoMessage(const TaoMessage& rTaoMessage); //:Copy constructor TaoMessage(OsMsg& msgString); //:Constructor virtual OsMsg* createCopy(void) const; //:Create a copy of this msg object (which may be of a derived type) virtual ~TaoMessage(); //:Destructor/* ============================ MANIPULATORS ============================== */ TaoMessage& operator=(const TaoMessage& rhs); //:Assignment operator void setCmd(TaoMsgCmds cmd); void setSocket(TaoObjHandle handle); void setMsgID(unsigned int id); void setArgCnt(int cnt); void setArgList(UtlString& argList); void setArgList(const char* szArgList); void setObjHandle(TaoObjHandle handle); void setMsgQueueHandle(TaoObjHandle handle);/* ============================ ACCESSORS ================================= */ TaoObjHandle getMsgQueueHandle(void) const { return mMessageQueueHandle; }; //:Return pointer to message queue owner. TaoObjHandle getSocket(void) const { return mSocketHandle; }; //:Return pointer to OsConnectionSocket. unsigned int getMsgID(void) const { return mMsgID; }; //:Return the used size of the message in bytes TaoObjHandle getTaoObjHandle(void) const { return mTaoObjHandle; }; //:Return the mTaoObjHandle object handle unsigned int getArgCnt(void) const { return mArgCnt; }; //:Return the used size of the message in bytes const char* getArgList(void) const { return mArgList.data(); }; //:Return the used size of the message in bytes unsigned char getCmd() { return mCmd; }; void getBytes(UtlString* bytes, int* length); //: Get the bytes for the complete message, using the mHttpMsg's getBytes method. // Suitable for streaming or sending over a socket //! param: bytes - gets allocated and must be freed //! param: length - the length of bytes/* ============================ INQUIRY =================================== *//* //////////////////////////// PROTECTED ///////////////////////////////// */protected: void createHTTPMsg(TaoMessage& rTaoMessage);/* //////////////////////////// PRIVATE /////////////////////////////////// */private:/* ============================ FUNCTIONS ================================= */ void serialize(); // construct mBody with other class members void deSerialize(); // construct class members with mBody/* ============================ VARIABLES ================================= */ TaoObjHandle mTaoObjHandle; // the PTAPI object associated with the msg TaoObjHandle mSocketHandle; // socket on the transport TaoObjHandle mMessageQueueHandle; // message queue owner i fnon zero unsigned int mMsgID; // the identifier of this msg unsigned int mArgCnt; // the number of arguments in the msg UtlString mArgList; // argument list UtlBoolean mbDirty; // Is the message dirty (needs to be reserialized) unsigned char mCmd;#ifdef USE_HTTPMSG HttpMessage mHttpMsg; // HTTPMessage form of the TaoMessage#endif int mBodyLength; UtlString mBody;};#endif // _TaoMessage_h_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -