33 #include <boost/cstdint.hpp>
34 #include <boost/operators.hpp>
35 #include <boost/date_time.hpp>
37 #include <rsc/runtime/Printable.h>
38 #include <rsc/misc/UUID.h>
40 #include "rsb/rsbexports.h"
54 class RSB_EXPORT
MetaData:
public virtual rsc::runtime::Printable,
55 boost::equality_comparable<MetaData> {
61 std::string getClassName()
const;
62 void printContents(std::ostream& stream)
const;
69 rsc::misc::UUID getSenderId()
const;
76 void setSenderId(
const rsc::misc::UUID& senderId);
96 boost::uint64_t getCreateTime()
const;
106 void setCreateTime(
const boost::uint64_t& time = 0);
107 void setCreateTime(
const double& time);
108 void setCreateTime(
const boost::posix_time::ptime& time);
116 boost::uint64_t getSendTime()
const;
123 void setSendTime(
const boost::uint64_t& time = 0);
124 void setSendTime(
const double& time);
125 void setSendTime(
const boost::posix_time::ptime& time);
133 boost::uint64_t getReceiveTime()
const;
140 void setReceiveTime(
const boost::uint64_t& time = 0);
141 void setReceiveTime(
const double& time);
142 void setReceiveTime(
const boost::posix_time::ptime& time);
151 boost::uint64_t getDeliverTime()
const;
159 void setDeliverTime(
const boost::uint64_t& time = 0);
160 void setDeliverTime(
const double& time);
161 void setDeliverTime(
const boost::posix_time::ptime& time);
176 std::set<std::string> userTimeKeys()
const;
183 bool hasUserTime(
const std::string& key)
const;
191 boost::uint64_t getUserTime(
const std::string& key)
const;
198 void setUserTime(
const std::string& key,
const boost::uint64_t& time = 0);
199 void setUserTime(
const std::string& key,
const double& time);
200 void setUserTime(
const std::string& key,
const boost::posix_time::ptime& time);
202 std::map<std::string, boost::uint64_t>::const_iterator userTimesBegin()
const;
203 std::map<std::string, boost::uint64_t>::const_iterator userTimesEnd()
const;
218 std::set<std::string> userInfoKeys()
const;
225 bool hasUserInfo(
const std::string& key)
const;
233 std::string getUserInfo(
const std::string& key)
const;
241 void setUserInfo(
const std::string& key,
const std::string& value);
242 std::map<std::string, std::string>::const_iterator userInfosBegin()
const;
243 std::map<std::string, std::string>::const_iterator userInfosEnd()
const;
246 bool operator==(
const MetaData& other)
const;
251 void checkedTimeStampSet(boost::uint64_t& timestamp,
const boost::uint64_t& proposedValue);
252 void checkedTimeStampSet(boost::uint64_t& timestamp,
const double& proposedValue);
253 void checkedTimeStampSet(boost::uint64_t& timestamp,
const boost::posix_time::ptime& proposedValue);