summaryrefslogtreecommitdiffstats
path: root/src/multimedia
diff options
context:
space:
mode:
authorNicholas Young <nicholas.young@nokia.com>2010-02-23 03:32:23 (GMT)
committerNicholas Young <nicholas.young@nokia.com>2010-02-23 03:32:23 (GMT)
commitf56a36d771bb71fe6d0f7025ae427a76a1d22324 (patch)
treec1e6d120b91d60a29c19faab277202a2480a958a /src/multimedia
parent0a83a6c571fadb454cb8711aed84258b061d44b5 (diff)
downloadQt-f56a36d771bb71fe6d0f7025ae427a76a1d22324.zip
Qt-f56a36d771bb71fe6d0f7025ae427a76a1d22324.tar.gz
Qt-f56a36d771bb71fe6d0f7025ae427a76a1d22324.tar.bz2
Added QNetworkRequest constructor to QMediaContent.
Now consistent with QMediaResource. Reviewed-by: Dmytro Poplavskiy
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/base/qmediacontent.cpp13
-rw-r--r--src/multimedia/base/qmediacontent.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/src/multimedia/base/qmediacontent.cpp b/src/multimedia/base/qmediacontent.cpp
index 3e32af0..fd519c6 100644
--- a/src/multimedia/base/qmediacontent.cpp
+++ b/src/multimedia/base/qmediacontent.cpp
@@ -109,6 +109,19 @@ QMediaContent::QMediaContent(const QUrl &url):
}
/*!
+ Constructs a media content with \a request providing a reference to the content.
+
+ This constructor can be used to reference media content via network protocols such as HTTP.
+ This may include additional information required to obtain the resource, such as Cookies or HTTP headers.
+*/
+
+QMediaContent::QMediaContent(const QNetworkRequest &request):
+ d(new QMediaContentPrivate)
+{
+ d->resources << QMediaResource(request);
+}
+
+/*!
Constructs a media content with \a resource providing a reference to the content.
*/
diff --git a/src/multimedia/base/qmediacontent.h b/src/multimedia/base/qmediacontent.h
index 1ea4898..b6f3017 100644
--- a/src/multimedia/base/qmediacontent.h
+++ b/src/multimedia/base/qmediacontent.h
@@ -46,6 +46,7 @@
#include <QtCore/qshareddata.h>
#include <QtMultimedia/qmediaresource.h>
+#include <QtNetwork/qnetworkrequest.h>
QT_BEGIN_HEADER
@@ -60,6 +61,7 @@ class Q_MULTIMEDIA_EXPORT QMediaContent
public:
QMediaContent();
QMediaContent(const QUrl &contentUrl);
+ QMediaContent(const QNetworkRequest &contentRequest);
QMediaContent(const QMediaResource &contentResource);
QMediaContent(const QMediaResourceList &resources);
QMediaContent(const QMediaContent &other);