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 HMUSICGENRE_H_
23
#define HMUSICGENRE_H_
25
#include <HUpnpAv/HGenreContainer>
36
class HMusicGenrePrivate;
39
* \brief This class represents a \c genre \c container where the genre indicates a
40
* <em>style of music</em>.
42
* A musicGenre container can
43
* contain objects of class musicArtist, musicAlbum, audioItem or sub-musicgenres
44
* of the same class (for example, Rock contains Alternative Rock).
46
* The class identifier specified by the AV Working Committee is
47
* \c object.container.genre.musicGenre.
49
* \headerfile hmusicgenre.h HMusicGenre
51
* \ingroup hupnp_av_cds_objects
53
* \remarks This class is not thread-safe.
55
class H_UPNP_AV_EXPORT HMusicGenre :
56
public HGenreContainer
59
H_DISABLE_COPY(HMusicGenre)
60
H_DECLARE_PRIVATE(HMusicGenre)
65
* Constructs a new instance.
67
* \param clazz specifies the UPnP class of the object. This cannot be empty.
69
* \param cdsType specifies the CDS type of the object. This cannot be
70
* HObject::UndefinedCdsType.
74
HMusicGenre(const QString& clazz = sClass(), CdsType cdsType = sType());
75
HMusicGenre(HMusicGenrePrivate&);
77
// Documented in HClonable
78
virtual HMusicGenre* newInstance() const;
83
* \brief Creates a new instance.
85
* \param title specifies the title of the object.
87
* \param parentId specifies the ID of the object that contains this
88
* object. If the object has no parent, this has to be left empty.
90
* \param id specifies the ID of this object. If this is not specified,
91
* a unique identifier within the running process is created for the object.
97
const QString& parentId,
98
const QString& id = QString());
101
* \brief Destroys the instance.
103
virtual ~HMusicGenre();
106
* \brief Returns the CdsType value of this class.
108
* \return The CdsType value of this class.
110
inline static CdsType sType() { return MusicGenre; }
113
* \brief Returns the class identifier specified by the AV Working Committee.
115
* \return The class identifier specified by the AV Working Committee.
117
inline static QString sClass() { return "object.container.genre.musicGenre"; }
120
* Creates a new instance with no title or parentID.
122
* \return a pointer to the newly created instance.
124
* \remarks the ownership of the object is transferred to the caller. Make sure
125
* to delete the object.
127
inline static HMusicGenre* create() { return new HMusicGenre(); }
134
#endif /* HMUSICGENRE_H_ */