delayeddelivery.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef DELAYEDDELIVERY_H__
00015 #define DELAYEDDELIVERY_H__
00016
00017 #include "gloox.h"
00018 #include "jid.h"
00019 #include "stanzaextension.h"
00020
00021 #include <string>
00022
00023 namespace gloox
00024 {
00025
00026 class Tag;
00027
00038 class GLOOX_API DelayedDelivery : public StanzaExtension
00039 {
00040
00041 public:
00048 DelayedDelivery( const JID& from, const std::string stamp,
00049 const std::string& reason = "" );
00050
00055 DelayedDelivery( const Tag* tag = 0 );
00056
00060 virtual ~DelayedDelivery();
00061
00068 const std::string& stamp() const { return m_stamp; }
00069
00074 void setStamp( const std::string& stamp ) { m_stamp = stamp; }
00075
00083 const JID& from() const { return m_from; }
00084
00089 void setFrom( const JID& from ) { m_from = from; }
00090
00095 const std::string& reason() const { return m_reason; }
00096
00101 void setReason( const std::string& reason ) { m_reason = reason; }
00102
00103
00104 virtual const std::string& filterString() const;
00105
00106
00107 virtual StanzaExtension* newInstance( const Tag* tag ) const
00108 {
00109 return new DelayedDelivery( tag );
00110 }
00111
00112
00113 virtual Tag* tag() const;
00114
00115
00116 virtual StanzaExtension* clone() const
00117 {
00118 return new DelayedDelivery( *this );
00119 }
00120
00121 private:
00122 JID m_from;
00123 std::string m_stamp;
00124 std::string m_reason;
00125 bool m_valid;
00126 };
00127
00128 }
00129
00130 #endif // DELAYEDDELIVERY_H__