2
* Copyright (C) 2011 Tuomo Penttinen, all rights reserved.
4
* Author: Tuomo Penttinen <tp@herqq.org>
6
* This file is part of Herqq UPnP Av (HUPnPAv) library.
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.
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.
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/>.
22
#include "hpersonwithrole.h"
24
static bool registerMetaTypes()
26
qRegisterMetaType<Herqq::Upnp::Av::HPersonWithRole>(
27
"Herqq::Upnp::Av::HPersonWithRole");
31
static bool regMetaT = registerMetaTypes();
42
HPersonWithRole::HPersonWithRole() :
47
HPersonWithRole::HPersonWithRole(const QString& name, const QString& role) :
50
QString nameTrimmed = name.trimmed();
51
if (!nameTrimmed.isEmpty())
54
m_role = role.trimmed();
58
HPersonWithRole::~HPersonWithRole()
62
bool HPersonWithRole::isValid() const
64
return !m_name.isEmpty();
67
bool operator==(const HPersonWithRole& obj1, const HPersonWithRole& obj2)
69
return obj1.name() == obj2.name() &&
70
obj1.role() == obj2.role();