gloox  1.0
oob.h
1 /*
2  Copyright (c) 2006-2009 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 OOB_H__
15 #define OOB_H__
16 
17 #include "gloox.h"
18 #include "stanzaextension.h"
19 
20 #include <string>
21 
22 namespace gloox
23 {
24 
25  class Tag;
26 
35  class GLOOX_API OOB : public StanzaExtension
36  {
37  public:
45  OOB( const std::string& url, const std::string& description, bool iqext );
46 
53  OOB( const Tag* tag );
54 
58  virtual ~OOB();
59 
64  const std::string& url() const { return m_url; }
65 
70  const std::string& desc() const { return m_desc; }
71 
72  // reimplemented from StanzaExtension
73  virtual const std::string& filterString() const;
74 
75  // reimplemented from StanzaExtension
76  virtual StanzaExtension* newInstance( const Tag* tag ) const
77  {
78  return new OOB( tag );
79  }
80 
81  // reimplemented from StanzaExtension
82  Tag* tag() const;
83 
84  // reimplemented from StanzaExtension
85  virtual StanzaExtension* clone() const
86  {
87  return new OOB( *this );
88  }
89 
90  private:
91  std::string m_xmlns;
92  std::string m_url;
93  std::string m_desc;
94  bool m_iqext;
95  bool m_valid;
96 
97  };
98 
99 }
100 
101 #endif // OOB_H__