~ubuntu-branches/ubuntu/trusty/digikam/trusty

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/dlnaexport/extra/hupnp_av/src/mediabrowser/hcds_lastchange_info.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-11-26 18:24:20 UTC
  • mfrom: (1.9.1) (3.1.23 experimental)
  • Revision ID: package-import@ubuntu.com-20121126182420-qoy6z0nx4ai0wzcl
Tags: 4:3.0.0~beta3-0ubuntu1
* New upstream release
  - Add build-deps :  libhupnp-dev, libqtgstreamer-dev, libmagickcore-dev
* Merge from debian, remaining changes:
  - Make sure libqt4-opengl-dev, libgl1-mesa-dev and libglu1-mesa-dev only
    install on i386,amd64 and powerpc
  - Depend on libtiff-dev instead of libtiff4-dev
  - Drop digikam breaks/replaces kipi-plugins-common since we're past the
    LTS release now
  - digikam to recommend mplayerthumbs | ffmpegthumbs. We currently only
    have latter in the archives, even though former is also supposed to
    be part of kdemultimedia. (LP: #890059)
  - kipi-plugins to recommend www-browser rather than konqueror directly
    since 2.8 no direct usage of konqueror is present in the flickr
    plugin anymore (LP: #1011211)
  - Keep kubuntu_mysqld_executable_name.diff
  - Don't install libkipi translations
  - Keep deps on libcv-dev, libcvaux-dev
  - Keep split packaging of libraries
  - Replace icons from KDE 3 time in debian/xpm.d/*.xpm with the new
    versions (LP: #658047)
* Update debian/not-installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  Copyright (C) 2011 Tuomo Penttinen, all rights reserved.
 
3
 *
 
4
 *  Author: Tuomo Penttinen <tp@herqq.org>
 
5
 *
 
6
 *  This file is part of Herqq UPnP Av (HUPnPAv) library.
 
7
 *
 
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.
 
12
 *
 
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.
 
17
 *
 
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/>.
 
20
 */
 
21
 
 
22
#ifndef HLASTCHANGEINFO_H_
 
23
#define HLASTCHANGEINFO_H_
 
24
 
 
25
#include <HUpnpAv/HUpnpAv>
 
26
 
 
27
namespace Herqq
 
28
{
 
29
 
 
30
namespace Upnp
 
31
{
 
32
 
 
33
namespace Av
 
34
{
 
35
 
 
36
class HCdsLastChangeInfoPrivate;
 
37
 
 
38
/*!
 
39
 * \brief This class is used to contain information of a LastChange event.
 
40
 *
 
41
 * \headerfile hcds_lastchange_info.h HCdsLastChangeInfo
 
42
 *
 
43
 * \ingroup hupnp_av_cds_browsing
 
44
 *
 
45
 * \remarks This class is not thread-safe.
 
46
 *
 
47
 * \sa HMediaBrowser
 
48
 */
 
49
class H_UPNP_AV_EXPORT HCdsLastChangeInfo
 
50
{
 
51
public:
 
52
 
 
53
    /*!
 
54
     * \brief This enumeration defines the different event types used in LastChange
 
55
     * Data Format.
 
56
     */
 
57
    enum EventType
 
58
    {
 
59
        /*!
 
60
         * The event type is not defined.
 
61
         */
 
62
        Undefined = 0,
 
63
 
 
64
        /*!
 
65
         * A new object was added.
 
66
         */
 
67
        ObjectAdded,
 
68
 
 
69
        /*!
 
70
         * An existing object was modified.
 
71
         */
 
72
        ObjectModified,
 
73
 
 
74
        /*!
 
75
         * An object was deleted.
 
76
         */
 
77
        ObjectDeleted
 
78
    };
 
79
 
 
80
private:
 
81
 
 
82
    HCdsLastChangeInfoPrivate* h_ptr;
 
83
 
 
84
public:
 
85
 
 
86
    /*!
 
87
     * Creates a new, invalid instance.
 
88
     *
 
89
     * \sa isValid()
 
90
     */
 
91
    HCdsLastChangeInfo();
 
92
 
 
93
    /*!
 
94
     * \brief Creates a new instance.
 
95
     *
 
96
     * \param objectId specifies the ID of the object.
 
97
     *
 
98
     * \param eventType specifies the type of the event.
 
99
     *
 
100
     * \sa isValid()
 
101
     */
 
102
    HCdsLastChangeInfo(const QString& objectId, EventType eventType);
 
103
 
 
104
    /*!
 
105
     * \brief Destroys the instance.
 
106
     */
 
107
    ~HCdsLastChangeInfo();
 
108
 
 
109
    /*!
 
110
     * \brief Copy constructor.
 
111
     *
 
112
     * Creates a copy of \c other.
 
113
     */
 
114
    HCdsLastChangeInfo(const HCdsLastChangeInfo&);
 
115
 
 
116
    /*!
 
117
     * \brief Assignment operator.
 
118
     *
 
119
     * Copies the contents of \c other to this.
 
120
     */
 
121
    HCdsLastChangeInfo& operator=(const HCdsLastChangeInfo&);
 
122
 
 
123
    /*!
 
124
     * \brief Specifies the ID of the object.
 
125
     *
 
126
     * \param id specifies the ID of the object.
 
127
     *
 
128
     * \sa objectId()
 
129
     */
 
130
    void setObjectId(const QString& id);
 
131
 
 
132
    /*!
 
133
     * \brief Specifies the type of the event.
 
134
     *
 
135
     * \param type specifies the type of the event.
 
136
     *
 
137
     * \sa eventType()
 
138
     */
 
139
    void setEventType(EventType type);
 
140
 
 
141
    /*!
 
142
     * \brief Specifies the ID of the parent object.
 
143
     *
 
144
     * \param id specifies the ID of the parent object.
 
145
     *
 
146
     * \sa parentId()
 
147
     */
 
148
    void setParentId(const QString& id);
 
149
 
 
150
    /*!
 
151
     * \brief Specifies the value of the upnp:class property.
 
152
     *
 
153
     * \param objClass specifies the value of the upnp:class property.
 
154
     *
 
155
     * \sa objectClass()
 
156
     */
 
157
    void setObjectClass(const QString& objClass);
 
158
 
 
159
    /*!
 
160
     * Specifies the value of the SystemUpdateID state variable that
 
161
     * resulted when the object was modified.
 
162
     *
 
163
     * \param arg specifies the value of the SystemUpdateID state variable that
 
164
     * resulted when the object was modified.
 
165
     *
 
166
     * \sa updateId()
 
167
     */
 
168
    void setUpdateId(quint32 arg);
 
169
 
 
170
    /*!
 
171
     * Specifies whether the change was part of a sub-tree operation.
 
172
     *
 
173
     * \param set specifies whether the change was part of a sub-tree operation.
 
174
     *
 
175
     * \sa stUpdate()
 
176
     */
 
177
    void setStUpdate(bool set);
 
178
 
 
179
    /*!
 
180
     * \brief Indicates the validity of the object.
 
181
     *
 
182
     * \return \e true in case the object is valid, i.e. at least objectId() and
 
183
     * eventType() are defined.
 
184
     */
 
185
    bool isValid() const;
 
186
 
 
187
    /*!
 
188
     * \brief Returns the ID of the object.
 
189
     *
 
190
     * \return The ID of the object.
 
191
     *
 
192
     * \sa setObjectId()
 
193
     */
 
194
    QString objectId() const;
 
195
 
 
196
    /*!
 
197
     * \brief Returns the type of the event.
 
198
     *
 
199
     * \return The type of the event.
 
200
     *
 
201
     * \sa setEventType()
 
202
     */
 
203
    EventType eventType() const;
 
204
 
 
205
    /*!
 
206
     * \brief Returns the ID of the parent object.
 
207
     *
 
208
     * \return The ID of the parent object.
 
209
     *
 
210
     * \sa setParentId()
 
211
     */
 
212
    QString parentId() const;
 
213
 
 
214
    /*!
 
215
     * \brief Returns the value of the upnp:class property.
 
216
     *
 
217
     * \return the value of the upnp:class property.
 
218
     *
 
219
     * \sa setObjectClass()
 
220
     */
 
221
    QString objectClass() const;
 
222
 
 
223
    /*!
 
224
     * Returns the value of the SystemUpdateID state variable that
 
225
     * resulted when the object was modified.
 
226
     *
 
227
     * \return the value of the SystemUpdateID state variable that
 
228
     * resulted when the object was modified.
 
229
     *
 
230
     * \sa setUpdateId()
 
231
     */
 
232
    quint32 updateId() const;
 
233
 
 
234
    /*!
 
235
     * Indicates whether the change was part of a sub-tree operation.
 
236
     *
 
237
     * \return \e true if the change was part of a sub-tree operation.
 
238
     *
 
239
     * \sa setStUpdate();
 
240
     */
 
241
    bool stUpdate() const;
 
242
};
 
243
 
 
244
/*!
 
245
 * Compares the two objects for equality.
 
246
 *
 
247
 * \return \e true in case the objects are logically equivalent.
 
248
 *
 
249
 * \relates HCdsLastChangeInfo
 
250
 */
 
251
H_UPNP_AV_EXPORT bool operator==(const HCdsLastChangeInfo& obj1, const HCdsLastChangeInfo& obj2);
 
252
 
 
253
/*!
 
254
 * Compares the two objects for inequality.
 
255
 *
 
256
 * \return \e true in case the objects are not logically equivalent.
 
257
 *
 
258
 * \relates HCdsLastChangeInfo
 
259
 */
 
260
inline bool operator!=(const HCdsLastChangeInfo& obj1, const HCdsLastChangeInfo& obj2)
 
261
{
 
262
    return !(obj1 == obj2);
 
263
}
 
264
 
 
265
}
 
266
}
 
267
}
 
268
 
 
269
#endif /* HLASTCHANGEINFO_H_ */