~ubuntu-branches/ubuntu/trusty/digikam/trusty

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/dlnaexport/extra/hupnp_av/src/cds_model/hpersonwithrole.cpp

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2012-09-27 21:41:30 UTC
  • mfrom: (1.2.43)
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: package-import@ubuntu.com-20120927214130-i8v3ufr21nesp29i
Tags: 4:3.0.0~beta1a-1
* New upstream release

* Fix "wrongly conflicts phonon-backend-vlc" dropped (Closes: #688142)
* debian/watch include download.kde.org

* digikam 3.0.0 uses features from unreleased kdegraphics >=4.10 & ships 
a private version of the kdegraphics libs - this is not the Debian way :-(
* Unsatisfactory Conflicts: libkipi8, libkexiv2-10, libkdcraw20, libksane0
* Suspend digikam-dbg >130Mb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  Copyright (C) 2011 Tuomo Penttinen, all rights reserved.
 
3
 *
 
4
 *  Author: Tuomo Penttinen <tp@herqq.org>
 
5
 *
 
6
 *  This file is part of Herqq UPnP Av (HUPnPAv) library.
 
7
 *
 
8
 *  Herqq UPnP Av is free software: you can redistribute it and/or modify
 
9
 *  it under the terms of the GNU General Public License as published by
 
10
 *  the Free Software Foundation, either version 3 of the License, or
 
11
 *  (at your option) any later version.
 
12
 *
 
13
 *  Herqq UPnP Av is distributed in the hope that it will be useful,
 
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
16
 *  GNU General Public License for more details.
 
17
 *
 
18
 *  You should have received a copy of the GNU General Public License
 
19
 *  along with Herqq UPnP Av. If not, see <http://www.gnu.org/licenses/>.
 
20
 */
 
21
 
 
22
#include "hpersonwithrole.h"
 
23
 
 
24
static bool registerMetaTypes()
 
25
{
 
26
    qRegisterMetaType<Herqq::Upnp::Av::HPersonWithRole>(
 
27
        "Herqq::Upnp::Av::HPersonWithRole");
 
28
    return true;
 
29
}
 
30
 
 
31
static bool regMetaT = registerMetaTypes();
 
32
 
 
33
namespace Herqq
 
34
{
 
35
 
 
36
namespace Upnp
 
37
{
 
38
 
 
39
namespace Av
 
40
{
 
41
 
 
42
HPersonWithRole::HPersonWithRole() :
 
43
    m_name(), m_role()
 
44
{
 
45
}
 
46
 
 
47
HPersonWithRole::HPersonWithRole(const QString& name, const QString& role) :
 
48
    m_name(), m_role()
 
49
{
 
50
    QString nameTrimmed = name.trimmed();
 
51
    if (!nameTrimmed.isEmpty())
 
52
    {
 
53
        m_name = nameTrimmed;
 
54
        m_role = role.trimmed();
 
55
    }
 
56
}
 
57
 
 
58
HPersonWithRole::~HPersonWithRole()
 
59
{
 
60
}
 
61
 
 
62
bool HPersonWithRole::isValid() const
 
63
{
 
64
    return !m_name.isEmpty();
 
65
}
 
66
 
 
67
bool operator==(const HPersonWithRole& obj1, const HPersonWithRole& obj2)
 
68
{
 
69
    return obj1.name() == obj2.name() &&
 
70
           obj1.role() == obj2.role();
 
71
}
 
72
 
 
73
}
 
74
}
 
75
}
 
76