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/>.
25
#include <HUpnpAv/HItem>
36
class HVideoItemPrivate;
39
* \brief This class represents content intended for viewing.
41
* The class identifier specified by the AV Working Committee is
42
* \c object.item.videoItem .
44
* \headerfile hvideoitem.h HVideoItem
46
* \ingroup hupnp_av_cds_objects
48
* \remarks This class is not thread-safe.
50
class H_UPNP_AV_EXPORT HVideoItem :
54
H_DISABLE_COPY(HVideoItem)
55
H_DECLARE_PRIVATE(HVideoItem)
60
* Constructs a new instance.
62
* \param clazz specifies the class identifier.
64
* \param cdsType specifies CDS type.
66
HVideoItem(const QString& clazz = sClass(), CdsType cdsType = sType());
67
HVideoItem(HVideoItemPrivate&);
69
// Documented in HClonable
70
virtual HVideoItem* newInstance() const;
75
* \brief Creates a new instance.
77
* \param title specifies the title of the object.
79
* \param parentId specifies the ID of the object that contains this
80
* object. If the object has no parent, this has to be left empty.
82
* \param id specifies the ID of this object. If this is not specified,
83
* a unique identifier within the running process is created for the object.
89
const QString& parentId,
90
const QString& id = QString());
93
* \brief Destroys the instance.
95
virtual ~HVideoItem();
98
* \brief Returns the genres to which this item belongs.
100
* upnp:genre, ContentDirectory:3, Appendix B.4.1.
102
* \return The genres to which this item belongs.
106
QList<HGenre> genres() const;
109
* \brief Returns a few lines of description of the content item.
111
* upnp:longDescripion, ContentDirectory:3, Appendix B.7.2.
113
* \return a few lines of description of the content item.
115
* \sa setLongDescription()
117
QString longDescription() const;
120
* \brief Returns the producers of this item.
122
* upnp:producer, ContentDirectory:3, Appendix B.3.4.
124
* \return The producers of this item.
128
QStringList producers() const;
131
* \brief Returns the viewer ratings of this item.
133
* upnp:rating, ContentDirectory, Appendix B.8.9.
135
* \return The viewer ratings of this item.
139
QList<HRating> ratings() const;
142
* \brief Retrieves the actors of this item.
144
* upnp:actor, ContentDirectory:3, Appendix B.3.1.
146
* \return The actors of this item.
150
QList<HPersonWithRole> actors() const;
153
* \brief Returns the directors of this item.
155
* upnp:director, ContentDirectory:3, Appendix B.3.5.
157
* \return The directors of this item.
161
QStringList directors() const;
164
* \brief Returns a brief description of the content item.
166
* dc:description, ContentDirectory:3, Appendix B.7.1.
168
* \return a brief description of the content item.
170
* \sa setDescription()
172
QString description() const;
175
* \brief Returns the publishers of this item.
177
* dc:publisher, ContentDirectory:3, Appendix B.3.6.
179
* \return The publishers of this item.
181
* \sa setPublishers()
183
QStringList publishers() const;
186
* \brief Returns the languages used in the content.
188
* dc:language, ContentDirectory:3, Appendix B.7.7.
190
* \return The languages used in the content.
194
QStringList languages() const;
197
* \brief Returns the URLs of resources to which this object relates.
199
* dc:language, ContentDirectory:3, Appendix B.5.4.
201
* \return The URLs of resources to which this object relates.
205
QList<QUrl> relations() const;
208
* \brief Returns the number of times the content has been played.
210
* upnp:playbackCount, ContentDirectory:3, Appendix B.7.8.
212
* \return The number of times the content has been played.
214
* \sa setPlaybackCount()
216
qint32 playbackCount() const;
219
* \brief Returns the date time when the item was played last.
221
* upnp:lastPlaybackTime, ContentDirectory:3, Appendix B.7.9.
223
* \return The date time when the item was played last.
225
* \sa setLastPlaybackTime()
227
QDateTime lastPlaybackTime() const;
230
* \brief Returns the time offset within the content where the last playback
233
* upnp:lastPlaybackPosition, ContentDirectory:3, Appendix B.7.10.
235
* \return The time offset within the content where the last playback
238
* \sa setLastPlaybackPosition()
240
HContentDuration lastPlaybackPosition() const;
243
* \brief Returns the day of the week when the recording started.
245
* upnp:recordedDayOfWeek, ContentDirectory:3, Appendix B.7.13.
247
* \return The day of the week when the recording started.
249
* \sa setRecordedDayOfWeek()
251
HDayOfWeek recordedDayOfWeek() const;
254
* \brief Returns the ID of the srs:recordSchedule object that was used to
255
* create this recorded content.
257
* upnp:srsRecordScheduleID, ContentDirectory:3, Appendix B.7.14.
259
* \return The ID of the srs:recordSchedule object that was used to
260
* create this recorded content.
262
* \sa setSrsRecordScheduleId()
264
QString srsRecordScheduleId() const;
267
* \brief Specifies the genres to which this item belongs.
269
* \param arg specifies the genres to which this item belongs.
273
void setGenres(const QList<HGenre>& arg);
276
* \brief Specifies a few lines of description of the content item.
278
* \param arg specifies a few lines of description of the content item.
280
* \sa longDescription()
282
void setLongDescription(const QString& arg);
285
* \brief Sets the producers of this item.
287
* \param arg specifies the producers of this item.
291
void setProducers(const QStringList& arg);
294
* \brief Specifies the viewer ratings of this item.
296
* \param arg specifies the viewer ratings of this item.
300
void setRatings(const QList<HRating>& arg);
303
* \brief Sets the actors of this item.
305
* \param arg specifies the actors of this item.
309
void setActors(const QList<HPersonWithRole>& arg);
312
* \brief Sets the directors of this item.
314
* \param arg specifies the directors of this item.
318
void setDirectors(const QStringList& arg);
321
* \brief Specifies a brief description of the content item.
323
* \param arg specifies a brief description of the content item.
327
void setDescription(const QString& arg);
330
* \brief Sets the publishers of this item.
332
* \param arg specifies the publishers of this item.
336
void setPublishers(const QStringList& arg);
339
* \brief Specifies the languages used in the content.
341
* \param arg specifies the languages used in the content.
345
void setLanguages(const QStringList& arg);
348
* \brief Specifies the URLs of resources to which this object relates.
350
* \param arg specifies the URLs of resources to which this object relates.
354
void setRelations(const QList<QUrl>& arg);
357
* \brief Specifies the number of times the content has been played.
359
* \param arg specifies the number of times the content has been played.
361
* \sa playbackCount()
363
void setPlaybackCount(qint32 arg);
366
* \brief Specifies the date time when the item was played last.
368
* \param arg specifies the date time when the item was played last.
370
* \sa lastPlaybackTime()
372
void setLastPlaybackTime(const QDateTime& arg);
375
* \brief Specifies the time offset within the content where the last playback
378
* \param arg specifies the time offset within the content where the last playback
381
* \sa lastPlaybackPosition()
383
void setLastPlaybackPosition(const HContentDuration& arg);
386
* \brief Specifies the day of the week when the recording started.
388
* \param arg specifies the day of the week when the recording started.
390
* \sa recordedDayOfWeek()
392
void setRecordedDayOfWeek(HDayOfWeek arg);
395
* \brief Specifies the ID of the srs:recordSchedule object that was used to
396
* create this recorded content.
398
* \param arg specifies the ID of the srs:recordSchedule object that was used to
399
* create this recorded content.
401
* \sa srsRecordScheduleId()
403
void setSrsRecordScheduleId(const QString& arg);
406
* \brief Returns the CdsType value of this class.
408
* \return The CdsType value of this class.
410
inline static CdsType sType() { return VideoItem; }
413
* \brief Returns the class identifier specified by the AV Working Committee.
415
* \return The class identifier specified by the AV Working Committee.
417
inline static QString sClass() { return "object.item.videoItem"; }
420
* Creates a new instance with no title or parentID.
422
* \return a pointer to the newly created instance.
424
* \remarks the ownership of the object is transferred to the caller. Make sure
425
* to delete the object.
427
inline static HVideoItem* create() { return new HVideoItem(); }
434
#endif /* HVIDEOITEM_H_ */