gloox  1.0
xhtmlim.h
1 /*
2  Copyright (c) 2007-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 XHTMLIM_H__
15 #define XHTMLIM_H__
16 
17 #include "jid.h"
18 #include "stanzaextension.h"
19 #include "tag.h"
20 
21 #include <string>
22 
23 namespace gloox
24 {
25 
26  class Tag;
27 
34  class GLOOX_API XHtmlIM : public StanzaExtension
35  {
36 
37  public:
42  XHtmlIM( const Tag* xhtml = 0 );
43 
47  virtual ~XHtmlIM();
48 
54  const Tag* xhtml() const { return m_xhtml; }
55 
56  // reimplemented from StanzaExtension
57  virtual const std::string& filterString() const;
58 
59  // reimplemented from StanzaExtension
60  virtual StanzaExtension* newInstance( const Tag* tag ) const
61  {
62  return new XHtmlIM( tag );
63  }
64 
65  // reimplemented from StanzaExtension
66  virtual Tag* tag() const;
67 
68  // reimplemented from StanzaExtension
69  virtual StanzaExtension* clone() const;
70 
71  private:
72  Tag* m_xhtml;
73 
74  };
75 
76 }
77 
78 #endif // XHTMLIM_H__