2
* Copyright (C) 2010, 2011 Tuomo Penttinen, all rights reserved.
4
* Author: Tuomo Penttinen <tp@herqq.org>
6
* This file is part of Herqq UPnP (HUPnP) library.
8
* Herqq UPnP is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU Lesser 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 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 Lesser General Public License for more details.
18
* You should have received a copy of the GNU Lesser General Public License
19
* along with Herqq UPnP. If not, see <http://www.gnu.org/licenses/>.
22
#include "hstatevariable_event.h"
30
/*******************************************************************************
31
* HStateVariableEventPrivate
32
*******************************************************************************/
33
class HStateVariableEventPrivate :
38
QVariant m_previousValue;
43
HStateVariableEventPrivate ();
44
~HStateVariableEventPrivate();
47
HStateVariableEventPrivate::HStateVariableEventPrivate() :
48
m_previousValue(), m_newValue()
52
HStateVariableEventPrivate::~HStateVariableEventPrivate()
56
/*******************************************************************************
58
*******************************************************************************/
59
HStateVariableEvent::HStateVariableEvent() :
60
h_ptr(new HStateVariableEventPrivate())
64
HStateVariableEvent::HStateVariableEvent(
65
const QVariant& previousValue, const QVariant& newValue) :
66
h_ptr(new HStateVariableEventPrivate())
68
h_ptr->m_previousValue = previousValue;
69
h_ptr->m_newValue = newValue;
72
HStateVariableEvent::HStateVariableEvent(const HStateVariableEvent& other) :
75
Q_ASSERT(&other != this);
78
HStateVariableEvent::~HStateVariableEvent()
82
HStateVariableEvent& HStateVariableEvent::operator=(
83
const HStateVariableEvent& other)
85
Q_ASSERT(&other != this);
92
bool HStateVariableEvent::isEmpty() const
94
return h_ptr->m_previousValue.isNull() &&
95
h_ptr->m_newValue.isNull();
98
QVariant HStateVariableEvent::previousValue() const
100
return h_ptr->m_previousValue;
103
QVariant HStateVariableEvent::newValue() const
105
return h_ptr->m_newValue;