summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex <qt-info@nokia.com>2010-10-01 08:42:53 +1000
committerAlex <qt-info@nokia.com>2010-10-01 08:56:32 +1000
commit92c3249a08acc11961e9996d2849576c568dd58b (patch)
treea07f0684a96c82ded45ba8d13f1639e8a250d839
parentf2b6d463f59e1ed05cbe230a2d1645500c878281 (diff)
convert CRLF->LF
(cherry picked from commit 0c10dc63dff24f2cd628603807c8104d81a7a701)
-rw-r--r--plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_symbian.pkg68
-rw-r--r--plugins/feedback/symbian/qfeedback.cpp844
-rw-r--r--plugins/multimedia/symbian/openmaxal/mediaplayer/qxaplaysession.cpp1188
-rw-r--r--plugins/organizer/symbian/local_calenmulticaluids.hrh74
-rw-r--r--plugins/organizer/symbian/resetanddestroy.h150
-rw-r--r--plugins/organizer/symbian/transform/organizeritemremindertransform.h112
6 files changed, 1218 insertions, 1218 deletions
diff --git a/plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_symbian.pkg b/plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_symbian.pkg
index 9eddbb5872..47ea073626 100644
--- a/plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_symbian.pkg
+++ b/plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_symbian.pkg
@@ -1,34 +1,34 @@
-; Language
-&EN
-
-
-; SIS header: name, uid, version
-#{"ut_symbian"},(0xEb2c2a15),1,0,0
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-
-; Manual PKG pre-rules from PRO files
-; Default dependency to Qt libraries
-(0x2001E61C), 4, 7, 0, {"Qt"}
-; Default HW/platform dependencies
-[0x101F7961],0,0,0,{"S60ProductID"}
-[0x102032BE],0,0,0,{"S60ProductID"}
-[0x102752AE],0,0,0,{"S60ProductID"}
-[0x1028315F],0,0,0,{"S60ProductID"}
-[0x20022e6d],0,0,0,{"S60ProductID"}
-
-; Default dependency to QtMobility libraries
-(0x2002AC89), 1, 0, 2, {"QtMobility"}
-
-; Executable and default resource files
-"/epoc32/release/armv5/urel/ut_symbian.exe" - "!:\sys\bin\ut_symbian.exe"
-"/epoc32/data/z/resource/apps/ut_symbian.rsc" - "!:\resource\apps\ut_symbian.rsc"
-"/epoc32/data/z/private/10003a3f/import/apps/ut_symbian_reg.rsc" - "!:\private\10003a3f\import\apps\ut_symbian_reg.rsc"
-"/epoc32/winscw/c/filtering/test_data.txt" - "c:\filtering\test_data.txt"
-
-; Manual PKG post-rules from PRO files
+; Language
+&EN
+
+
+; SIS header: name, uid, version
+#{"ut_symbian"},(0xEb2c2a15),1,0,0
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+
+; Manual PKG pre-rules from PRO files
+; Default dependency to Qt libraries
+(0x2001E61C), 4, 7, 0, {"Qt"}
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+[0x20022e6d],0,0,0,{"S60ProductID"}
+
+; Default dependency to QtMobility libraries
+(0x2002AC89), 1, 0, 2, {"QtMobility"}
+
+; Executable and default resource files
+"/epoc32/release/armv5/urel/ut_symbian.exe" - "!:\sys\bin\ut_symbian.exe"
+"/epoc32/data/z/resource/apps/ut_symbian.rsc" - "!:\resource\apps\ut_symbian.rsc"
+"/epoc32/data/z/private/10003a3f/import/apps/ut_symbian_reg.rsc" - "!:\private\10003a3f\import\apps\ut_symbian_reg.rsc"
+"/epoc32/winscw/c/filtering/test_data.txt" - "c:\filtering\test_data.txt"
+
+; Manual PKG post-rules from PRO files
diff --git a/plugins/feedback/symbian/qfeedback.cpp b/plugins/feedback/symbian/qfeedback.cpp
index 3442b460b5..055a5a3177 100644
--- a/plugins/feedback/symbian/qfeedback.cpp
+++ b/plugins/feedback/symbian/qfeedback.cpp
@@ -1,422 +1,422 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qfeedbackactuator.h>
-#include "qfeedback.h"
-#include <QtCore/QVariant>
-#include <QtCore/QtPlugin>
-#include <QtGui/QApplication>
-
-Q_EXPORT_PLUGIN2(feedback_symbian, QFeedbackSymbian)
-
-
-
-#define VIBRA_DEVICE 0
-#define TOUCH_DEVICE 1 //this one is only available if ADVANCED_TACTILE_SUPPORT is defined
-
-
-//TODO: is activeWindow good enough
-//or should we create a widget for that?
-CCoeControl *QFeedbackSymbian::defaultWidget()
-{
- QWidget *w = QApplication::activeWindow();
- return w ? w->winId() : 0;
-}
-
-#ifndef NO_TACTILE_SUPPORT
-#include <touchfeedback.h>
-
-static MTouchFeedback *touchInstance()
-{
- static MTouchFeedback *ret = 0;
- if (!ret) {
- QT_TRAP_THROWING(
- ret = MTouchFeedback::Instance();
- if (!ret)
- ret = MTouchFeedback::CreateInstanceL();
- )
- }
- return ret;
-}
-
-static TTouchLogicalFeedback convertToSymbian(QFeedbackEffect::ThemeEffect effect)
-{
-
- TTouchLogicalFeedback themeFeedbackSymbian = ETouchFeedbackBasic;
-
- switch (effect) {
- case QFeedbackEffect::ThemeBasic:
- themeFeedbackSymbian = ETouchFeedbackBasic;
- break;
- case QFeedbackEffect::ThemeSensitive:
- themeFeedbackSymbian = ETouchFeedbackSensitive;
- break;
-#ifdef ADVANCED_TACTILE_SUPPORT
- case QFeedbackEffect::ThemeBasicButton:
- themeFeedbackSymbian = ETouchFeedbackBasicButton;
- break;
- case QFeedbackEffect::ThemeSensitiveButton:
- themeFeedbackSymbian = ETouchFeedbackSensitiveButton;
- break;
- case QFeedbackEffect::ThemeBasicItem:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeSensitiveItem:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeBounceEffect:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemePopupOpen:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemePopupClose:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeBasicSlider:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeSensitiveSlider:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeStopFlick:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeFlick:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeEditor:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeTextSelection:
- themeFeedbackSymbian = ETouchFeedbackTextSelection;
- break;
- case QFeedbackEffect::ThemeBlankSelection:
- themeFeedbackSymbian = ETouchFeedbackBlankSelection;
- break;
- case QFeedbackEffect::ThemeLineSelection:
- themeFeedbackSymbian = ETouchFeedbackLineSelection;
- break;
- case QFeedbackEffect::ThemeEmptyLineSelection:
- themeFeedbackSymbian = ETouchFeedbackEmptyLineSelection;
- break;
- case QFeedbackEffect::ThemeCheckBox:
- themeFeedbackSymbian = ETouchFeedbackCheckbox;
- break;
- case QFeedbackEffect::ThemeMultipleCheckBox:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeSensitiveKeypad:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeBasicKeypad:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeMultitouchActivate:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeRotateStep:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeItemDrop:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeItemMoveOver:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeItemPick:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemeItemScroll:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
- case QFeedbackEffect::ThemePopUp:
- themeFeedbackSymbian = ETouchFeedbackPopUp;
- break;
- case QFeedbackEffect::ThemeLongPress:
- themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
- break;
-#endif //ADVANCED_TACTILE_SUPPORT
- default:
- break;
- }
- return themeFeedbackSymbian;
-}
-
-// This define is for the second parameter of StartFeedback, which needs to be of type
-// TTouchContinuousFeedback in platforms with ADVANCED_TACTILE_SUPPORT
-#define DEFAULT_CONTINUOUS_EFFECT ETouchContinuousSmooth
-
-bool QFeedbackSymbian::play(QFeedbackEffect::ThemeEffect effect)
-{
- TInt err = KErrNone;
- TRAP(err, touchInstance()->InstantFeedback(convertToSymbian(effect)));
- return err == KErrNone;
-}
-
-#endif //NO_TACTILE_SUPPORT
-
-QFeedbackInterface::PluginPriority QFeedbackSymbian::pluginPriority()
-{
- return PluginLowPriority;
-}
-
-QFeedbackSymbian::QFeedbackSymbian() : m_vibra(0), m_vibraActive(true)
-{
-}
-
-QFeedbackSymbian::~QFeedbackSymbian()
-{
- delete m_vibra;
-}
-
-CHWRMVibra *QFeedbackSymbian::vibra()
-{
- if (!m_vibra)
- QT_TRAP_THROWING(m_vibra = CHWRMVibra::NewL());
-
- return m_vibra;
-}
-
-QList<QFeedbackActuator> QFeedbackSymbian::actuators()
-{
- QList<QFeedbackActuator> ret;
-#ifdef ADVANCED_TACTILE_SUPPORT
- //if we don't have advanced tactile support then the MTouchFeedback doesn't really support custom effects
- bool touch = false;
- TRAP_IGNORE(touch = touchInstance()->TouchFeedbackSupported());
- if (touch) {
- ret << createFeedbackActuator(TOUCH_DEVICE);
- }
-#endif //ADVANCED_TACTILE_SUPPORT
- ret << createFeedbackActuator(VIBRA_DEVICE);
- return ret;
-}
-
-void QFeedbackSymbian::setActuatorProperty(const QFeedbackActuator &actuator, ActuatorProperty prop, const QVariant &value)
-{
- switch(prop)
- {
- case Enabled:
- switch(actuator.id())
- {
- case VIBRA_DEVICE:
- m_vibraActive = value.toBool();
- break;
-#ifdef ADVANCED_TACTILE_SUPPORT
- case TOUCH_DEVICE:
- TRAP_IGNORE(touchInstance()->SetFeedbackEnabledForThisApp(value.toBool()));
- break;
-#endif
- default:
- break;
- }
- }
-}
-
-QVariant QFeedbackSymbian::actuatorProperty(const QFeedbackActuator &actuator, ActuatorProperty prop)
-{
- switch(prop)
- {
- case Name:
- switch(actuator.id())
- {
- case VIBRA_DEVICE:
- return QLatin1String("Vibra");
- case TOUCH_DEVICE:
- return QLatin1String("Touch");
- default:
- return QString();
- }
- case State:
- {
- QFeedbackActuator::State ret = QFeedbackActuator::Unknown;
- switch(actuator.id())
- {
- case VIBRA_DEVICE:
- {
- TInt status = 0;
- TRAP_IGNORE(status = vibra()->VibraStatus());
- switch (status)
- {
- case CHWRMVibra::EVibraStatusStopped:
- return QFeedbackActuator::Ready;
- case CHWRMVibra::EVibraStatusOn:
- return QFeedbackActuator::Busy;
- default:
- return QFeedbackActuator::Unknown;
- }
- }
- case TOUCH_DEVICE:
- //there is no way of getting the state of the device!
- default:
- return QFeedbackActuator::Unknown;
- }
- return ret;
- }
- case Enabled:
- switch(actuator.id())
- {
- case VIBRA_DEVICE:
- return m_vibraActive;
-#ifdef ADVANCED_TACTILE_SUPPORT
- case TOUCH_DEVICE:
- {
- bool ret = false;
- TRAP_IGNORE(ret = touchInstance()->FeedbackEnabledForThisApp());
- return ret;
- }
-#endif
- default:
- return false;
- }
- default:
- return QVariant();
- }
-
-}
-
-bool QFeedbackSymbian::isActuatorCapabilitySupported(const QFeedbackActuator &, QFeedbackActuator::Capability)
-{
- return false;
-}
-
-
-void QFeedbackSymbian::updateEffectProperty(const QFeedbackHapticsEffect *effect, EffectProperty prop)
-{
- TInt err = KErrNone;
- switch(prop)
- {
- case Intensity:
- if (!m_elapsed.contains(effect) || m_elapsed[effect].isPaused())
- break;
-
- switch(effect->actuator().id())
- {
- case VIBRA_DEVICE:
- TRAP(err, vibra()->StartVibraL(effect->duration() - m_elapsed[effect].elapsed(), qRound(100 * effect->intensity())));
- break;
-#ifdef ADVANCED_TACTILE_SUPPORT
- case TOUCH_DEVICE:
- TRAP(err, touchInstance()->ModifyFeedback(defaultWidget(), qRound(100 * effect->intensity())));
- break;
-#endif //ADVANCED_TACTILE_SUPPORT
- default:
- break;
- }
- break;
-
- }
- if (err != KErrNone)
- reportError(effect, QFeedbackEffect::UnknownError);
-}
-
-void QFeedbackSymbian::setEffectState(const QFeedbackHapticsEffect *effect, QFeedbackEffect::State newState)
-{
- TInt err = KErrNone;
- switch(effect->actuator().id())
- {
- case VIBRA_DEVICE:
- switch(newState)
- {
- case QFeedbackEffect::Stopped:
- if (m_elapsed.contains(effect)) {
- TRAP(err, vibra()->StopVibraL());
- m_elapsed.remove(effect);
- }
- break;
- case QFeedbackEffect::Paused:
- if (m_elapsed.contains(effect)) {
- TRAP(err, vibra()->StopVibraL());
- m_elapsed[effect].pause();
- }
- break;
- case QFeedbackEffect::Running:
- if (m_elapsed[effect].elapsed() >= effect->duration())
- m_elapsed.remove(effect); //we reached the end. it's time to restart
- TRAP(err, vibra()->StartVibraL(effect->duration() - m_elapsed[effect].elapsed(), qRound(100 * effect->intensity())));
- m_elapsed[effect].start();
- break;
- }
- break;
-#ifdef ADVANCED_TACTILE_SUPPORT
- case TOUCH_DEVICE:
- switch(newState)
- {
- case QFeedbackEffect::Stopped:
- if (m_elapsed.contains(effect)) {
- TRAP(err, touchInstance()->StopFeedback(defaultWidget()));
- m_elapsed.remove(effect);
- }
- break;
- case QFeedbackEffect::Paused:
- if (m_elapsed.contains(effect)) {
- TRAP(err, touchInstance()->StopFeedback(defaultWidget()));
- m_elapsed[effect].pause();
- }
- break;
- case QFeedbackEffect::Running:
- if (m_elapsed[effect].elapsed() >= effect->duration())
- m_elapsed.remove(effect); //we reached the end. it's time to restart
- TRAP(err, touchInstance()->StartFeedback(defaultWidget(),
- DEFAULT_CONTINUOUS_EFFECT,
- 0, qRound(effect->intensity() * 100), qMax(0, (effect->duration() - m_elapsed[effect].elapsed()) * 1000)));
- m_elapsed[effect].start();
- break;
- }
- break;
-#endif //ADVANCED_TACTILE_SUPPORT
- default:
- break;
- }
- if (err != KErrNone)
- reportError(effect, QFeedbackEffect::UnknownError);
-}
-
-QFeedbackEffect::State QFeedbackSymbian::effectState(const QFeedbackHapticsEffect *effect)
-{
- if (m_elapsed.contains(effect) && m_elapsed[effect].elapsed() < effect->duration()) {
-
- return m_elapsed[effect].isPaused() ? QFeedbackEffect::Paused : QFeedbackEffect::Running;
- }
-
- return QFeedbackEffect::Stopped;
-}
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qfeedbackactuator.h>
+#include "qfeedback.h"
+#include <QtCore/QVariant>
+#include <QtCore/QtPlugin>
+#include <QtGui/QApplication>
+
+Q_EXPORT_PLUGIN2(feedback_symbian, QFeedbackSymbian)
+
+
+
+#define VIBRA_DEVICE 0
+#define TOUCH_DEVICE 1 //this one is only available if ADVANCED_TACTILE_SUPPORT is defined
+
+
+//TODO: is activeWindow good enough
+//or should we create a widget for that?
+CCoeControl *QFeedbackSymbian::defaultWidget()
+{
+ QWidget *w = QApplication::activeWindow();
+ return w ? w->winId() : 0;
+}
+
+#ifndef NO_TACTILE_SUPPORT
+#include <touchfeedback.h>
+
+static MTouchFeedback *touchInstance()
+{
+ static MTouchFeedback *ret = 0;
+ if (!ret) {
+ QT_TRAP_THROWING(
+ ret = MTouchFeedback::Instance();
+ if (!ret)
+ ret = MTouchFeedback::CreateInstanceL();
+ )
+ }
+ return ret;
+}
+
+static TTouchLogicalFeedback convertToSymbian(QFeedbackEffect::ThemeEffect effect)
+{
+
+ TTouchLogicalFeedback themeFeedbackSymbian = ETouchFeedbackBasic;
+
+ switch (effect) {
+ case QFeedbackEffect::ThemeBasic:
+ themeFeedbackSymbian = ETouchFeedbackBasic;
+ break;
+ case QFeedbackEffect::ThemeSensitive:
+ themeFeedbackSymbian = ETouchFeedbackSensitive;
+ break;
+#ifdef ADVANCED_TACTILE_SUPPORT
+ case QFeedbackEffect::ThemeBasicButton:
+ themeFeedbackSymbian = ETouchFeedbackBasicButton;
+ break;
+ case QFeedbackEffect::ThemeSensitiveButton:
+ themeFeedbackSymbian = ETouchFeedbackSensitiveButton;
+ break;
+ case QFeedbackEffect::ThemeBasicItem:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeSensitiveItem:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeBounceEffect:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemePopupOpen:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemePopupClose:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeBasicSlider:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeSensitiveSlider:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeStopFlick:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeFlick:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeEditor:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeTextSelection:
+ themeFeedbackSymbian = ETouchFeedbackTextSelection;
+ break;
+ case QFeedbackEffect::ThemeBlankSelection:
+ themeFeedbackSymbian = ETouchFeedbackBlankSelection;
+ break;
+ case QFeedbackEffect::ThemeLineSelection:
+ themeFeedbackSymbian = ETouchFeedbackLineSelection;
+ break;
+ case QFeedbackEffect::ThemeEmptyLineSelection:
+ themeFeedbackSymbian = ETouchFeedbackEmptyLineSelection;
+ break;
+ case QFeedbackEffect::ThemeCheckBox:
+ themeFeedbackSymbian = ETouchFeedbackCheckbox;
+ break;
+ case QFeedbackEffect::ThemeMultipleCheckBox:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeSensitiveKeypad:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeBasicKeypad:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeMultitouchActivate:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeRotateStep:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeItemDrop:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeItemMoveOver:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeItemPick:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemeItemScroll:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+ case QFeedbackEffect::ThemePopUp:
+ themeFeedbackSymbian = ETouchFeedbackPopUp;
+ break;
+ case QFeedbackEffect::ThemeLongPress:
+ themeFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic.
+ break;
+#endif //ADVANCED_TACTILE_SUPPORT
+ default:
+ break;
+ }
+ return themeFeedbackSymbian;
+}
+
+// This define is for the second parameter of StartFeedback, which needs to be of type
+// TTouchContinuousFeedback in platforms with ADVANCED_TACTILE_SUPPORT
+#define DEFAULT_CONTINUOUS_EFFECT ETouchContinuousSmooth
+
+bool QFeedbackSymbian::play(QFeedbackEffect::ThemeEffect effect)
+{
+ TInt err = KErrNone;
+ TRAP(err, touchInstance()->InstantFeedback(convertToSymbian(effect)));
+ return err == KErrNone;
+}
+
+#endif //NO_TACTILE_SUPPORT
+
+QFeedbackInterface::PluginPriority QFeedbackSymbian::pluginPriority()
+{
+ return PluginLowPriority;
+}
+
+QFeedbackSymbian::QFeedbackSymbian() : m_vibra(0), m_vibraActive(true)
+{
+}
+
+QFeedbackSymbian::~QFeedbackSymbian()
+{
+ delete m_vibra;
+}
+
+CHWRMVibra *QFeedbackSymbian::vibra()
+{
+ if (!m_vibra)
+ QT_TRAP_THROWING(m_vibra = CHWRMVibra::NewL());
+
+ return m_vibra;
+}
+
+QList<QFeedbackActuator> QFeedbackSymbian::actuators()
+{
+ QList<QFeedbackActuator> ret;
+#ifdef ADVANCED_TACTILE_SUPPORT
+ //if we don't have advanced tactile support then the MTouchFeedback doesn't really support custom effects
+ bool touch = false;
+ TRAP_IGNORE(touch = touchInstance()->TouchFeedbackSupported());
+ if (touch) {
+ ret << createFeedbackActuator(TOUCH_DEVICE);
+ }
+#endif //ADVANCED_TACTILE_SUPPORT
+ ret << createFeedbackActuator(VIBRA_DEVICE);
+ return ret;
+}
+
+void QFeedbackSymbian::setActuatorProperty(const QFeedbackActuator &actuator, ActuatorProperty prop, const QVariant &value)
+{
+ switch(prop)
+ {
+ case Enabled:
+ switch(actuator.id())
+ {
+ case VIBRA_DEVICE:
+ m_vibraActive = value.toBool();
+ break;
+#ifdef ADVANCED_TACTILE_SUPPORT
+ case TOUCH_DEVICE:
+ TRAP_IGNORE(touchInstance()->SetFeedbackEnabledForThisApp(value.toBool()));
+ break;
+#endif
+ default:
+ break;
+ }
+ }
+}
+
+QVariant QFeedbackSymbian::actuatorProperty(const QFeedbackActuator &actuator, ActuatorProperty prop)
+{
+ switch(prop)
+ {
+ case Name:
+ switch(actuator.id())
+ {
+ case VIBRA_DEVICE:
+ return QLatin1String("Vibra");
+ case TOUCH_DEVICE:
+ return QLatin1String("Touch");
+ default:
+ return QString();
+ }
+ case State:
+ {
+ QFeedbackActuator::State ret = QFeedbackActuator::Unknown;
+ switch(actuator.id())
+ {
+ case VIBRA_DEVICE:
+ {
+ TInt status = 0;
+ TRAP_IGNORE(status = vibra()->VibraStatus());
+ switch (status)
+ {
+ case CHWRMVibra::EVibraStatusStopped:
+ return QFeedbackActuator::Ready;
+ case CHWRMVibra::EVibraStatusOn:
+ return QFeedbackActuator::Busy;
+ default:
+ return QFeedbackActuator::Unknown;
+ }
+ }
+ case TOUCH_DEVICE:
+ //there is no way of getting the state of the device!
+ default:
+ return QFeedbackActuator::Unknown;
+ }
+ return ret;
+ }
+ case Enabled:
+ switch(actuator.id())
+ {
+ case VIBRA_DEVICE:
+ return m_vibraActive;
+#ifdef ADVANCED_TACTILE_SUPPORT
+ case TOUCH_DEVICE:
+ {
+ bool ret = false;
+ TRAP_IGNORE(ret = touchInstance()->FeedbackEnabledForThisApp());
+ return ret;
+ }
+#endif
+ default:
+ return false;
+ }
+ default:
+ return QVariant();
+ }
+
+}
+
+bool QFeedbackSymbian::isActuatorCapabilitySupported(const QFeedbackActuator &, QFeedbackActuator::Capability)
+{
+ return false;
+}
+
+
+void QFeedbackSymbian::updateEffectProperty(const QFeedbackHapticsEffect *effect, EffectProperty prop)
+{
+ TInt err = KErrNone;
+ switch(prop)
+ {
+ case Intensity:
+ if (!m_elapsed.contains(effect) || m_elapsed[effect].isPaused())
+ break;
+
+ switch(effect->actuator().id())
+ {
+ case VIBRA_DEVICE:
+ TRAP(err, vibra()->StartVibraL(effect->duration() - m_elapsed[effect].elapsed(), qRound(100 * effect->intensity())));
+ break;
+#ifdef ADVANCED_TACTILE_SUPPORT
+ case TOUCH_DEVICE:
+ TRAP(err, touchInstance()->ModifyFeedback(defaultWidget(), qRound(100 * effect->intensity())));
+ break;
+#endif //ADVANCED_TACTILE_SUPPORT
+ default:
+ break;
+ }
+ break;
+
+ }
+ if (err != KErrNone)
+ reportError(effect, QFeedbackEffect::UnknownError);
+}
+
+void QFeedbackSymbian::setEffectState(const QFeedbackHapticsEffect *effect, QFeedbackEffect::State newState)
+{
+ TInt err = KErrNone;
+ switch(effect->actuator().id())
+ {
+ case VIBRA_DEVICE:
+ switch(newState)
+ {
+ case QFeedbackEffect::Stopped:
+ if (m_elapsed.contains(effect)) {
+ TRAP(err, vibra()->StopVibraL());
+ m_elapsed.remove(effect);
+ }
+ break;
+ case QFeedbackEffect::Paused:
+ if (m_elapsed.contains(effect)) {
+ TRAP(err, vibra()->StopVibraL());
+ m_elapsed[effect].pause();
+ }
+ break;
+ case QFeedbackEffect::Running:
+ if (m_elapsed[effect].elapsed() >= effect->duration())
+ m_elapsed.remove(effect); //we reached the end. it's time to restart
+ TRAP(err, vibra()->StartVibraL(effect->duration() - m_elapsed[effect].elapsed(), qRound(100 * effect->intensity())));
+ m_elapsed[effect].start();
+ break;
+ }
+ break;
+#ifdef ADVANCED_TACTILE_SUPPORT
+ case TOUCH_DEVICE:
+ switch(newState)
+ {
+ case QFeedbackEffect::Stopped:
+ if (m_elapsed.contains(effect)) {
+ TRAP(err, touchInstance()->StopFeedback(defaultWidget()));
+ m_elapsed.remove(effect);
+ }
+ break;
+ case QFeedbackEffect::Paused:
+ if (m_elapsed.contains(effect)) {
+ TRAP(err, touchInstance()->StopFeedback(defaultWidget()));
+ m_elapsed[effect].pause();
+ }
+ break;
+ case QFeedbackEffect::Running:
+ if (m_elapsed[effect].elapsed() >= effect->duration())
+ m_elapsed.remove(effect); //we reached the end. it's time to restart
+ TRAP(err, touchInstance()->StartFeedback(defaultWidget(),
+ DEFAULT_CONTINUOUS_EFFECT,
+ 0, qRound(effect->intensity() * 100), qMax(0, (effect->duration() - m_elapsed[effect].elapsed()) * 1000)));
+ m_elapsed[effect].start();
+ break;
+ }
+ break;
+#endif //ADVANCED_TACTILE_SUPPORT
+ default:
+ break;
+ }
+ if (err != KErrNone)
+ reportError(effect, QFeedbackEffect::UnknownError);
+}
+
+QFeedbackEffect::State QFeedbackSymbian::effectState(const QFeedbackHapticsEffect *effect)
+{
+ if (m_elapsed.contains(effect) && m_elapsed[effect].elapsed() < effect->duration()) {
+
+ return m_elapsed[effect].isPaused() ? QFeedbackEffect::Paused : QFeedbackEffect::Running;
+ }
+
+ return QFeedbackEffect::Stopped;
+}
diff --git a/plugins/multimedia/symbian/openmaxal/mediaplayer/qxaplaysession.cpp b/plugins/multimedia/symbian/openmaxal/mediaplayer/qxaplaysession.cpp
index 1a1b30c061..12de08b39a 100644
--- a/plugins/multimedia/symbian/openmaxal/mediaplayer/qxaplaysession.cpp
+++ b/plugins/multimedia/symbian/openmaxal/mediaplayer/qxaplaysession.cpp
@@ -1,594 +1,594 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QMetaType>
-#include "qxaplaysession.h"
-#include "xaplaysessionimpl.h"
-#include "qxacommon.h"
-#include <COECNTRL.H>
-
-QXAPlaySession::QXAPlaySession(QObject *parent):QObject(parent),
-m_state(QMediaPlayer::StoppedState),
-m_mediaStatus(QMediaPlayer::UnknownMediaStatus),
-mSeekable(-1),
-mNumStreams(0),
-mbAudioAvailable(EFalse),
-mbVideoAvailable(EFalse),
-mImpl(NULL),
-mVideowidgetControl(NULL),
-mWidgetCtrlWindow(NULL),
-mWidgetCtrlWindowId(NULL),
-mVideoWindowControl(NULL),
-mWindowCtrlWindow(NULL),
-mWindowCtrlWindowId(NULL),
-mWsSession(&(CCoeEnv::Static()->WsSession()))
-{
- QT_TRACE_FUNCTION_ENTRY;
- mImpl = new XAPlaySessionImpl(*this);
-
- if (mImpl && (mImpl->postConstruct() != KErrNone)) {
- delete mImpl;
- mImpl = NULL;
- QT_TRACE1("Error initializing implementation");
- }
-
- if (!mImpl)
- emit error(QMediaPlayer::ResourceError, tr("Service has not been started"));
-
- QT_TRACE_FUNCTION_EXIT;
-}
-
-QXAPlaySession::~QXAPlaySession()
-{
- QT_TRACE_FUNCTION_ENTRY;
- delete mImpl;
- QT_TRACE_FUNCTION_EXIT;
-}
-
-void QXAPlaySession::setVideoWidgetControl( QXAVideoWidgetControl * videoWidgetControl )
-{
- QT_TRACE_FUNCTION_ENTRY;
- if (mVideowidgetControl) {
- disconnect(mVideowidgetControl, SIGNAL(widgetUpdated()),
- this, SLOT(videoWidgetControlWidgetUpdated()));
- RWindow* window = static_cast<RWindow*>(mVideowidgetControl->videoWidgetWId()->DrawableWindow());
- mImpl->removeNativeDisplay(window, mWsSession);
- }
- mVideowidgetControl = videoWidgetControl;
- if (mVideowidgetControl)
- connect(mVideowidgetControl, SIGNAL(widgetUpdated()),
- this, SLOT(videoWidgetControlWidgetUpdated()));
- QT_TRACE_FUNCTION_EXIT;
-}
-
-void QXAPlaySession::unsetVideoWidgetControl( QXAVideoWidgetControl * videoWidgetControl )
-{
- QT_TRACE_FUNCTION_ENTRY;
- if ((mVideowidgetControl == videoWidgetControl) && (mImpl)) {
- disconnect(mVideowidgetControl, SIGNAL(widgetUpdated()),
- this, SLOT(videoWidgetControlWidgetUpdated()));
- RWindow* window = static_cast<RWindow*>(mVideowidgetControl->videoWidgetWId()->DrawableWindow());
- mImpl->removeNativeDisplay(window, mWsSession);
- }
- mVideowidgetControl = NULL;
- mWidgetCtrlWindow = NULL;
- mWidgetCtrlWindowId = NULL;
- QT_TRACE_FUNCTION_EXIT;
-}
-
-void QXAPlaySession::setVideoWindowControl( QXAVideoWindowControl * videoWindowControl )
-{
- QT_TRACE_FUNCTION_ENTRY;
- if (mVideoWindowControl) {
- disconnect(mVideoWindowControl, SIGNAL(windowUpdated()),
- this, SLOT(videoWindowControlWindowUpdated()));
- RWindow* window = static_cast<RWindow*>(mVideoWindowControl->winId()->DrawableWindow());
- mImpl->removeNativeDisplay(window, mWsSession);
- }
- mVideoWindowControl = videoWindowControl;
- if (mVideoWindowControl) {
- connect(mVideoWindowControl, SIGNAL(windowUpdated()),
- this, SLOT(videoWindowControlWindowUpdated()));
- videoWindowControlWindowUpdated();
- }
- QT_TRACE_FUNCTION_EXIT;
-}
-
-void QXAPlaySession::unsetVideoWindowControl( QXAVideoWindowControl * videoWindowControl )
-{
- QT_TRACE_FUNCTION_ENTRY;
- if ((mVideoWindowControl == videoWindowControl) && (mImpl)) {
- disconnect(mVideoWindowControl, SIGNAL(windowUpdated()),
- this, SLOT(videoWindowControlWindowUpdated()));
- RWindow* window = static_cast<RWindow*>(mVideoWindowControl->winId()->DrawableWindow());
- mImpl->removeNativeDisplay(window, mWsSession);
- }
- mVideoWindowControl = NULL;
- mWindowCtrlWindow = NULL;
- mWindowCtrlWindowId = NULL;
- QT_TRACE_FUNCTION_EXIT;
-}
-
-qint64 QXAPlaySession::duration()
-{
- TInt64 dur(0);
- if (mImpl)
- mImpl->duration(dur);
-
- return (qint64)dur;
-}
-
-qint64 QXAPlaySession::position()
-{
- TInt64 pos(0);
- if (mImpl)
- mImpl->position(pos);
-
- return (qint64)pos;
-}
-
-void QXAPlaySession::setPosition(qint64 ms)
-{
- if (mImpl) {
- qint64 currPos = position();
- mImpl->seek(ms);
-
- if(currPos != position()) {
- emit positionChanged(position());
-
- if(position()>=duration()) {
- setMediaStatus(QMediaPlayer::EndOfMedia);
- stop();
- }
- }
- }
-}
-
-int QXAPlaySession::volume()
-{
- if(mImpl) {
- TInt v(0);
-
- TInt err = mImpl->volume(v);
- if(KErrNone == err)
- return v;
- }
-
- return 50;
-}
-
-void QXAPlaySession::setVolume(int v)
-{
- if(mImpl) {
- if(v != volume()) {
- TInt err = mImpl->setVolume(v);
- if(KErrNone == err)
- emit volumeChanged(volume());
- }
- }
-}
-
-
-bool QXAPlaySession::isMuted()
-{
- if(mImpl) {
- TBool bCurrMute = EFalse;
- TInt err = mImpl->getMute(bCurrMute);
- if(err == KErrNone)
- return bCurrMute;
- }
-
- return EFalse;
-}
-
-void QXAPlaySession::setMuted(bool muted)
-{
- if(muted != isMuted())
- {
- if(mImpl)
- {
- TInt err = mImpl->setMute(muted);
-
- if(KErrNone == err)
- {
- emit mutedChanged(muted);
- }
- }
- }
-}
-
-int QXAPlaySession::bufferStatus()
-{
- if(mImpl) {
- TInt fillLevel = 0;
- TInt err = mImpl->bufferStatus(fillLevel);
- if(err == KErrNone)
- return fillLevel;
- }
-
- return 100;//default
-}
-
-bool QXAPlaySession::isAudioAvailable()
-{
- return mbAudioAvailable;
-}
-
-bool QXAPlaySession::isVideoAvailable()
-{
- return mbVideoAvailable;
-}
-
-bool QXAPlaySession::isSeekable()
-{
- return ((mSeekable==1) || (mSeekable==-1));//default seekable
-}
-
-float QXAPlaySession::playbackRate()
-{
- if(mImpl) {
- TReal32 currPBRate = 0.0;
- TInt ret = mImpl->getPlaybackRate(currPBRate);
- if(ret == KErrNone)
- return currPBRate;
- }
-
- return 1.0;
-}
-
-void QXAPlaySession::setPlaybackRate(float rate)
-{
- if(mImpl) {
- TReal32 currPBRate = 0.0;
- TInt ret = mImpl->getPlaybackRate(currPBRate);
- if( (ret == KErrNone) &&
- (rate!=currPBRate)) {
- ret = mImpl->setPlaybackRate(rate);
- if(ret == KErrNone)
- emit playbackRateChanged(rate);
- }
- }
-}
-
-QMediaContent QXAPlaySession::media()
-{
- QT_TRACE_FUNCTION_ENTRY_EXIT;
- return mMediaContent;
-}
-
-void QXAPlaySession::setMedia(const QMediaContent& media)
-{
- QT_TRACE_FUNCTION_ENTRY;
- RET_IF_p_IS_NULL_EMIT_RESOURCE_ERROR(mImpl);
-
- if (media.isNull() ||
- mMediaContent == media) {
- return;
- }
-
- setMediaStatus(QMediaPlayer::UnknownMediaStatus);
-
- QString urlStr = media.canonicalUrl().toString();
- TPtrC16 urlPtr(reinterpret_cast<const TUint16*>(urlStr.utf16()));
-
- setMediaStatus(QMediaPlayer::LoadingMedia);
- if (mImpl->load(urlPtr) == 0) {
- setMediaStatus(QMediaPlayer::LoadedMedia);
- emit error(QMediaPlayer::NoError, "");
- mMediaContent = media;
- setPlayerState(QMediaPlayer::StoppedState);
- emit mediaChanged(mMediaContent);
-
- if(mImpl->isMetaDataAvailable()) {
- emit metaDataAvailableChanged(true);
- emit metaDataChanged();
- }
- else {
- emit metaDataAvailableChanged(false);
- }
- }
- else {
- setMediaStatus(QMediaPlayer::UnknownMediaStatus);
- emit error(QMediaPlayer::ResourceError, tr("Unable to load media"));
- }
- QT_TRACE_FUNCTION_EXIT;
-}
-
-void QXAPlaySession::play()
-{
- if (mImpl) {
- setMediaStatus(QMediaPlayer::BufferingMedia);
-
- mImpl->play();
- setPlayerState(QMediaPlayer::PlayingState);
-
- TInt fillLevel = 0;
- TInt err = mImpl->bufferStatus(fillLevel);
- if( (err == KErrNone) &&
- (fillLevel == 100) ) {
- setMediaStatus(QMediaPlayer::BufferedMedia);
- }
- }
- }
-
-void QXAPlaySession::pause()
-{
- if (mImpl) {
- mImpl->pause();
- setPlayerState(QMediaPlayer::PausedState);
- }
-}
-
-void QXAPlaySession::stop()
-{
- if (mImpl) {
- mImpl->stop();
- setPlayerState(QMediaPlayer::StoppedState);
- }
-}
-
-void QXAPlaySession::cbDurationChanged(TInt64 new_dur)
-{
- emit durationChanged((qint64)new_dur);
-}
-
-void QXAPlaySession::cbPositionChanged(TInt64 new_pos)
-{
- emit positionChanged((qint64)new_pos);
-}
-
-void QXAPlaySession::cbSeekableChanged(TBool seekable)
-{
- if( (mSeekable==-1) ||
- (seekable != (TBool)mSeekable)) {
- mSeekable = seekable?1:0;
- emit seekableChanged((bool)seekable);
- }
-}
-
-void QXAPlaySession::cbPlaybackStopped_EOS()
-{
- setMediaStatus(QMediaPlayer::EndOfMedia);
- stop();
-}
-
-void QXAPlaySession::cbPrefetchStatusChanged()
-{
- if(mImpl) {
- TInt fillLevel = 0;
- TInt err = mImpl->bufferStatus(fillLevel);
- if(err == KErrNone) {
- emit bufferStatusChanged(fillLevel);
-
- if(fillLevel == 100)
- setMediaStatus(QMediaPlayer::BufferedMedia);
- else if(fillLevel ==0)
- setMediaStatus(QMediaPlayer::StalledMedia);
- }
- }
-}
-
-void QXAPlaySession::cbStreamInformation(TBool bFirstTime)
-{
- updateStreamInfo(bFirstTime);
-}
-
-
-
-void QXAPlaySession::videoWidgetControlWidgetUpdated()
-{
- QT_TRACE_FUNCTION_ENTRY;
- if (mVideowidgetControl) {
- WId newId = mVideowidgetControl->videoWidgetWId();
- if ((newId != NULL) && (newId != mWidgetCtrlWindowId)) {
- mWidgetCtrlWindow = static_cast<RWindow*>(newId->DrawableWindow());
- if (mWidgetCtrlWindowId == NULL)
- mImpl->addNativeDisplay(mWidgetCtrlWindow, mWsSession);
- else
- mImpl->updateNativeDisplay(mWidgetCtrlWindow, mWsSession);
- mWidgetCtrlWindowId = newId;
- }
- }
- QT_TRACE_FUNCTION_EXIT;
-}
-
-void QXAPlaySession::videoWindowControlWindowUpdated()
-{
- QT_TRACE_FUNCTION_ENTRY;
- if (mVideoWindowControl) {
- WId newId = mVideoWindowControl->winId();
- if ((newId != NULL) && (newId != mWindowCtrlWindowId)) {
- mWidgetCtrlWindow = static_cast<RWindow*>(newId->DrawableWindow());
- if (mWindowCtrlWindowId == NULL)
- mImpl->addNativeDisplay(mWidgetCtrlWindow, mWsSession);
- else
- mImpl->updateNativeDisplay(mWidgetCtrlWindow, mWsSession);
- mWindowCtrlWindowId = newId;
- }
- }
- QT_TRACE_FUNCTION_EXIT;
-}
-
-void QXAPlaySession::setMediaStatus(QMediaPlayer::MediaStatus status)
-{
- if (m_mediaStatus != status) {
- m_mediaStatus = status;
- emit mediaStatusChanged(status);
- }
-}
-
-void QXAPlaySession::setPlayerState(QMediaPlayer::State state)
-{
- if (m_state != state) {
- m_state = state;
- emit stateChanged(m_state);
- }
-}
-
-QStringList QXAPlaySession::availableExtendedMetaData () const
-{
- QStringList list;
- RET_s_IF_p_IS_NULL(mImpl, list);
- list = mImpl->availableExtendedMetaData();
- return list;
-}
-
-QList<QtMultimediaKit::MetaData> QXAPlaySession::availableMetaData () const
-{
- QList<QtMultimediaKit::MetaData> list;
- RET_s_IF_p_IS_NULL(mImpl, list);
- return mImpl->availableMetaData();
-}
-
-QVariant QXAPlaySession::extendedMetaData(const QString & key ) const
-{
- QVariant var;
- RET_s_IF_p_IS_NULL(mImpl, var);
- return mImpl->extendedMetaData(key);
-}
-
-bool QXAPlaySession::isMetaDataAvailable() const
-{
- RET_s_IF_p_IS_NULL(mImpl, false);
- return mImpl->isMetaDataAvailable();
-}
-
-bool QXAPlaySession::isWritable() const
-{
- RET_s_IF_p_IS_NULL(mImpl, false);
- return mImpl->isWritable();
-}
-
-QVariant QXAPlaySession::metaData( QtMultimediaKit::MetaData key ) const
-{
- QVariant var;
- RET_s_IF_p_IS_NULL(mImpl, var);
- return mImpl->metaData(key);
-}
-
-void QXAPlaySession::setExtendedMetaData( const QString & key, const QVariant & value )
-{
- RET_IF_p_IS_NULL(mImpl);
- mImpl->setExtendedMetaData(key, value);
-}
-
-void QXAPlaySession::setMetaData( QtMultimediaKit::MetaData key, const QVariant & value )
-{
- RET_IF_p_IS_NULL(mImpl);
- mImpl->setMetaData(key, value);
-}
-
-void QXAPlaySession::updateStreamInfo(TBool emitSignal)
-{
- if(mImpl) {
- mNumStreams = 0;
- TInt ret = mImpl->numMediaStreams(mNumStreams);
- if(ret == KErrNone) {
- TBool bAudioAvailable = EFalse;//lcoal variable
- TBool bVideoAvailable = EFalse;//lcvoal variable
-
- for(TUint i = 0; i < mNumStreams; i++) {
- QMediaStreamsControl::StreamType strType;
- mImpl->streamType(i, strType);
- if(strType == QMediaStreamsControl::AudioStream)
- bAudioAvailable = ETrue;
- else if(strType == QMediaStreamsControl::VideoStream)
- bVideoAvailable = ETrue;
- }
-
- if(emitSignal || (bAudioAvailable != mbAudioAvailable)) {
- emit audioAvailableChanged(bAudioAvailable);
- mbAudioAvailable = bAudioAvailable;
- }
-
- if(emitSignal || (bVideoAvailable != mbVideoAvailable)) {
- emit videoAvailableChanged(bVideoAvailable);
- mbVideoAvailable = bVideoAvailable;
- }
-
- emit streamsChanged();
- }
- }
-}
-
-bool QXAPlaySession::isStreamActive ( int stream )
-{
- RET_s_IF_p_IS_NULL(mImpl, false);
- TBool isActive = EFalse;
- mImpl->isStreamActive(stream,isActive);
- return isActive;
-}
-
-QVariant QXAPlaySession::metaData ( int /*stream*/, QtMultimediaKit::MetaData key )
-{
- return this->metaData(key);
-}
-
-int QXAPlaySession::streamCount()
-{
- return mNumStreams;
-}
-
-QMediaStreamsControl::StreamType QXAPlaySession::streamType ( int stream )
-{
- QMediaStreamsControl::StreamType strType = QMediaStreamsControl::UnknownStream;
- RET_s_IF_p_IS_NULL(mImpl, strType);
- if(mImpl->streamType(stream, strType) == KErrNone) {
- return strType;
- }
-
- return QMediaStreamsControl::UnknownStream;
-}
-
-////AspectRatioMode
-void QXAPlaySession::setAspectRatioMode(Qt::AspectRatioMode aspectRatioMode)
-{
- RET_IF_p_IS_NULL(mImpl);
- mImpl->setAspectRatioMode(aspectRatioMode);
-}
-
-Qt::AspectRatioMode QXAPlaySession::getAspectRatioMode()
-{
- RET_s_IF_p_IS_NULL(mImpl, Qt::KeepAspectRatio);
- return mImpl->getAspectRatioMode();
-}
-
-
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QMetaType>
+#include "qxaplaysession.h"
+#include "xaplaysessionimpl.h"
+#include "qxacommon.h"
+#include <COECNTRL.H>
+
+QXAPlaySession::QXAPlaySession(QObject *parent):QObject(parent),
+m_state(QMediaPlayer::StoppedState),
+m_mediaStatus(QMediaPlayer::UnknownMediaStatus),
+mSeekable(-1),
+mNumStreams(0),
+mbAudioAvailable(EFalse),
+mbVideoAvailable(EFalse),
+mImpl(NULL),
+mVideowidgetControl(NULL),
+mWidgetCtrlWindow(NULL),
+mWidgetCtrlWindowId(NULL),
+mVideoWindowControl(NULL),
+mWindowCtrlWindow(NULL),
+mWindowCtrlWindowId(NULL),
+mWsSession(&(CCoeEnv::Static()->WsSession()))
+{
+ QT_TRACE_FUNCTION_ENTRY;
+ mImpl = new XAPlaySessionImpl(*this);
+
+ if (mImpl && (mImpl->postConstruct() != KErrNone)) {
+ delete mImpl;
+ mImpl = NULL;
+ QT_TRACE1("Error initializing implementation");
+ }
+
+ if (!mImpl)
+ emit error(QMediaPlayer::ResourceError, tr("Service has not been started"));
+
+ QT_TRACE_FUNCTION_EXIT;
+}
+
+QXAPlaySession::~QXAPlaySession()
+{
+ QT_TRACE_FUNCTION_ENTRY;
+ delete mImpl;
+ QT_TRACE_FUNCTION_EXIT;
+}
+
+void QXAPlaySession::setVideoWidgetControl( QXAVideoWidgetControl * videoWidgetControl )
+{
+ QT_TRACE_FUNCTION_ENTRY;
+ if (mVideowidgetControl) {
+ disconnect(mVideowidgetControl, SIGNAL(widgetUpdated()),
+ this, SLOT(videoWidgetControlWidgetUpdated()));
+ RWindow* window = static_cast<RWindow*>(mVideowidgetControl->videoWidgetWId()->DrawableWindow());
+ mImpl->removeNativeDisplay(window, mWsSession);
+ }
+ mVideowidgetControl = videoWidgetControl;
+ if (mVideowidgetControl)
+ connect(mVideowidgetControl, SIGNAL(widgetUpdated()),
+ this, SLOT(videoWidgetControlWidgetUpdated()));
+ QT_TRACE_FUNCTION_EXIT;
+}
+
+void QXAPlaySession::unsetVideoWidgetControl( QXAVideoWidgetControl * videoWidgetControl )
+{
+ QT_TRACE_FUNCTION_ENTRY;
+ if ((mVideowidgetControl == videoWidgetControl) && (mImpl)) {
+ disconnect(mVideowidgetControl, SIGNAL(widgetUpdated()),
+ this, SLOT(videoWidgetControlWidgetUpdated()));
+ RWindow* window = static_cast<RWindow*>(mVideowidgetControl->videoWidgetWId()->DrawableWindow());
+ mImpl->removeNativeDisplay(window, mWsSession);
+ }
+ mVideowidgetControl = NULL;
+ mWidgetCtrlWindow = NULL;
+ mWidgetCtrlWindowId = NULL;
+ QT_TRACE_FUNCTION_EXIT;
+}
+
+void QXAPlaySession::setVideoWindowControl( QXAVideoWindowControl * videoWindowControl )
+{
+ QT_TRACE_FUNCTION_ENTRY;
+ if (mVideoWindowControl) {
+ disconnect(mVideoWindowControl, SIGNAL(windowUpdated()),
+ this, SLOT(videoWindowControlWindowUpdated()));
+ RWindow* window = static_cast<RWindow*>(mVideoWindowControl->winId()->DrawableWindow());
+ mImpl->removeNativeDisplay(window, mWsSession);
+ }
+ mVideoWindowControl = videoWindowControl;
+ if (mVideoWindowControl) {
+ connect(mVideoWindowControl, SIGNAL(windowUpdated()),
+ this, SLOT(videoWindowControlWindowUpdated()));
+ videoWindowControlWindowUpdated();
+ }
+ QT_TRACE_FUNCTION_EXIT;
+}
+
+void QXAPlaySession::unsetVideoWindowControl( QXAVideoWindowControl * videoWindowControl )
+{
+ QT_TRACE_FUNCTION_ENTRY;
+ if ((mVideoWindowControl == videoWindowControl) && (mImpl)) {
+ disconnect(mVideoWindowControl, SIGNAL(windowUpdated()),
+ this, SLOT(videoWindowControlWindowUpdated()));
+ RWindow* window = static_cast<RWindow*>(mVideoWindowControl->winId()->DrawableWindow());
+ mImpl->removeNativeDisplay(window, mWsSession);
+ }
+ mVideoWindowControl = NULL;
+ mWindowCtrlWindow = NULL;
+ mWindowCtrlWindowId = NULL;
+ QT_TRACE_FUNCTION_EXIT;
+}
+
+qint64 QXAPlaySession::duration()
+{
+ TInt64 dur(0);
+ if (mImpl)
+ mImpl->duration(dur);
+
+ return (qint64)dur;
+}
+
+qint64 QXAPlaySession::position()
+{
+ TInt64 pos(0);
+ if (mImpl)
+ mImpl->position(pos);
+
+ return (qint64)pos;
+}
+
+void QXAPlaySession::setPosition(qint64 ms)
+{
+ if (mImpl) {
+ qint64 currPos = position();
+ mImpl->seek(ms);
+
+ if(currPos != position()) {
+ emit positionChanged(position());
+
+ if(position()>=duration()) {
+ setMediaStatus(QMediaPlayer::EndOfMedia);
+ stop();
+ }
+ }
+ }
+}
+
+int QXAPlaySession::volume()
+{
+ if(mImpl) {
+ TInt v(0);
+
+ TInt err = mImpl->volume(v);
+ if(KErrNone == err)
+ return v;
+ }
+
+ return 50;
+}
+
+void QXAPlaySession::setVolume(int v)
+{
+ if(mImpl) {
+ if(v != volume()) {
+ TInt err = mImpl->setVolume(v);
+ if(KErrNone == err)
+ emit volumeChanged(volume());
+ }
+ }
+}
+
+
+bool QXAPlaySession::isMuted()
+{
+ if(mImpl) {
+ TBool bCurrMute = EFalse;
+ TInt err = mImpl->getMute(bCurrMute);
+ if(err == KErrNone)
+ return bCurrMute;
+ }
+
+ return EFalse;
+}
+
+void QXAPlaySession::setMuted(bool muted)
+{
+ if(muted != isMuted())
+ {
+ if(mImpl)
+ {
+ TInt err = mImpl->setMute(muted);
+
+ if(KErrNone == err)
+ {
+ emit mutedChanged(muted);
+ }
+ }
+ }
+}
+
+int QXAPlaySession::bufferStatus()
+{
+ if(mImpl) {
+ TInt fillLevel = 0;
+ TInt err = mImpl->bufferStatus(fillLevel);
+ if(err == KErrNone)
+ return fillLevel;
+ }
+
+ return 100;//default
+}
+
+bool QXAPlaySession::isAudioAvailable()
+{
+ return mbAudioAvailable;
+}
+
+bool QXAPlaySession::isVideoAvailable()
+{
+ return mbVideoAvailable;
+}
+
+bool QXAPlaySession::isSeekable()
+{
+ return ((mSeekable==1) || (mSeekable==-1));//default seekable
+}
+
+float QXAPlaySession::playbackRate()
+{
+ if(mImpl) {
+ TReal32 currPBRate = 0.0;
+ TInt ret = mImpl->getPlaybackRate(currPBRate);
+ if(ret == KErrNone)
+ return currPBRate;
+ }
+
+ return 1.0;
+}
+
+void QXAPlaySession::setPlaybackRate(float rate)
+{
+ if(mImpl) {
+ TReal32 currPBRate = 0.0;
+ TInt ret = mImpl->getPlaybackRate(currPBRate);
+ if( (ret == KErrNone) &&
+ (rate!=currPBRate)) {
+ ret = mImpl->setPlaybackRate(rate);
+ if(ret == KErrNone)
+ emit playbackRateChanged(rate);
+ }
+ }
+}
+
+QMediaContent QXAPlaySession::media()
+{
+ QT_TRACE_FUNCTION_ENTRY_EXIT;
+ return mMediaContent;
+}
+
+void QXAPlaySession::setMedia(const QMediaContent& media)
+{
+ QT_TRACE_FUNCTION_ENTRY;
+ RET_IF_p_IS_NULL_EMIT_RESOURCE_ERROR(mImpl);
+
+ if (media.isNull() ||
+ mMediaContent == media) {
+ return;
+ }
+
+ setMediaStatus(QMediaPlayer::UnknownMediaStatus);
+
+ QString urlStr = media.canonicalUrl().toString();
+ TPtrC16 urlPtr(reinterpret_cast<const TUint16*>(urlStr.utf16()));
+
+ setMediaStatus(QMediaPlayer::LoadingMedia);
+ if (mImpl->load(urlPtr) == 0) {
+ setMediaStatus(QMediaPlayer::LoadedMedia);
+ emit error(QMediaPlayer::NoError, "");
+ mMediaContent = media;
+ setPlayerState(QMediaPlayer::StoppedState);
+ emit mediaChanged(mMediaContent);
+
+ if(mImpl->isMetaDataAvailable()) {
+ emit metaDataAvailableChanged(true);
+ emit metaDataChanged();
+ }
+ else {
+ emit metaDataAvailableChanged(false);
+ }
+ }
+ else {
+ setMediaStatus(QMediaPlayer::UnknownMediaStatus);
+ emit error(QMediaPlayer::ResourceError, tr("Unable to load media"));
+ }
+ QT_TRACE_FUNCTION_EXIT;
+}
+
+void QXAPlaySession::play()
+{
+ if (mImpl) {
+ setMediaStatus(QMediaPlayer::BufferingMedia);
+
+ mImpl->play();
+ setPlayerState(QMediaPlayer::PlayingState);
+
+ TInt fillLevel = 0;
+ TInt err = mImpl->bufferStatus(fillLevel);
+ if( (err == KErrNone) &&
+ (fillLevel == 100) ) {
+ setMediaStatus(QMediaPlayer::BufferedMedia);
+ }
+ }
+ }
+
+void QXAPlaySession::pause()
+{
+ if (mImpl) {
+ mImpl->pause();
+ setPlayerState(QMediaPlayer::PausedState);
+ }
+}
+
+void QXAPlaySession::stop()
+{
+ if (mImpl) {
+ mImpl->stop();
+ setPlayerState(QMediaPlayer::StoppedState);
+ }
+}
+
+void QXAPlaySession::cbDurationChanged(TInt64 new_dur)
+{
+ emit durationChanged((qint64)new_dur);
+}
+
+void QXAPlaySession::cbPositionChanged(TInt64 new_pos)
+{
+ emit positionChanged((qint64)new_pos);
+}
+
+void QXAPlaySession::cbSeekableChanged(TBool seekable)
+{
+ if( (mSeekable==-1) ||
+ (seekable != (TBool)mSeekable)) {
+ mSeekable = seekable?1:0;
+ emit seekableChanged((bool)seekable);
+ }
+}
+
+void QXAPlaySession::cbPlaybackStopped_EOS()
+{
+ setMediaStatus(QMediaPlayer::EndOfMedia);
+ stop();
+}
+
+void QXAPlaySession::cbPrefetchStatusChanged()
+{
+ if(mImpl) {
+ TInt fillLevel = 0;
+ TInt err = mImpl->bufferStatus(fillLevel);
+ if(err == KErrNone) {
+ emit bufferStatusChanged(fillLevel);
+
+ if(fillLevel == 100)
+ setMediaStatus(QMediaPlayer::BufferedMedia);
+ else if(fillLevel ==0)
+ setMediaStatus(QMediaPlayer::StalledMedia);
+ }
+ }
+}
+
+void QXAPlaySession::cbStreamInformation(TBool bFirstTime)
+{
+ updateStreamInfo(bFirstTime);
+}
+
+
+
+void QXAPlaySession::videoWidgetControlWidgetUpdated()
+{
+ QT_TRACE_FUNCTION_ENTRY;
+ if (mVideowidgetControl) {
+ WId newId = mVideowidgetControl->videoWidgetWId();
+ if ((newId != NULL) && (newId != mWidgetCtrlWindowId)) {
+ mWidgetCtrlWindow = static_cast<RWindow*>(newId->DrawableWindow());
+ if (mWidgetCtrlWindowId == NULL)
+ mImpl->addNativeDisplay(mWidgetCtrlWindow, mWsSession);
+ else
+ mImpl->updateNativeDisplay(mWidgetCtrlWindow, mWsSession);
+ mWidgetCtrlWindowId = newId;
+ }
+ }
+ QT_TRACE_FUNCTION_EXIT;
+}
+
+void QXAPlaySession::videoWindowControlWindowUpdated()
+{
+ QT_TRACE_FUNCTION_ENTRY;
+ if (mVideoWindowControl) {
+ WId newId = mVideoWindowControl->winId();
+ if ((newId != NULL) && (newId != mWindowCtrlWindowId)) {
+ mWidgetCtrlWindow = static_cast<RWindow*>(newId->DrawableWindow());
+ if (mWindowCtrlWindowId == NULL)
+ mImpl->addNativeDisplay(mWidgetCtrlWindow, mWsSession);
+ else
+ mImpl->updateNativeDisplay(mWidgetCtrlWindow, mWsSession);
+ mWindowCtrlWindowId = newId;
+ }
+ }
+ QT_TRACE_FUNCTION_EXIT;
+}
+
+void QXAPlaySession::setMediaStatus(QMediaPlayer::MediaStatus status)
+{
+ if (m_mediaStatus != status) {
+ m_mediaStatus = status;
+ emit mediaStatusChanged(status);
+ }
+}
+
+void QXAPlaySession::setPlayerState(QMediaPlayer::State state)
+{
+ if (m_state != state) {
+ m_state = state;
+ emit stateChanged(m_state);
+ }
+}
+
+QStringList QXAPlaySession::availableExtendedMetaData () const
+{
+ QStringList list;
+ RET_s_IF_p_IS_NULL(mImpl, list);
+ list = mImpl->availableExtendedMetaData();
+ return list;
+}
+
+QList<QtMultimediaKit::MetaData> QXAPlaySession::availableMetaData () const
+{
+ QList<QtMultimediaKit::MetaData> list;
+ RET_s_IF_p_IS_NULL(mImpl, list);
+ return mImpl->availableMetaData();
+}
+
+QVariant QXAPlaySession::extendedMetaData(const QString & key ) const
+{
+ QVariant var;
+ RET_s_IF_p_IS_NULL(mImpl, var);
+ return mImpl->extendedMetaData(key);
+}
+
+bool QXAPlaySession::isMetaDataAvailable() const
+{
+ RET_s_IF_p_IS_NULL(mImpl, false);
+ return mImpl->isMetaDataAvailable();
+}
+
+bool QXAPlaySession::isWritable() const
+{
+ RET_s_IF_p_IS_NULL(mImpl, false);
+ return mImpl->isWritable();
+}
+
+QVariant QXAPlaySession::metaData( QtMultimediaKit::MetaData key ) const
+{
+ QVariant var;
+ RET_s_IF_p_IS_NULL(mImpl, var);
+ return mImpl->metaData(key);
+}
+
+void QXAPlaySession::setExtendedMetaData( const QString & key, const QVariant & value )
+{
+ RET_IF_p_IS_NULL(mImpl);
+ mImpl->setExtendedMetaData(key, value);
+}
+
+void QXAPlaySession::setMetaData( QtMultimediaKit::MetaData key, const QVariant & value )
+{
+ RET_IF_p_IS_NULL(mImpl);
+ mImpl->setMetaData(key, value);
+}
+
+void QXAPlaySession::updateStreamInfo(TBool emitSignal)
+{
+ if(mImpl) {
+ mNumStreams = 0;
+ TInt ret = mImpl->numMediaStreams(mNumStreams);
+ if(ret == KErrNone) {
+ TBool bAudioAvailable = EFalse;//lcoal variable
+ TBool bVideoAvailable = EFalse;//lcvoal variable
+
+ for(TUint i = 0; i < mNumStreams; i++) {
+ QMediaStreamsControl::StreamType strType;
+ mImpl->streamType(i, strType);
+ if(strType == QMediaStreamsControl::AudioStream)
+ bAudioAvailable = ETrue;
+ else if(strType == QMediaStreamsControl::VideoStream)
+ bVideoAvailable = ETrue;
+ }
+
+ if(emitSignal || (bAudioAvailable != mbAudioAvailable)) {
+ emit audioAvailableChanged(bAudioAvailable);
+ mbAudioAvailable = bAudioAvailable;
+ }
+
+ if(emitSignal || (bVideoAvailable != mbVideoAvailable)) {
+ emit videoAvailableChanged(bVideoAvailable);
+ mbVideoAvailable = bVideoAvailable;
+ }
+
+ emit streamsChanged();
+ }
+ }
+}
+
+bool QXAPlaySession::isStreamActive ( int stream )
+{
+ RET_s_IF_p_IS_NULL(mImpl, false);
+ TBool isActive = EFalse;
+ mImpl->isStreamActive(stream,isActive);
+ return isActive;
+}
+
+QVariant QXAPlaySession::metaData ( int /*stream*/, QtMultimediaKit::MetaData key )
+{
+ return this->metaData(key);
+}
+
+int QXAPlaySession::streamCount()
+{
+ return mNumStreams;
+}
+
+QMediaStreamsControl::StreamType QXAPlaySession::streamType ( int stream )
+{
+ QMediaStreamsControl::StreamType strType = QMediaStreamsControl::UnknownStream;
+ RET_s_IF_p_IS_NULL(mImpl, strType);
+ if(mImpl->streamType(stream, strType) == KErrNone) {
+ return strType;
+ }
+
+ return QMediaStreamsControl::UnknownStream;
+}
+
+////AspectRatioMode
+void QXAPlaySession::setAspectRatioMode(Qt::AspectRatioMode aspectRatioMode)
+{
+ RET_IF_p_IS_NULL(mImpl);
+ mImpl->setAspectRatioMode(aspectRatioMode);
+}
+
+Qt::AspectRatioMode QXAPlaySession::getAspectRatioMode()
+{
+ RET_s_IF_p_IS_NULL(mImpl, Qt::KeepAspectRatio);
+ return mImpl->getAspectRatioMode();
+}
+
+
diff --git a/plugins/organizer/symbian/local_calenmulticaluids.hrh b/plugins/organizer/symbian/local_calenmulticaluids.hrh
index 6581c1070f..119fcab5b6 100644
--- a/plugins/organizer/symbian/local_calenmulticaluids.hrh
+++ b/plugins/organizer/symbian/local_calenmulticaluids.hrh
@@ -1,37 +1,37 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description :
-*
-*/
-
-#ifndef CALENMULTICALUIDS_HRH_
-#define CALENMULTICALUIDS_HRH_
-
-
-enum TCalenPropertyUid
- {
- EFolderLUID = 1,
- ECreationTime,
- EModificationTime,
- ESyncStatus,
- EIsSharedFolder,
- EGlobalUUID,
- EDeviceSyncServiceOwner,
- EOwnerName,
- EMarkAsDelete,
- EDeviceSyncProfileID,
- ESyncConfigEnabled
- };
-
-#endif /* CALENMULTICALUIDS_HRH_ */
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description :
+*
+*/
+
+#ifndef CALENMULTICALUIDS_HRH_
+#define CALENMULTICALUIDS_HRH_
+
+
+enum TCalenPropertyUid
+ {
+ EFolderLUID = 1,
+ ECreationTime,
+ EModificationTime,
+ ESyncStatus,
+ EIsSharedFolder,
+ EGlobalUUID,
+ EDeviceSyncServiceOwner,
+ EOwnerName,
+ EMarkAsDelete,
+ EDeviceSyncProfileID,
+ ESyncConfigEnabled
+ };
+
+#endif /* CALENMULTICALUIDS_HRH_ */
diff --git a/plugins/organizer/symbian/resetanddestroy.h b/plugins/organizer/symbian/resetanddestroy.h
index f7dcba88b4..f16a898f1c 100644
--- a/plugins/organizer/symbian/resetanddestroy.h
+++ b/plugins/organizer/symbian/resetanddestroy.h
@@ -1,76 +1,76 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-//system includes
-
-#ifndef CLEANUPRESETANDDESTROY_H
-#define CLEANUPRESETANDDESTROY_H
-
-template <class T>
-
-/*!
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//system includes
+
+#ifndef CLEANUPRESETANDDESTROY_H
+#define CLEANUPRESETANDDESTROY_H
+
+template <class T>
+
+/*!
* A helper class for pushing a pointer array into cleanup stack
- */
-class CleanupResetAndDestroy
-{
-public:
- inline static void PushL(T &obj);
-private:
- static void ResetAndDestroy(TAny *obj);
-};
-
-template <class T> inline void CleanupResetAndDestroyPushL(T &obj);
-
-template <class T> inline void CleanupResetAndDestroy<T>::PushL(T &obj)
-{
- CleanupStack::PushL(TCleanupItem(&ResetAndDestroy, &obj));
-}
-
-template <class T> void CleanupResetAndDestroy<T>::ResetAndDestroy(TAny *obj)
-{
- static_cast<T*>(obj)->ResetAndDestroy();
-}
-
-template <class T> inline void CleanupResetAndDestroyPushL(T &obj)
-{
- CleanupResetAndDestroy<T>::PushL(obj);
-}
-
-#endif // CLEANUPRESETANDDESTROY_H
+ */
+class CleanupResetAndDestroy
+{
+public:
+ inline static void PushL(T &obj);
+private:
+ static void ResetAndDestroy(TAny *obj);
+};
+
+template <class T> inline void CleanupResetAndDestroyPushL(T &obj);
+
+template <class T> inline void CleanupResetAndDestroy<T>::PushL(T &obj)
+{
+ CleanupStack::PushL(TCleanupItem(&ResetAndDestroy, &obj));
+}
+
+template <class T> void CleanupResetAndDestroy<T>::ResetAndDestroy(TAny *obj)
+{
+ static_cast<T*>(obj)->ResetAndDestroy();
+}
+
+template <class T> inline void CleanupResetAndDestroyPushL(T &obj)
+{
+ CleanupResetAndDestroy<T>::PushL(obj);
+}
+
+#endif // CLEANUPRESETANDDESTROY_H
diff --git a/plugins/organizer/symbian/transform/organizeritemremindertransform.h b/plugins/organizer/symbian/transform/organizeritemremindertransform.h
index b7bfab90c0..93e82aa3ee 100644
--- a/plugins/organizer/symbian/transform/organizeritemremindertransform.h
+++ b/plugins/organizer/symbian/transform/organizeritemremindertransform.h
@@ -1,56 +1,56 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef ORGANIZERITEMREMINDERTRANSFORM_H
-#define ORGANIZERITEMREMINDERTRANSFORM_H
-
-#include "organizeritemdetailtransform.h"
-
-class OrganizerItemReminderTransform : public OrganizerItemDetailTransform
-{
-public:
- void modifyBaseSchemaDefinitions(QMap<QString, QMap<QString, QOrganizerItemDetailDefinition> > &schemaDefs) const;
- void transformToDetailL(const CCalEntry& entry, QOrganizerItem *item);
- void transformToEntryL(const QOrganizerItem& item, CCalEntry* entry);
- QString detailDefinitionName();
-};
-
-#endif // ORGANIZERITEMREMINDERTRANSFORM_H
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ORGANIZERITEMREMINDERTRANSFORM_H
+#define ORGANIZERITEMREMINDERTRANSFORM_H
+
+#include "organizeritemdetailtransform.h"
+
+class OrganizerItemReminderTransform : public OrganizerItemDetailTransform
+{
+public:
+ void modifyBaseSchemaDefinitions(QMap<QString, QMap<QString, QOrganizerItemDetailDefinition> > &schemaDefs) const;
+ void transformToDetailL(const CCalEntry& entry, QOrganizerItem *item);
+ void transformToEntryL(const QOrganizerItem& item, CCalEntry* entry);
+ QString detailDefinitionName();
+};
+
+#endif // ORGANIZERITEMREMINDERTRANSFORM_H