~ari-tczew/ubuntu/natty/clementine/lp-747113

« back to all changes in this revision

Viewing changes to 3rdparty/gloox/dataformfieldcontainer.cpp

  • Committer: Artur Rona
  • Date: 2011-04-04 20:05:33 UTC
  • Revision ID: ari-tczew@ubuntu.com-20110404200533-6aclzasj5pp8t1hq
* New upstream release. (LP: #747113)
* Drop all patches, have been applied upstream.
* Update debian/copyright.
* Refresh description in debian/control in order to avoid lintian error.
* Bump debhelper to 8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (c) 2005-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 "dataformfieldcontainer.h"
 
15
#include "util.h"
 
16
 
 
17
 
 
18
namespace gloox
 
19
{
 
20
 
 
21
  DataFormFieldContainer::DataFormFieldContainer()
 
22
  {
 
23
  }
 
24
 
 
25
  DataFormFieldContainer::DataFormFieldContainer( const DataFormFieldContainer& dffc )
 
26
  {
 
27
    FieldList::const_iterator it = dffc.m_fields.begin();
 
28
    for( ; it != dffc.m_fields.end(); ++it )
 
29
    {
 
30
      m_fields.push_back( new DataFormField( *(*it) ) );
 
31
    }
 
32
  }
 
33
 
 
34
  DataFormFieldContainer::~DataFormFieldContainer()
 
35
  {
 
36
    util::clearList( m_fields );
 
37
  }
 
38
 
 
39
  DataFormField* DataFormFieldContainer::field( const std::string& field ) const
 
40
  {
 
41
    FieldList::const_iterator it = m_fields.begin();
 
42
    for( ; it != m_fields.end() && (*it)->name() != field; ++it )
 
43
      ;
 
44
    return it != m_fields.end() ? (*it) : 0;
 
45
  }
 
46
 
 
47
}