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
#ifndef HLASTCHANGEINFO_H_
23
#define HLASTCHANGEINFO_H_
25
#include <HUpnpAv/HUpnpAv>
36
class HCdsLastChangeInfoPrivate;
39
* \brief This class is used to contain information of a LastChange event.
41
* \headerfile hcds_lastchange_info.h HCdsLastChangeInfo
43
* \ingroup hupnp_av_cds_browsing
45
* \remarks This class is not thread-safe.
49
class H_UPNP_AV_EXPORT HCdsLastChangeInfo
54
* \brief This enumeration defines the different event types used in LastChange
60
* The event type is not defined.
65
* A new object was added.
70
* An existing object was modified.
75
* An object was deleted.
82
HCdsLastChangeInfoPrivate* h_ptr;
87
* Creates a new, invalid instance.
94
* \brief Creates a new instance.
96
* \param objectId specifies the ID of the object.
98
* \param eventType specifies the type of the event.
102
HCdsLastChangeInfo(const QString& objectId, EventType eventType);
105
* \brief Destroys the instance.
107
~HCdsLastChangeInfo();
110
* \brief Copy constructor.
112
* Creates a copy of \c other.
114
HCdsLastChangeInfo(const HCdsLastChangeInfo&);
117
* \brief Assignment operator.
119
* Copies the contents of \c other to this.
121
HCdsLastChangeInfo& operator=(const HCdsLastChangeInfo&);
124
* \brief Specifies the ID of the object.
126
* \param id specifies the ID of the object.
130
void setObjectId(const QString& id);
133
* \brief Specifies the type of the event.
135
* \param type specifies the type of the event.
139
void setEventType(EventType type);
142
* \brief Specifies the ID of the parent object.
144
* \param id specifies the ID of the parent object.
148
void setParentId(const QString& id);
151
* \brief Specifies the value of the upnp:class property.
153
* \param objClass specifies the value of the upnp:class property.
157
void setObjectClass(const QString& objClass);
160
* Specifies the value of the SystemUpdateID state variable that
161
* resulted when the object was modified.
163
* \param arg specifies the value of the SystemUpdateID state variable that
164
* resulted when the object was modified.
168
void setUpdateId(quint32 arg);
171
* Specifies whether the change was part of a sub-tree operation.
173
* \param set specifies whether the change was part of a sub-tree operation.
177
void setStUpdate(bool set);
180
* \brief Indicates the validity of the object.
182
* \return \e true in case the object is valid, i.e. at least objectId() and
183
* eventType() are defined.
185
bool isValid() const;
188
* \brief Returns the ID of the object.
190
* \return The ID of the object.
194
QString objectId() const;
197
* \brief Returns the type of the event.
199
* \return The type of the event.
203
EventType eventType() const;
206
* \brief Returns the ID of the parent object.
208
* \return The ID of the parent object.
212
QString parentId() const;
215
* \brief Returns the value of the upnp:class property.
217
* \return the value of the upnp:class property.
219
* \sa setObjectClass()
221
QString objectClass() const;
224
* Returns the value of the SystemUpdateID state variable that
225
* resulted when the object was modified.
227
* \return the value of the SystemUpdateID state variable that
228
* resulted when the object was modified.
232
quint32 updateId() const;
235
* Indicates whether the change was part of a sub-tree operation.
237
* \return \e true if the change was part of a sub-tree operation.
241
bool stUpdate() const;
245
* Compares the two objects for equality.
247
* \return \e true in case the objects are logically equivalent.
249
* \relates HCdsLastChangeInfo
251
H_UPNP_AV_EXPORT bool operator==(const HCdsLastChangeInfo& obj1, const HCdsLastChangeInfo& obj2);
254
* Compares the two objects for inequality.
256
* \return \e true in case the objects are not logically equivalent.
258
* \relates HCdsLastChangeInfo
260
inline bool operator!=(const HCdsLastChangeInfo& obj1, const HCdsLastChangeInfo& obj2)
262
return !(obj1 == obj2);
269
#endif /* HLASTCHANGEINFO_H_ */