• Main Page
  • Classes
  • Files
  • File List

Swiften/Elements/Delay.h

00001 /*
00002  * Copyright (c) 2010 Kevin Smith
00003  * Licensed under the GNU General Public License v3.
00004  * See Documentation/Licenses/GPLv3.txt for more information.
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 }

Generated on Fri Oct 12 2012 21:00:19 for Swiften by  doxygen 1.7.1