qtmobility/src/multimedia/qmediacontent.cpp
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 5 453da2cfceef
--- a/qtmobility/src/multimedia/qmediacontent.cpp	Fri Apr 16 15:51:22 2010 +0300
+++ b/qtmobility/src/multimedia/qmediacontent.cpp	Mon May 03 13:18:40 2010 +0300
@@ -42,7 +42,7 @@
 #include <QtCore/qurl.h>
 #include <QtCore/qvariant.h>
 
-#include <qmediacontent.h>
+#include "qmediacontent.h"
 
 QTM_BEGIN_NAMESPACE
 
@@ -107,6 +107,19 @@
 }
 
 /*!
+    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.
 */
 
@@ -191,6 +204,15 @@
 }
 
 /*!
+    Returns a QNetworkRequest that represents that canonical resource for this media content.
+*/
+
+QNetworkRequest QMediaContent::canonicalRequest() const
+{
+    return canonicalResource().request();
+}
+
+/*!
     Returns a QMediaResource that represents that canonical resource for this media content.
 */