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 HAudioItemPrivate;
39
* \brief This class represents content that is intended for listening.
41
* The class identifier specified by the AV Working Committee is
42
* \c object.item.audioItem.
44
* \headerfile haudioitem.h HAudioItem
46
* \ingroup hupnp_av_cds_objects
48
* \remarks This class is not thread-safe.
50
class H_UPNP_AV_EXPORT HAudioItem :
54
H_DISABLE_COPY(HAudioItem)
55
H_DECLARE_PRIVATE(HAudioItem)
60
* Constructs a new instance.
62
* \param clazz specifies the UPnP class of the object. This cannot be empty.
64
* \param cdsType specifies the CDS type of the object. This cannot be
65
* HObject::UndefinedCdsType.
69
HAudioItem(const QString& clazz = sClass(), CdsType cdsType = sType());
70
HAudioItem(HAudioItemPrivate&);
72
// Documented in HClonable
73
virtual HAudioItem* newInstance() const;
78
* \brief Creates a new instance.
80
* \param title specifies the title of the object.
82
* \param parentId specifies the ID of the object that contains this
83
* object. If the object has no parent, this has to be left empty.
85
* \param id specifies the ID of this object. If this is not specified,
86
* a unique identifier within the running process is created for the object.
92
const QString& parentId,
93
const QString& id = QString());
96
* \brief Destroys the instance.
98
virtual ~HAudioItem();
101
* \brief Returns the genres to which this item belongs.
103
* upnp:genre, ContentDirectory:3, Appendix B.4.1.
105
* \return The genres to which this item belongs.
109
QList<HGenre> genres() const;
112
* \brief Returns a brief description of the content item.
114
* dc:description, ContentDirectory:3, Appendix B.7.1.
116
* \return a brief description of the content item.
118
* \sa setDescription()
120
QString description() const;
123
* \brief Returns a few lines of description of the content item.
125
* upnp:longDescripion, ContentDirectory:3, Appendix B.7.2.
127
* \return a few lines of description of the content item.
129
* \sa setLongDescription()
131
QString longDescription() const;
134
* \brief Returns the publishers of this item.
136
* dc:publisher, ContentDirectory:3, Appendix B.3.6.
138
* \return The publishers of this item.
140
* \sa setPublishers()
142
QStringList publishers() const;
145
* \brief Returns the languages used in the content.
147
* dc:language, ContentDirectory:3, Appendix B.7.7.
149
* \return The languages used in the content.
153
QStringList languages() const;
156
* \brief Returns the URLs of resources to which this object relates.
158
* dc:language, ContentDirectory:3, Appendix B.5.4.
160
* \return The URLs of resources to which this object relates.
164
QList<QUrl> relations() const;
167
* \brief Returns descriptive information of legal rights held in over this resource.
169
* dc:rights, ContentDirectory:3, Appendix B.7.5.
171
* \return descriptive information of legal rights held in over this resource.
175
QStringList rights() const;
178
* \brief Specifies the genres to which this item belongs.
180
* \param arg specifies the genres to which this item belongs.
184
void setGenres(const QList<HGenre>& arg);
187
* \brief Specifies a brief description of the content item.
189
* \param arg specifies a brief description of the content item.
193
void setDescription(const QString& arg);
196
* \brief Specifies a few lines of description of the content item.
198
* \param arg specifies a few lines of description of the content item.
200
* \sa longDescription()
202
void setLongDescription(const QString& arg);
205
* \brief Sets the publishers of this item.
207
* \param arg specifies the publishers of this item.
211
void setPublishers(const QStringList& arg);
214
* \brief Specifies the languages used in the content.
216
* \param arg specifies the languages used in the content.
220
void setLanguages(const QStringList& arg);
223
* \brief Specifies the URLs of resources to which this object relates.
225
* \param arg specifies the URLs of resources to which this object relates.
229
void setRelations(const QList<QUrl>& arg);
232
* \brief Specifies descriptive information of legal rights held in over this
235
* \param arg specifies descriptive information of legal rights held in
236
* over this resource.
240
void setRights(const QStringList& arg);
243
* \brief Returns the CdsType value of this class.
245
* \return The CdsType value of this class.
247
inline static CdsType sType() { return AudioItem; }
250
* \brief Returns the class identifier specified by the AV Working Committee.
252
* \return The class identifier specified by the AV Working Committee.
254
inline static QString sClass() { return "object.item.audioItem"; }
257
* Creates a new instance with no title or parentID.
259
* \return a pointer to the newly created instance.
261
* \remarks the ownership of the object is transferred to the caller. Make sure
262
* to delete the object.
264
inline static HAudioItem* create() { return new HAudioItem(); }
271
#endif /* HAUDIOITEM_H_ */