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 "hprepareforconnection_result.h"
33
/*******************************************************************************
34
* HPrepareForConnectionResult
35
******************************************************************************/
36
HPrepareForConnectionResult::HPrepareForConnectionResult() :
37
m_connectionId(-1), m_avTransportId(-1), m_rcsId(-1)
41
HPrepareForConnectionResult::HPrepareForConnectionResult(
42
qint32 connectionId, qint32 avTransportId, qint32 rcsId) :
43
m_connectionId(-1), m_avTransportId(-1), m_rcsId(-1)
45
setConnectionId(connectionId);
46
setAvTransportId(avTransportId);
50
bool HPrepareForConnectionResult::isValid() const
52
return m_connectionId >= 0;
55
void HPrepareForConnectionResult::setConnectionId(qint32 arg)
57
if (arg < -1) { arg = -1; }
61
void HPrepareForConnectionResult::setAvTransportId(qint32 arg)
63
if (arg < -1) { arg = -1; }
64
m_avTransportId = arg;
67
void HPrepareForConnectionResult::setRcsId(qint32 arg)
69
if (arg < -1) { arg = -1; }
73
bool operator==(const HPrepareForConnectionResult& obj1, const HPrepareForConnectionResult& obj2)
75
return obj1.avTransportId() == obj2.avTransportId() &&
76
obj1.connectionId() == obj2.connectionId() &&
77
obj1.rcsId() == obj2.rcsId();