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

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/dlnaexport/extra/hupnp_av/src/cds_model/cds_objects/hitem.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 HITEM_H_
 
23
#define HITEM_H_
 
24
 
 
25
#include <HUpnpAv/HObject>
 
26
 
 
27
namespace Herqq
 
28
{
 
29
 
 
30
namespace Upnp
 
31
{
 
32
 
 
33
namespace Av
 
34
{
 
35
 
 
36
class HItemPrivate;
 
37
 
 
38
/*!
 
39
 * \brief This class is used to represent individual content objects.
 
40
 *
 
41
 * \brief This class represents \e individual content objects, which refers to
 
42
 * objects that cannot contain other objects. For instance, such an item is a
 
43
 * a music track or a photo. The class identifier specified by the AV Working
 
44
 * Committee is \c object.item.
 
45
 *
 
46
 * \headerfile hitem.h HItem
 
47
 *
 
48
 * \ingroup hupnp_av_cds_objects
 
49
 *
 
50
 * \remarks This class is not thread-safe.
 
51
 */
 
52
class H_UPNP_AV_EXPORT HItem :
 
53
    public HObject
 
54
{
 
55
Q_OBJECT
 
56
H_DISABLE_COPY(HItem)
 
57
H_DECLARE_PRIVATE(HItem)
 
58
 
 
59
protected:
 
60
 
 
61
    /*!
 
62
     * Constructs a new instance.
 
63
     *
 
64
     * \param clazz specifies the UPnP class of the object. This cannot be empty.
 
65
     *
 
66
     * \param cdsType specifies the CDS type of the object. This cannot be
 
67
     * HObject::UndefinedCdsType.
 
68
     *
 
69
     * \sa isInitialized()
 
70
     */
 
71
    HItem(const QString& clazz = sClass(), CdsType cdsType = sType());
 
72
 
 
73
    //
 
74
    // \internal
 
75
    //
 
76
    HItem(HItemPrivate& dd);
 
77
 
 
78
    // Documented in HClonable
 
79
    virtual HItem* newInstance() const;
 
80
 
 
81
public:
 
82
 
 
83
    /*!
 
84
     * \brief Creates a new instance.
 
85
     *
 
86
     * \param title specifies the title of the object.
 
87
     *
 
88
     * \param parentId specifies the ID of the object that contains this
 
89
     * object. If the object has no parent, this has to be left empty.
 
90
     *
 
91
     * \param id specifies the ID of this object. If this is not specified,
 
92
     * a unique identifier within the running process is created for the object.
 
93
     *
 
94
     * \sa isValid()
 
95
     */
 
96
    HItem(
 
97
        const QString& title,
 
98
        const QString& parentId = QString(),
 
99
        const QString& id = QString());
 
100
 
 
101
    /*!
 
102
     * \brief Destroys the instance.
 
103
     */
 
104
    virtual ~HItem();
 
105
 
 
106
    /*!
 
107
     * \brief Returns the bookmark IDs.
 
108
     *
 
109
     * As defined in the ContentDirectory:3 specification, this is an object ID
 
110
     * of a bookmark item that is associated with this content item and that
 
111
     * marks a specific location with its content.
 
112
     *
 
113
     * upnp:bookmarkID, ContentDirectory:3, Appendix B.13.2.
 
114
     *
 
115
     * \return The bookmark IDs.
 
116
     *
 
117
     * \sa setBookmarkIds()
 
118
     */
 
119
    QStringList bookmarkIds() const;
 
120
 
 
121
    /*!
 
122
     * \brief Returns the ID of the referenced item in case this item is a reference
 
123
     * item.
 
124
     *
 
125
     * \return The ID of the referenced item in case this item is a reference
 
126
     * item. Otherwise the return value is empty.
 
127
     *
 
128
     * \sa setRefId()
 
129
     */
 
130
    QString refId() const;
 
131
 
 
132
    /*!
 
133
     * \brief Indicates if the item is a reference item.
 
134
     *
 
135
     * \return \e true in case the item is a reference item.
 
136
     */
 
137
    bool isRef() const;
 
138
 
 
139
    /*!
 
140
     * Checks if any of the HResource objects contained by this item has
 
141
     * specified a MIME type.
 
142
     *
 
143
     * \return \e true in case any of the HResource objects contained by this
 
144
     * item has specified a MIME type.
 
145
     */
 
146
    bool hasContentFormat() const;
 
147
 
 
148
    /*!
 
149
     * \brief Specifies the book mark IDs.
 
150
     *
 
151
     * \param bookmarkId specifies the book mark IDs.
 
152
     *
 
153
     * \sa bookmarkIds()
 
154
     */
 
155
    void setBookmarkIds(const QStringList& bookmarkIds);
 
156
 
 
157
    /*!
 
158
     * \brief Specifies the ID that this item references.
 
159
     *
 
160
     * \param referenceId specifies the ID that this item references.
 
161
     */
 
162
    void setRefId(const QString& referenceId);
 
163
 
 
164
    /*!
 
165
     * Modifies the HResource objects contained by this item to contain the
 
166
     * specified MIME type.
 
167
     *
 
168
     * This is a convenience method for modifying the content format of
 
169
     * HProtocolInfo objects contained by the HResource objects.
 
170
     *
 
171
     * \param mimeType specifies the MIME type to be set to the contained
 
172
     * HResource objects.
 
173
     *
 
174
     * \sa resources()
 
175
     */
 
176
    void setContentFormat(const QString& mimeType);
 
177
 
 
178
    /*!
 
179
     * \brief Returns the class identifier specified by the AV Working Committee.
 
180
     *
 
181
     * \return The class identifier specified by the AV Working Committee.
 
182
     */
 
183
    inline static QString sClass() { return "object.item"; }
 
184
 
 
185
    /*!
 
186
     * \brief Returns the CdsType value of this class.
 
187
     *
 
188
     * \return The CdsType value of this class.
 
189
     */
 
190
    inline static CdsType sType() { return Item; }
 
191
 
 
192
    /*!
 
193
     * Creates a new instance with no title or parentID.
 
194
     *
 
195
     * \return a pointer to the newly created instance.
 
196
     *
 
197
     * \remarks the ownership of the object is transferred to the caller. Make sure
 
198
     * to delete the object.
 
199
     */
 
200
    inline static HItem* create() { return new HItem(); }
 
201
};
 
202
 
 
203
}
 
204
}
 
205
}
 
206
 
 
207
#endif /* HITEM_H_ */