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/HImageItem>
39
* \brief This class represents a photo object.
41
* The class identifier specified by the AV Working Committee is
42
* \c object.item.imageItem.photo.
44
* \headerfile hphoto.h HPhoto
46
* \ingroup hupnp_av_cds_objects
48
* \remarks This class is not thread-safe.
50
class H_UPNP_AV_EXPORT HPhoto :
54
H_DISABLE_COPY(HPhoto)
55
H_DECLARE_PRIVATE(HPhoto)
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
HPhoto(const QString& clazz = sClass(), CdsType cdsType = sType());
70
HPhoto(HPhotoPrivate&);
72
// Documented in HClonable
73
virtual HPhoto* 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.
101
* \brief Returns the albums to which this item belongs.
103
* upnp:album, ContentDirectory:3, Appendix B.4.2.
105
* \return The albums to which this item belongs.
109
QStringList albums() const;
112
* \brief Specifies the albums to which this item belongs.
114
* \param arg the albums to which this item belongs.
118
void setAlbums(const QStringList& arg);
121
* \brief Returns the CdsType value of this class.
123
* \return The CdsType value of this class.
125
inline static CdsType sType() { return Photo; }
128
* \brief Returns the class identifier specified by the AV Working Committee.
130
* \return The class identifier specified by the AV Working Committee.
132
inline static QString sClass() { return "object.item.imageItem.photo"; }
135
* Creates a new instance with no title or parentID.
137
* \return a pointer to the newly created instance.
139
* \remarks the ownership of the object is transferred to the caller. Make sure
140
* to delete the object.
142
inline static HPhoto* create() { return new HPhoto(); }
149
#endif /* HPHOTO_H_ */