gloox  1.0.16
oob.h
1 /*
2  Copyright (c) 2006-2015 by Jakob Schröter <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__
const std::string & desc() const
Definition: oob.h:70
virtual StanzaExtension * clone() const
Definition: oob.h:85
virtual StanzaExtension * newInstance(const Tag *tag) const
Definition: oob.h:76
The namespace for the gloox library.
Definition: adhoc.cpp:27
This class abstracts a stanza extension, which is usually an element in a specific namespace...
const std::string & url() const
Definition: oob.h:64
This is an abstraction of a jabber:x:oob namespace element or a jabber:iq:oob namespace element as sp...
Definition: oob.h:35
This is an abstraction of an XML element.
Definition: tag.h:46