00001
00002
00003
00004
00005
00006
00007 #pragma once
00008
00009 #include <boost/date_time/posix_time/posix_time_types.hpp>
00010 #include <boost/optional.hpp>
00011
00012 #include <Swiften/Elements/Payload.h>
00013 #include <Swiften/JID/JID.h>
00014
00015 namespace Swift {
00016 class Delay : public Payload {
00017 public:
00018 Delay() {};
00019 Delay(const boost::posix_time::ptime& time, const JID& from = JID()) : time_(time), from_(from) {};
00020
00021 const boost::posix_time::ptime& getStamp() const {return time_;};
00022 void setStamp(const boost::posix_time::ptime& time) {time_ = time;};
00023
00024 const boost::optional<JID>& getFrom() const {return from_;};
00025 void setFrom(const JID& from) {from_ = from;};
00026
00027 private:
00028 boost::posix_time::ptime time_;
00029 boost::optional<JID> from_;
00030 };
00031 }