gloox  1.1-svn
jinglertp.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 JINGLERTP_H__
15 #define JINGLERTP_H__
16 
17 #include "jingledescription.h"
18 
19 #include <string>
20 #include <list>
21 
22 namespace gloox
23 {
24 
25  class Tag;
26 
27  namespace Jingle
28  {
29 
37  class GLOOX_API RTP : public Description
38  {
39  public:
47  class GLOOX_API Payload
48  {
49  public:
58  Payload( const StringMap& attribs, const StringMap& parameters )
59  : m_attribs( attribs ), m_parameters( parameters )
60  {}
61 
65  ~Payload() {}
66 
72  Tag* tag() const;
73 
74  private:
75  StringMap m_attribs;
76  StringMap m_parameters;
77 
78  };
79 
83  typedef std::list<const RTP::Payload*> PayloadList;
84 
89  RTP( const PayloadList& payload );
90 
94  virtual ~RTP();
95 
96  // reimplemented from Description
97  virtual const std::string& xmlns() const { return XMLNS_JINGLE_RTP; }
98 
99  // reimplemented from Plugin
100  virtual const std::string& filterString() const;
101 
102  // reimplemented from Plugin
103  virtual Tag* tag() const;
104 
105  // reimplemented from Plugin
106  virtual Plugin* clone() const
107  {
108  return new RTP( *this );
109  }
110 
111  };
112 
113  }
114 
115 }
116 
117 #endif // JINGLERTP_H__