00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __PEEKABOT_MESSAGE_HH
00019 #define __PEEKABOT_MESSAGE_HH
00020
00021
00022 #include <string>
00023 #include <boost/date_time/posix_time/posix_time_types.hpp>
00024
00025 #include "Types.hh"
00026 #include "MessageHub.hh"
00027
00028
00029 namespace peekabot
00030 {
00031
00032
00044 class Message
00045 {
00049 const std::string m_message;
00050
00054 const MessageType m_type;
00055
00060 const bool m_has_source;
00061
00066 const SourceID m_source;
00067
00071 const boost::posix_time::ptime m_timestamp;
00072
00073 public:
00081 Message(
00082 MessageType type, SourceID source,
00083 const std::string &message) throw();
00084
00085
00092 Message(MessageType type, const std::string &message) throw();
00093
00100 const std::string &get_message() const throw();
00101
00105 MessageType get_type() const throw();
00106
00111 bool has_source() const throw();
00112
00119 SourceID get_source() const throw();
00120
00124 boost::posix_time::ptime get_timestamp() const throw();
00125 };
00126
00127
00128
00129 }
00130
00131
00132 #endif // __PEEKABOT_MESSAGE_HH