summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/download.cpp
diff options
context:
space:
mode:
authorRuth Sadler <ext-ruth.sadler@nokia.com>2011-01-11 10:32:46 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-01-13 12:28:38 (GMT)
commit6f1f46c78ad43cad41d062efb96319c0548a6dbc (patch)
tree4cdf9c8f49f99911471b7fac3e634b8c7f0888ec /src/3rdparty/phonon/mmf/download.cpp
parentb2e59b7340b1198cc9eacca51172d51e8048d2a7 (diff)
downloadQt-6f1f46c78ad43cad41d062efb96319c0548a6dbc.zip
Qt-6f1f46c78ad43cad41d062efb96319c0548a6dbc.tar.gz
Qt-6f1f46c78ad43cad41d062efb96319c0548a6dbc.tar.bz2
Allow IAP to be selected in Phonon MMF backend
The Phonon API does not provide any way for the client to specify which network connection should be used for streaming playback. If the application already has a connection open, using a bearer other than the default (e.g. using WiFi when the device default is GPRS), it may be desirable to use it for streaming, rather than allowing the Phonon backend to open a second connection on the default bearer. This patch adds a custom property on the Phonon::MediaObject, called InternetAccessPointName. The client can specify the IAP which Phonon should use by setting this property. Note that support for this property is only provided in the Phonon MMF backend. Task-number: QTBUG-11436 Reviewed-by: Gareth Stockwell (cherry picked from commit 1640acce5ca8f49c5655edffa2a1108048c5a414)
Diffstat (limited to 'src/3rdparty/phonon/mmf/download.cpp')
-rw-r--r--src/3rdparty/phonon/mmf/download.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/3rdparty/phonon/mmf/download.cpp b/src/3rdparty/phonon/mmf/download.cpp
index 7b80e4a..de65811 100644
--- a/src/3rdparty/phonon/mmf/download.cpp
+++ b/src/3rdparty/phonon/mmf/download.cpp
@@ -20,6 +20,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "utils.h"
#include <QtCore/QDir>
#include <QtCore/private/qcore_symbian_p.h>
+#include <mmf/common/mmfcontrollerframeworkbase.h>
QT_BEGIN_NAMESPACE
@@ -43,7 +44,7 @@ DownloadPrivate::~DownloadPrivate()
m_downloadManager.Close();
}
-bool DownloadPrivate::start()
+bool DownloadPrivate::start(int iap)
{
TRACE_CONTEXT(DownloadPrivate::start, EVideoApi);
Q_ASSERT(!m_download);
@@ -54,6 +55,8 @@ bool DownloadPrivate::start()
TRACE("connect err %d", err);
if (KErrNone == err) {
// Start download
+ if (KUseDefaultIap != iap)
+ m_downloadManager.SetIntAttribute(EDlMgrIap, iap);
QHBufC url(m_parent->sourceUrl().toString());
TPtr8 url8 = url->Des().Collapse();
TRAP(err, m_download = &m_downloadManager.CreateDownloadL(url8));
@@ -140,12 +143,12 @@ const QString &Download::targetFileName() const
return m_targetFileName;
}
-void Download::start()
+void Download::start(int iap)
{
TRACE_CONTEXT(Download::start, EVideoApi);
TRACE_ENTRY_0();
Q_ASSERT(Idle == m_state);
- const bool ok = m_private->start();
+ const bool ok = m_private->start(iap);
setState(ok ? Initializing : Error);
TRACE_EXIT_0();
}