gloox  1.0.1
gpgencrypted.h
1 /*
2  Copyright (c) 2006-2012 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 GPGENCRYPTED_H__
15 #define GPGENCRYPTED_H__
16 
17 #include "gloox.h"
18 #include "stanzaextension.h"
19 
20 #include <string>
21 
22 namespace gloox
23 {
24 
25  class Tag;
26 
38  class GLOOX_API GPGEncrypted : public StanzaExtension
39  {
40  public:
45  GPGEncrypted( const std::string& encrypted );
46 
52  GPGEncrypted( const Tag* tag );
53 
57  virtual ~GPGEncrypted();
58 
63  const std::string& encrypted() const { return m_encrypted; }
64 
65  // reimplemented from StanzaExtension
66  virtual const std::string& filterString() const;
67 
68  // reimplemented from StanzaExtension
69  virtual StanzaExtension* newInstance( const Tag* tag ) const
70  {
71  return new GPGEncrypted( tag );
72  }
73 
74  // reimplemented from StanzaExtension
75  Tag* tag() const;
76 
77  // reimplemented from StanzaExtension
78  virtual StanzaExtension* clone() const
79  {
80  return new GPGEncrypted( *this );
81  }
82 
83  private:
84  std::string m_encrypted;
85  bool m_valid;
86 
87  };
88 
89 }
90 
91 #endif // GPGENCRYPTED_H__