gloox  1.0.9
featureneg.h
1 /*
2  Copyright (c) 2007-2013 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 FEATURENEG_H__
15 #define FEATURENEG_H__
16 
17 #include "stanzaextension.h"
18 
19 #include <string>
20 
21 namespace gloox
22 {
23 
24  class DataForm;
25  class Tag;
26 
35  class GLOOX_API FeatureNeg : public StanzaExtension
36  {
37  public:
42  FeatureNeg( DataForm* form );
43 
48  FeatureNeg( const Tag* tag = 0 );
49 
53  virtual ~FeatureNeg();
54 
59  const DataForm* form() const { return m_form; }
60 
61  // reimplemented from StanzaExtension
62  virtual const std::string& filterString() const;
63 
64  // reimplemented from StanzaExtension
65  virtual StanzaExtension* newInstance( const Tag* tag ) const
66  {
67  return new FeatureNeg( tag );
68  }
69 
70  // reimplemented from StanzaExtension
71  virtual Tag* tag() const;
72 
73  // reimplemented from StanzaExtension
74  virtual StanzaExtension* clone() const
75  {
76  return new FeatureNeg( m_form );
77  }
78 
79  private:
80  DataForm* m_form;
81 
82  };
83 
84 }
85 
86 #endif // FEATURENEG_H__