gloox  0.9.9.12
delayeddelivery.h
1 /*
2  Copyright (c) 2006-2008 by Jakob Schroeter <js@camaya.net>
3  This file is part of the gloox library. http://camaya.net/gloox
4 
5  This software is distributed under a license. The full license
6  agreement can be found in the file LICENSE in this distribution.
7  This software may not be copied, modified, sold or distributed
8  other than expressed in the named license agreement.
9 
10  This software is distributed without any warranty.
11 */
12 
13 
14 #ifndef DELAYEDDELIVERY_H__
15 #define DELAYEDDELIVERY_H__
16 
17 #include "stanzaextension.h"
18 #include "jid.h"
19 
20 #include <string>
21 
22 namespace gloox
23 {
24 
25  class Tag;
26 
35  {
36 
37  public:
44  DelayedDelivery( const JID& from, const std::string stamp, const std::string& reason );
45 
51 
55  virtual ~DelayedDelivery();
56 
63  const std::string& stamp() const { return m_stamp; }
64 
69  void setStamp( const std::string& stamp ) { m_stamp = stamp; }
70 
78  const JID& from() const { return m_from; }
79 
84  void setFrom( const JID& from ) { m_from = from; }
85 
90  const std::string& reason() const { return m_reason; }
91 
96  void setReason( const std::string& reason ) { m_reason = reason; }
97 
103  GLOOX_DEPRECATED void setBody( const std::string& reason ) { m_reason = reason; }
104 
105  // reimplemented from StanzaExtension
106  virtual Tag* tag() const;
107 
108  private:
109  JID m_from;
110  std::string m_stamp;
111  std::string m_reason;
112  bool m_valid;
113  };
114 
115 }
116 
117 #endif // DELAYEDDELIVERY_H__