delayeddelivery.h

00001 /*
00002   Copyright (c) 2006-2008 by Jakob Schroeter <js@camaya.net>
00003   This file is part of the gloox library. http://camaya.net/gloox
00004 
00005   This software is distributed under a license. The full license
00006   agreement can be found in the file LICENSE in this distribution.
00007   This software may not be copied, modified, sold or distributed
00008   other than expressed in the named license agreement.
00009 
00010   This software is distributed without any warranty.
00011 */
00012 
00013 
00014 #ifndef DELAYEDDELIVERY_H__
00015 #define DELAYEDDELIVERY_H__
00016 
00017 #include "stanzaextension.h"
00018 #include "jid.h"
00019 
00020 #include <string>
00021 
00022 namespace gloox
00023 {
00024 
00025   class Tag;
00026 
00034   class DelayedDelivery : public StanzaExtension
00035   {
00036 
00037     public:
00044       DelayedDelivery( const JID& from, const std::string stamp, const std::string& reason );
00045 
00050       DelayedDelivery( Tag *tag );
00051 
00055       virtual ~DelayedDelivery();
00056 
00063       const std::string& stamp() const { return m_stamp; }
00064 
00069       void setStamp( const std::string& stamp ) { m_stamp = stamp; }
00070 
00078       const JID& from() const { return m_from; }
00079 
00084       void setFrom( const JID& from ) { m_from = from; }
00085 
00090       const std::string& reason() const { return m_reason; }
00091 
00096       void setReason( const std::string& reason ) { m_reason = reason; }
00097 
00103       GLOOX_DEPRECATED void setBody( const std::string& reason ) { m_reason = reason; }
00104 
00105       // reimplemented from StanzaExtension
00106       virtual Tag* tag() const;
00107 
00108     private:
00109       JID m_from;
00110       std::string m_stamp;
00111       std::string m_reason;
00112       bool m_valid;
00113   };
00114 
00115 }
00116 
00117 #endif // DELAYEDDELIVERY_H__

Generated on Mon Dec 7 13:28:19 2009 for gloox by  doxygen 1.6.1