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

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/dlnaexport/extra/hupnp/src/dataelements/hserviceinfo.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) 2010, 2011 Tuomo Penttinen, all rights reserved.
 
3
 *
 
4
 *  Author: Tuomo Penttinen <tp@herqq.org>
 
5
 *
 
6
 *  This file is part of Herqq UPnP (HUPnP) library.
 
7
 *
 
8
 *  Herqq UPnP is free software: you can redistribute it and/or modify
 
9
 *  it under the terms of the GNU Lesser 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 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 Lesser General Public License for more details.
 
17
 *
 
18
 *  You should have received a copy of the GNU Lesser General Public License
 
19
 *  along with Herqq UPnP. If not, see <http://www.gnu.org/licenses/>.
 
20
 */
 
21
 
 
22
#ifndef HSERVICEINFO_H_
 
23
#define HSERVICEINFO_H_
 
24
 
 
25
#include <HUpnpCore/HUpnp>
 
26
 
 
27
#include <QtCore/QSharedDataPointer>
 
28
 
 
29
class QUrl;
 
30
class QString;
 
31
 
 
32
namespace Herqq
 
33
{
 
34
 
 
35
namespace Upnp
 
36
{
 
37
 
 
38
class HServiceInfoPrivate;
 
39
 
 
40
/*!
 
41
 * \brief This class is used to contain information of a UPnP service
 
42
 * found in a UPnP device description document.
 
43
 *
 
44
 * A device description defines a UPnP device and among other things,
 
45
 * the definition includes the declarations of the services the device contains.
 
46
 *
 
47
 * \headerfile hserviceinfo.h HServiceInfo
 
48
 *
 
49
 * \ingroup hupnp_common
 
50
 *
 
51
 * \remarks This class is not thread-safe.
 
52
 *
 
53
 * \sa HDeviceInfo, HActionInfo and HStateVariableInfo.
 
54
 */
 
55
class H_UPNP_CORE_EXPORT HServiceInfo
 
56
{
 
57
friend H_UPNP_CORE_EXPORT bool operator==(
 
58
    const HServiceInfo& obj1, const HServiceInfo& obj2);
 
59
 
 
60
private:
 
61
 
 
62
    QSharedDataPointer<HServiceInfoPrivate> h_ptr;
 
63
 
 
64
public:
 
65
 
 
66
    /*!
 
67
     * \brief Creates a new, empty instance.
 
68
     *
 
69
     * \sa isValid()
 
70
     */
 
71
    HServiceInfo();
 
72
 
 
73
    /*!
 
74
     * Constructs a new instance from the specified parameters that the UDA
 
75
     * specification mandates for a UPnP service.
 
76
     *
 
77
     * The parameters the constructor expects are arguments defined in the
 
78
     * device description document and they are all mandatory for a valid
 
79
     * UPnP service.
 
80
     *
 
81
     * \param serviceId specifies the identifier of the service.
 
82
     *
 
83
     * \param serviceType specifies the type of the service.
 
84
     *
 
85
     * \param controlUrl specifies the URL for control.
 
86
     *
 
87
     * \param eventSubUrl specifies the URL for eventing.
 
88
     *
 
89
     * \param scpdUrl specifies the URL for service description.
 
90
     *
 
91
     * \param incReq specifies whether the service is required or optional.
 
92
     * This parameter is optional.
 
93
     *
 
94
     * \param checkLevel specifies the level of strictness used in validating
 
95
     * the specified arguments. This parameter is optional.
 
96
     *
 
97
     * \param err specifies a pointer to a \c QString that will contain
 
98
     * an error description in case the construction failed. This is optional.
 
99
     *
 
100
     * \remarks in case any of the provided arguments does not meet the
 
101
     * specified requirements, the created object is \e invalid.
 
102
     *
 
103
     * \sa isValid()
 
104
     */
 
105
    HServiceInfo(
 
106
        const HServiceId& serviceId,
 
107
        const HResourceType& serviceType,
 
108
        const QUrl& controlUrl,
 
109
        const QUrl& eventSubUrl,
 
110
        const QUrl& scpdUrl,
 
111
        HInclusionRequirement incReq = InclusionMandatory,
 
112
        HValidityCheckLevel checkLevel = StrictChecks,
 
113
        QString* err = 0);
 
114
 
 
115
    /*!
 
116
     * \brief Destroys the instance.
 
117
     */
 
118
    ~HServiceInfo();
 
119
 
 
120
    /*!
 
121
     * \brief Copy constructor.
 
122
     *
 
123
     * Copies the contents of the \c other to this.
 
124
     *
 
125
     * \param other specifies the object to be copied.
 
126
     */
 
127
    HServiceInfo(const HServiceInfo& other);
 
128
 
 
129
    /*!
 
130
     * \brief Assignment operator.
 
131
     *
 
132
     * Assigns the contents of the other to this.
 
133
     *
 
134
     * \param other specifies the object to be copied.
 
135
     */
 
136
    HServiceInfo& operator=(const HServiceInfo& other);
 
137
 
 
138
    /*!
 
139
     * \brief Indicates if the object is valid.
 
140
     *
 
141
     * A valid object contains the mandatory data of a UPnP service.
 
142
     *
 
143
     * \param level specifies the level of strictness used in validating
 
144
     * the object. This parameter is optional and the default level is strict.
 
145
     *
 
146
     * \return \e true in case the object is valid.
 
147
     */
 
148
    bool isValid(HValidityCheckLevel level) const;
 
149
 
 
150
    /*!
 
151
     * \brief Returns the service identifier found in the device description file.
 
152
     *
 
153
     * \return The service identifier found in the device description file.
 
154
     */
 
155
    const HServiceId& serviceId() const;
 
156
 
 
157
    /*!
 
158
     * \brief Returns the type of the service found in the device description file.
 
159
     *
 
160
     * \return The type of the service found in the device description file.
 
161
     */
 
162
    const HResourceType& serviceType() const;
 
163
 
 
164
    /*!
 
165
     * \brief Returns the URL for service description.
 
166
     *
 
167
     * This is the URL where the service description can be retrieved.
 
168
     * This is defined in the device description.
 
169
     *
 
170
     * \return The URL for service description.
 
171
     */
 
172
    QUrl scpdUrl() const;
 
173
 
 
174
    /*!
 
175
     * \brief Returns the URL for control.
 
176
     *
 
177
     * This is the URL to which the action invocations must be sent.
 
178
     * This is defined in the device description.
 
179
     *
 
180
     * \return The URL for control.
 
181
     */
 
182
    QUrl controlUrl() const;
 
183
 
 
184
    /*!
 
185
     * \brief Returns the URL for eventing.
 
186
     *
 
187
     * This is the URL to which subscriptions and un-subscriptions are sent.
 
188
     * This is defined in the device description.
 
189
     *
 
190
     * \return The URL for eventing.
 
191
     */
 
192
    QUrl eventSubUrl() const;
 
193
 
 
194
    /*!
 
195
     * \brief Indicates whether the service is required or optional.
 
196
     *
 
197
     * \return value indicating whether the service is required or optional.
 
198
     */
 
199
    HInclusionRequirement inclusionRequirement() const;
 
200
};
 
201
 
 
202
/*!
 
203
 * Compares the two objects for equality.
 
204
 *
 
205
 * \return \e true in case the objects are logically equivalent.
 
206
 *
 
207
 * \relates HServiceInfo
 
208
 */
 
209
H_UPNP_CORE_EXPORT bool operator==(const HServiceInfo&, const HServiceInfo&);
 
210
 
 
211
/*!
 
212
 * Compares the two objects for inequality.
 
213
 *
 
214
 * \return \e true in case the objects are not logically equivalent.
 
215
 *
 
216
 * \relates HServiceInfo
 
217
 */
 
218
inline bool operator!=(const HServiceInfo& obj1, const HServiceInfo& obj2)
 
219
{
 
220
    return !(obj1 == obj2);
 
221
}
 
222
 
 
223
}
 
224
}
 
225
 
 
226
#endif /* HSERVICEINFO_H_ */