00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 #ifndef __JAUS_CORE_ACCESS_CONTROL_CONFIRM_CONTROL__H 00041 #define __JAUS_CORE_ACCESS_CONTROL_CONFIRM_CONTROL__H 00042 00043 #include "jaus/core/corecodes.h" 00044 #include "jaus/core/message.h" 00045 00046 namespace JAUS 00047 { 00063 class JAUS_CORE_DLL ConfirmControl : public Message 00064 { 00065 public: 00066 // Response types for confirmation of control request. 00067 enum Response 00068 { 00069 ControlAccepted = 0, 00070 NotAvailable, 00071 InsufficientAuthority 00072 }; 00073 ConfirmControl(const Address& dest = Address(), const Address& src = Address()); 00074 ConfirmControl(const ConfirmControl& message); 00075 ~ConfirmControl(); 00076 inline Byte GetResponseCode() const { return mResponseCode; } 00077 inline Byte SetResponseCode(const Response code) { return mResponseCode = code; } 00078 virtual bool IsCommand() const { return false; } 00079 virtual int WriteMessageBody(Packet& packet) const; 00080 virtual int ReadMessageBody(const Packet& packet); 00081 virtual Message* Clone() const { return new ConfirmControl(*this); } 00082 virtual UInt GetPresenceVector() const { return 0; } 00083 virtual UInt GetPresenceVectorSize() const { return 0; } 00084 virtual UInt GetPresenceVectorMask() const { return 0; } 00085 virtual UShort GetMessageCodeOfResponse() const { return 0; } 00086 virtual std::string GetMessageName() const { return "Confirm Control"; } 00087 virtual void ClearMessageBody(); 00088 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize = 1437) const { return false; } 00089 virtual int RunTestCase() const; 00090 ConfirmControl& operator=(const ConfirmControl& message); 00091 protected: 00092 Response mResponseCode; 00093 }; 00094 } 00095 00096 #endif 00097 /* End of File */