gloox  1.1-svn
jinglertp.cpp
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 #include "jinglertp.h"
15 #include "tag.h"
16 #include "util.h"
17 
18 namespace gloox
19 {
20 
21  namespace Jingle
22  {
23 
24  // ---- Jingle::RTP::Payload ----
26  {
27  if( m_attribs.empty() )
28  return 0;
29 
30  Tag* t = new Tag( "payload-type" );
31  StringMap::const_iterator it = m_attribs.begin();
32  for( ; it != m_attribs.end(); ++it )
33  t->addAttribute( (*it).first, (*it).second );
34 
35  it = m_parameters.begin();
36  for( ; it != m_parameters.end(); ++it )
37  {
38  Tag* p = new Tag( t, "parameter" );
39  p->addAttribute( "name", (*it).first );
40  p->addAttribute( "value", (*it).second );
41  }
42 
43  return t;
44  }
45  // ---- ~Jingle::RTP::Payload ----
46 
47  // ---- Jingle::RTP ----
48  RTP::RTP( const PayloadList& payload )
49  {
50  }
51 
53  {
54  }
55 
56  const std::string& RTP::filterString() const
57  {
58  static const std::string filter = "description[@xmlns='" + XMLNS_JINGLE_RTP +"']";
59  return filter;
60  }
61 
62  Tag* RTP::tag() const
63  {
64  return 0;
65  }
66 
67  }
68 
69 }