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 HVIDEOBROADCAST_H_
23
#define HVIDEOBROADCAST_H_
25
#include <HUpnpAv/HVideoItem>
36
class HVideoBroadcastPrivate;
39
* \brief This class represents a continuous stream from a video broadcast.
41
* The class identifier specified by the AV Working Committee is
42
* \c object.item.videoItem.videoBroadcast.
44
* \headerfile hvideobroadcast.h HVideoBroadcast
46
* \ingroup hupnp_av_cds_objects
48
* \remarks This class is not thread-safe.
50
class H_UPNP_AV_EXPORT HVideoBroadcast :
54
H_DISABLE_COPY(HVideoBroadcast)
55
H_DECLARE_PRIVATE(HVideoBroadcast)
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
HVideoBroadcast(const QString& clazz = sClass(), CdsType cdsType = sType());
70
HVideoBroadcast(HVideoBroadcastPrivate&);
72
// Documented in HClonable
73
virtual HVideoBroadcast* 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 ~HVideoBroadcast();
101
* \brief Returns a location to an icon that can be used as a descriptive short-cut
102
* to display the content.
104
* upnp:icon, ContentDirectory:3, Appendix B.7.3.
106
* \return a location to an icon that can be used as a descriptive short-cut
107
* to display the content.
114
* \brief Returns some information of the region, associated with the source of the
117
* upnp:region, ContentDirectory, Appendix B.7.4.
119
* \return some information of the region, associated with the source of the
124
QString region() const;
127
* \brief Returns the number of the broadcast channel.
129
* upnp:channelNr, ContentDirectory, Appendix B.11.1.
131
* \return The number of the broadcast channel.
135
qint32 channelNr() const;
138
* \brief Returns the relative strength of the signal that is used to retrieve
139
* the content of the item.
141
* upnp:signalStrenth, ContentDirectory, Appendix B.12.1.
143
* \return The relative strength of the signal that is used to retrieve
144
* the content of the item.
146
* \sa setSignalStrength()
148
qint32 signalStrength() const;
151
* \brief Indicates whether the signal strength is sufficient for a hardware to
152
* lock onto the signal at the current frequency.
154
* upnp:signalLocked, ContentDirectory, Appendix B.12.2.
156
* \return \e true if the signal strength is sufficient for a hardware to
157
* lock onto the signal at the current frequency.
159
* \sa setSignalLocked()
161
bool signalLocked() const;
164
* \brief Indicates whether a hardware resource is currently tuned to retrieve
165
* the content represented by this item.
167
* upnp:tuned, ContentDirectory, Appendix B.12.3.
169
* \return \e true if a hardware resource is currently tuned to retrieve
170
* the content represented by this item.
177
* \brief Indicates if the object can be used for recording purposes.
179
* upnp:recordable, ContentDirectory:3, Appendix B.7.16.
181
* \return \e true if the content represented by this object can potentially
182
* be used for recording purposes.
184
* \sa setRecordable()
186
bool recordable() const;
189
* \brief Returns the broadcast station call sign of the associated broadcast
192
* upnp:callSign, ContentDirectory:3, Appendix B.9.2.
194
* \return The broadcast station call sign of the associated broadcast
199
QString callSign() const;
202
* \brief Returns the price of the content item.
204
* upnp:price, ContentDirectory:3, Appendix B.9.5.
206
* \return The price of the content item.
210
HPrice price() const;
213
* \brief Indicates whether the content is pay-per-view.
215
* upnp:payPerView, ContentDirectory:3, Appendix B.9.6.
217
* \return \e true if the content is pay-per-view.
219
* \sa setPayPerView()
221
bool payPerView() const;
224
* \brief Specifies a location to an icon that can be used as a descriptive short-cut
225
* to display the content.
227
* \param arg specifies a location to an icon that can be used as a descriptive short-cut
228
* to display the content.
232
void setIcon(const QUrl& arg);
235
* \brief Specifies some information of the region, associated with the source of the
238
* \param arg specifies some information of the region, associated with the source of the
243
void setRegion(const QString& arg);
246
* \brief Specifies the number of the broadcast channel.
248
* \param arg specifies the number of the broadcast channel.
252
void setChannelNr(qint32 arg);
255
* \brief Specifies the relative strength of the signal that is used to retrieve
256
* the content of the item.
258
* \param arg specifies the relative strength of the signal that is used to retrieve
259
* the content of the item.
261
* \sa signalStrength()
263
void setSignalStrength(qint32 arg);
266
* \brief Specifies whether the signal strength is sufficient for a hardware to
267
* lock onto the signal at the current frequency.
269
* \param arg specifies whether the signal strength is sufficient for a hardware to
270
* lock onto the signal at the current frequency.
274
void setSignalLocked(bool arg);
277
* \brief Specifies whether a hardware resource is currently tuned to retrieve
278
* the content represented by this item.
280
* \param arg specifies whether a hardware resource is currently tuned to retrieve
281
* the content represented by this item.
285
void setTuned(bool arg);
288
* \brief Specifies whether the object can be used for recording purposes.
290
* \param arg specifies whether the object can be used for recording purposes.
294
void setRecordable(bool arg);
297
* \brief Specifies the broadcast station call sign of the associated broadcast
300
* \param arg specifies the broadcast station call sign of the associated broadcast
305
void setCallSign(const QString& arg);
308
* \brief Specifies the price of the content item.
310
* \param arg specifies the price of the content item.
314
void setPrice(const HPrice& arg);
317
* \brief Specifies whether the content is pay-per-view.
319
* \param arg specifies whether the content is pay-per-view.
323
void setPayPerView(bool arg);
326
* \brief Returns the CdsType value of this class.
328
* \return The CdsType value of this class.
330
inline static CdsType sType() { return VideoBroadcast; }
333
* \brief Returns the class identifier specified by the AV Working Committee.
335
* \return The class identifier specified by the AV Working Committee.
337
inline static QString sClass() { return "object.item.videoItem.videoBroadcast"; }
340
* Creates a new instance with no title or parentID.
342
* \return a pointer to the newly created instance.
344
* \remarks the ownership of the object is transferred to the caller. Make sure
345
* to delete the object.
347
inline static HVideoBroadcast* create() { return new HVideoBroadcast(); }
354
#endif /* HVIDEOBROADCAST_H_ */