gloox  1.1-svn
jinglecontent.h
1 /*
2  Copyright (c) 2008-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 JINGLECONTENT_H__
15 #define JINGLECONTENT_H__
16 
17 
18 #include "jingleplugin.h"
19 #include "tag.h"
20 
21 #include <string>
22 
23 namespace gloox
24 {
25 
26  namespace Jingle
27  {
28 
29  class Description;
30  class Transport;
31 
41  class GLOOX_API Content : public Plugin
42  {
43  public:
47  enum Creator
48  {
51  InvalidCreator
52  };
53 
57  enum Senders
58  {
62  InvalidSender
63  };
64 
68  Content( Description* desc, Transport* trans,
69  const std::string& name, Creator creator = CInitiator,
70  Senders senders = SBoth, const std::string& disposition = EmptyString );
71 
75  Content( const Tag* tag = 0 );
76 
80  virtual ~Content();
81 
82  // reimplemented from Plugin
83  virtual const std::string& filterString() const;
84 
85  // reimplemented from Plugin
86  virtual Tag* tag() const;
87 
88  // reimplemented from Plugin
89  virtual Plugin* clone() const;
90 
91  private:
92  Description* m_description;
93  Transport* m_transport;
94  Creator m_creator;
95  std::string m_disposition;
96  std::string m_name;
97  Senders m_senders;
98 
99  };
100 
101  }
102 
103 }
104 
105 #endif // JINGLECONTENT_H__