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
#ifndef HSTATEVARIABLE_EVENT_H_
23
#define HSTATEVARIABLE_EVENT_H_
25
#include <HUpnpCore/HUpnp>
27
#include <QtCore/QVariant>
28
#include <QtCore/QSharedDataPointer>
36
class HStateVariableEventPrivate;
39
* \brief This is a class used to transfer state variable event information.
41
* \headerfile hstatevariable_event.h HStateVariableEvent
43
* \ingroup hupnp_devicemodel
45
* \sa HClientStateVariable, HServerStateVariable
47
* \remarks This class is not thread-safe.
49
class H_UPNP_CORE_EXPORT HStateVariableEvent
53
QSharedDataPointer<HStateVariableEventPrivate> h_ptr;
58
* \brief Creates a new, empty instance.
62
HStateVariableEvent();
65
* Creates a new instance based on the provided values.
67
* \param previousValue specifies the value before the change.
69
* \param newValue specifies the value of the state variable at the time
70
* the event was generated.
75
const QVariant& previousValue,
76
const QVariant& newValue);
79
* \brief Copy constructor.
81
* Copies the contents of the \c other to this.
83
HStateVariableEvent(const HStateVariableEvent&);
86
* \brief Destroys the instance.
88
~HStateVariableEvent();
91
* Assigns the contents of the other object to this.
93
* \return reference to this object.
95
HStateVariableEvent& operator=(const HStateVariableEvent&);
98
* \brief Indicates if the instance is empty.
100
* \return \e true if the instance is empty, which means that none of its
101
* attributes contain a valid non-empty value.
103
bool isEmpty() const;
106
* \brief Returns the previous value of the state variable.
108
* \return The previous value of the state variable.
110
QVariant previousValue() const;
113
* \brief Returns the new, changed value of the state variable.
115
* \return The new, changed value of the state variable.
117
QVariant newValue() const;
123
#endif /* HSTATEVARIABLE_EVENT_H_ */