--- a/mmsharing/group/group.pro Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/group/group.pro Mon Oct 04 00:13:53 2010 +0300
@@ -26,11 +26,12 @@
:BLD_INF_RULES.prj_exports += "../cenrep/backup_registration.xml /epoc32/data/z/private/1028238D/backup_registration.xml"
:BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"../mmshavailability/group/bld.inf\""
- :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"../mmshindicator/group/bld.inf\""
+# :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"../mmshindicator/group/bld.inf\"" - enable after removing AVKON Notifier API dependencies
:BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"../mmshmanagercli/group/bld.inf\""
- :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"../mmshmanagersrv/group/bld.inf\""
+# :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"../mmshmanagersrv/group/bld.inf\"" - enable after removing AVKON Notifier API dependencies
:BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"../mmshengine/group/bld.inf\""
}
SUBDIRS += ../livecommsui
SUBDIRS += ../mmshapp
+
--- a/mmsharing/livecommsui/lcui/inc/lcuicomponentrepository.h Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/inc/lcuicomponentrepository.h Mon Oct 04 00:13:53 2010 +0300
@@ -29,10 +29,12 @@
class LcUiEngine;
class HbMenu;
class HbMessageBox;
+class HbVolumeSliderPopup;
class LcUiComponentRepository : public HbDocumentLoader
{
friend class UT_LcUiComponentRepository;
+ friend class UT_LcView;
public:
@@ -60,6 +62,8 @@
// returns the previously loaded layout name
QString previousLayout()const;
+ HbVolumeSliderPopup* volumeSlider();
+
private: //from HbDocumentLoader
QObject *createObject(const QString& type, const QString &name);
@@ -98,6 +102,7 @@
HbProgressDialog* mInvitingNote;
HbProgressDialog* mWaitingNote;
HbDialog* mRecipientQuery;
+ HbVolumeSliderPopup* mVolumeSlider;
HbMessageBox* mShareOwnVideoQuery;
QString mLayout;
--- a/mmsharing/livecommsui/lcui/inc/lcuidefs.h Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/inc/lcuidefs.h Mon Oct 04 00:13:53 2010 +0300
@@ -157,5 +157,8 @@
const char lcEffectWinSwapUpId[] = "swapUp";
const char lcEffectWinDefaultCallback[] = "windowDisappearComplete";
+const int lcVolumeMax = 10;
+const int lcVolumeMin = 0;
+const int lcVolSliderTimeOut = 10000; // TBD: Define value as per UI specs currently missing.
#endif /* LCUIDEFS_H_ */
--- a/mmsharing/livecommsui/lcui/inc/lcview.h Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/inc/lcview.h Mon Oct 04 00:13:53 2010 +0300
@@ -70,6 +70,8 @@
void updateSwapLayout();
void menuAboutToShow();
void back();
+ void showSendVideo();
+ void showReceivedVideo();
//temp
void notSupported();
@@ -86,7 +88,7 @@
void disableControls();
void enableControls();
void watchInactivity();
- void updateVolumeSlider(int aVolumeLevel);
+ void showVolumeSlider(int aVolumeLevel);
protected: // From HbView
--- a/mmsharing/livecommsui/lcui/inc/lcviewmanager_p.h Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/inc/lcviewmanager_p.h Mon Oct 04 00:13:53 2010 +0300
@@ -35,15 +35,18 @@
LcMainWindow();
virtual ~LcMainWindow();
-
-protected: // From QObject
+
+private slots:
- bool eventFilter ( QObject * watched, QEvent * event );
-
+ void handleBackground();
+ void handleForeground();
+
+
signals:
-
+
void appFocusGained();
void appFocusLost();
+
private:
friend class UT_LcUiViewManager;
--- a/mmsharing/livecommsui/lcui/resources/lcviews/lcvtview.docml Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/resources/lcviews/lcvtview.docml Mon Oct 04 00:13:53 2010 +0300
@@ -107,10 +107,10 @@
<anchoritem dst="lc_widget_sendvideo2" dstEdge="TOP" spacing="20.75un" src="" srcEdge="TOP"/>
<anchoritem dst="lc_label_recipient" dstEdge="BOTTOM" spacing="0un" src="lc_label_duration" srcEdge="TOP"/>
<anchoritem dst="lc_label_recipient" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="lc_widget_recvvideo" srcEdge="RIGHT"/>
+ <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="7.5un" src="lc_widget_recvvideo" srcEdge="RIGHT"/>
<anchoritem dst="lc_label_duration" dstEdge="BOTTOM" spacing="-1.5un" src="lc_widget_sendvideo" srcEdge="TOP"/>
<anchoritem dst="lc_label_duration" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="lc_widget_recvvideo" srcEdge="RIGHT"/>
+ <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="7.5un" src="lc_widget_recvvideo" srcEdge="RIGHT"/>
<anchoritem dst="lc_button_endCall" dstEdge="LEFT" spacing="4un" src="lc_widget_sendvideo" srcEdge="LEFT"/>
<anchoritem dst="lc_button_endCall" dstEdge="RIGHT" spacing="-4un" src="lc_widget_sendvideo" srcEdge="RIGHT"/>
<anchoritem dst="lc_button_endCall" dstEdge="BOTTOM" spacing="-1.5un" src="lc_widget_sendvideo" srcEdge="BOTTOM"/>
@@ -168,10 +168,10 @@
<anchoritem dst="lc_widget_recvvideo2" dstEdge="TOP" spacing="20.75un" src="" srcEdge="TOP"/>
<anchoritem dst="lc_label_recipient" dstEdge="BOTTOM" spacing="0un" src="lc_label_duration" srcEdge="TOP"/>
<anchoritem dst="lc_label_recipient" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="lc_widget_sendvideo" srcEdge="RIGHT"/>
+ <anchoritem dst="lc_label_recipient" dstEdge="LEFT" spacing="7.5un" src="lc_widget_sendvideo" srcEdge="RIGHT"/>
<anchoritem dst="lc_label_duration" dstEdge="BOTTOM" spacing="-1.5un" src="lc_widget_recvvideo" srcEdge="TOP"/>
<anchoritem dst="lc_label_duration" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-screen)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="lc_widget_sendvideo" srcEdge="RIGHT"/>
+ <anchoritem dst="lc_label_duration" dstEdge="LEFT" spacing="7.5un" src="lc_widget_sendvideo" srcEdge="RIGHT"/>
<anchoritem dst="lc_button_endCall" dstEdge="LEFT" spacing="4un" src="lc_widget_recvvideo" srcEdge="LEFT"/>
<anchoritem dst="lc_button_endCall" dstEdge="RIGHT" spacing="-4un" src="lc_widget_recvvideo" srcEdge="RIGHT"/>
<anchoritem dst="lc_button_endCall" dstEdge="BOTTOM" spacing="-1.5un" src="lc_widget_recvvideo" srcEdge="BOTTOM"/>
--- a/mmsharing/livecommsui/lcui/src/lceffecthandler.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/src/lceffecthandler.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -276,9 +276,7 @@
{
Q_UNUSED(status);
LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::flipHideComplete()" )
- if( mEngine.isLocalPlayerPlaying() ) {
- showSendWindow();
- }
+ showSendWindow();
LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::flipHideComplete()" )
}
@@ -349,17 +347,10 @@
LC_QDEBUG( "livecomms [UI] -> LcEffectHandler::handleSwapCompletion()" )
if ( mSwapSharedCompleted && mSwapReceivedCompleted ){
LC_QDEBUG( "livecomms [UI] Both swaps done, complete" )
-
emit swapCompleted();
-
- if( mEngine.isLocalPlayerPlaying() ) {
- showSendWindow();
- }
- if( mEngine.isRemotePlayerPlaying() ) {
- showReceiveWindow();
- }
-
- mSwapInProgress = false;
+ showSendWindow();
+ showReceiveWindow();
+ mSwapInProgress = false;
}
LC_QDEBUG( "livecomms [UI] <- LcEffectHandler::handleSwapCompletion()" )
}
--- a/mmsharing/livecommsui/lcui/src/lcuicomponentrepository.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/src/lcuicomponentrepository.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -37,6 +37,7 @@
#include <hbframedrawer.h>
#include <hbstyleloader.h>
#include <dialpad.h>
+#include <hbvolumesliderpopup.h>
// -----------------------------------------------------------------------------
// LcUiComponentRepository::LcUiComponentRepository
@@ -56,6 +57,7 @@
mInvitingNote(0),
mWaitingNote(0),
mRecipientQuery(0),
+ mVolumeSlider(0),
mShareOwnVideoQuery(0)
{
LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::LcUiComponentRepository()" )
@@ -106,7 +108,11 @@
delete mWaitingNote;
delete mRecipientQuery;
delete mShareOwnVideoQuery;
-
+
+ if ( mVolumeSlider ) {
+ delete mVolumeSlider;
+ }
+
LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::~LcUiComponentRepository()" )
}
@@ -586,4 +592,42 @@
mPreviousLayout )
return mPreviousLayout;
}
+
+
+// -----------------------------------------------------------------------------
+// LcUiComponentRepository::volumeSlider
+// -----------------------------------------------------------------------------
+//
+HbVolumeSliderPopup* LcUiComponentRepository::volumeSlider()
+{
+ LC_QDEBUG( "livecomms [UI] -> LcUiComponentRepository::volumeSlider()" );
+
+ if ( !mVolumeSlider ) {
+ mVolumeSlider = new HbVolumeSliderPopup();
+ mVolumeSlider->setDismissPolicy(HbDialog::TapOutside);
+ mVolumeSlider->setTimeout(lcVolSliderTimeOut);
+ LcControlValues values;
+ mEngine.volumeValues(values);
+
+ LC_QDEBUG_2( "livecomms [UI] Min Volume Value :", values.mMinValue )
+ LC_QDEBUG_2( "livecomms [UI] Max Volume Value :", values.mMaxValue )
+ LC_QDEBUG_2( "livecomms [UI] Current Volume Value :", values.mValue )
+
+ mVolumeSlider->setRange(values.mMinValue, values.mMaxValue);
+ mVolumeSlider->setValue(values.mValue);
+ mVolumeSlider->setSingleStep(1);
+ mVolumeSlider->hide();
+
+ //set the current volume level to the corresponding engine.
+ QObject::connect( mVolumeSlider, SIGNAL(valueChanged(int)),
+ &mEngine, SLOT(volume(int)) );
+ QObject::connect( mVolumeSlider, SIGNAL(iconToggled(bool)),
+ &mEngine, SLOT(volumeMuted(bool)));
+ }
+
+ LC_QDEBUG( "livecomms [UI] <- LcUiComponentRepository::volumeSlider()" );
+ return mVolumeSlider;
+}
+
+
// End of file
--- a/mmsharing/livecommsui/lcui/src/lcview.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/src/lcview.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -40,14 +40,13 @@
#include <dialpad.h>
#include <hbtapgesture.h>
#include <DialpadVtKeyHandler.h>
+#include <hbvolumesliderpopup.h>
-#if ( defined __WINSCW__ ) || ( defined __WINS__ )
-const int inActivityTimeout = 5000; //5 secs
-#else
-const int inActivityTimeout = 2000; //2 secs
-#endif
+//Inactivity timeout. Optimized according to other apps like camera.
+const int inActivityTimeout = 6000; //6 secs
+
// -----------------------------------------------------------------------------
// LcView::LcView
@@ -217,7 +216,7 @@
//Subscribe to the Volume Change Events.
connect( &mEngine, SIGNAL(volumeChanged(int)),
- this, SLOT(updateVolumeSlider(int)) );
+ this, SLOT(showVolumeSlider(int)) );
LC_QDEBUG( "livecomms [UI] <- LcView::init()" )
}
@@ -244,8 +243,6 @@
sharedContentRect.moveTop(
sharedContentRect.y() + mapToParent(scenePos()).y());
sharedContentRect = translateRectForOrientation(sharedContentRect);
- mEffectHandler->setVisibility(
- mSharedVideoWidget, mEngine.isLocalPlayerPlaying());
}
if ( mReceivedVideoWidget ) {
@@ -253,8 +250,6 @@
receivedContentRect.moveTop(
receivedContentRect.y() + mapToParent(scenePos()).y());
receivedContentRect = translateRectForOrientation(receivedContentRect);
- mEffectHandler->setVisibility(
- mReceivedVideoWidget, mEngine.isRemotePlayerPlaying());
}
mEngine.setContentAreas( sharedContentRect, receivedContentRect );
@@ -381,9 +376,7 @@
if ( mSharedVideoWidget ) {
connect( &mEngine, SIGNAL(localPlayerPlaying()),
- mEffectHandler, SLOT(showSendWindow()) );
- connect( &mEngine, SIGNAL(localPlayerPaused()),
- mEffectHandler, SLOT(hideSendWindow()) );
+ this, SLOT(showSendVideo()) );
connect( &mEngine, SIGNAL(localPlayerPlaying()),
this, SLOT(setCameraActionToDisable()));
connect( &mEngine, SIGNAL(localPlayerPaused()),
@@ -396,9 +389,7 @@
if ( mReceivedVideoWidget ) {
connect( &mEngine, SIGNAL(remotePlayerPlaying()),
- mEffectHandler, SLOT(showReceiveWindow()) );
- connect( &mEngine, SIGNAL(remotePlayerPaused()),
- mEffectHandler, SLOT(hideReceiveWindow()) );
+ this, SLOT(showReceivedVideo()) );
connect( &mEngine, SIGNAL(remotePlayerPlaying()),
this, SLOT(updateVideoRects()) );
}
@@ -472,8 +463,7 @@
void LcView::disableCamera()
{
LC_QDEBUG( "livecomms [UI] -> LcView::disableCamera()" )
-
- mEffectHandler->setDissappearEffect( LcEffectHandler::NormalDissappear );
+
mEngine.toggleDisableCamera();
toFullScreen( mEngine.fullScreenMode() );
@@ -501,10 +491,14 @@
void LcView::changeCamera()
{
LC_QDEBUG( "livecomms [UI] -> LcView::changeCamera()" )
-
- mEffectHandler->setDissappearEffect( LcEffectHandler::DissappearToFlip );
+
mEngine.toggleCamera();
toFullScreen( false );
+
+ // Change Camera may take some time run some affects.
+ if ( mEffectHandler ) {
+ mEffectHandler->startEffects();
+ }
LC_QDEBUG( "livecomms [UI] <- LcView::changeCamera()" )
}
@@ -1004,8 +998,6 @@
setStatusBarVisible( !fullscreen );
toolBar()->setVisible( !fullscreen );
setVisibility( mEndCallButton, !fullscreen );
- setVisibility( mDuration, !fullscreen );
- setVisibility( mRecipient, !fullscreen );
emit contentFullScreenChanged();
}
@@ -1059,15 +1051,43 @@
// -----------------------------------------------------------------------------
-// LcView::updateVolumeSlider
+// LcView::showVolumeSlider
+// -----------------------------------------------------------------------------
+//
+void LcView::showVolumeSlider( int aVolumeLevel )
+{
+ LC_QDEBUG("livecomms [UI] -> LcView::showVolumeSlider()")
+ LC_QDEBUG_2("livecomms [UI] Volume Level Is,",aVolumeLevel)
+ mRepository.volumeSlider()->setValue(aVolumeLevel);
+ mRepository.volumeSlider()->show();
+ LC_QDEBUG("livecomms [UI] <- LcView::showVolumeSlider()")
+}
+
+
+// -----------------------------------------------------------------------------
+// LcView::showSendVideo
// -----------------------------------------------------------------------------
//
-void LcView::updateVolumeSlider( int aVolumeLevel )
+void LcView::showSendVideo()
{
- LC_QDEBUG("livecomms [UI] -> LcView::updateVolumeSlider()")
- //TBD: Show volume slider, with update volume level
- LC_QDEBUG_2("Volume Level Is,",aVolumeLevel)
- LC_QDEBUG("livecomms [UI] <- LcView::updateVolumeSlider()")
+ // Showing Send Send Video Effects only occurs at the startup
+ disconnect( &mEngine, SIGNAL(localPlayerPlaying()),
+ this, SLOT(showSendVideo()) );
+ mEffectHandler->showSendWindow();
+}
+
+
+// -----------------------------------------------------------------------------
+// LcView::showReceivedVideo
+// -----------------------------------------------------------------------------
+//
+void LcView::showReceivedVideo()
+{
+ // Showing Received Video Effects only occurs at the startup
+ disconnect( &mEngine, SIGNAL(remotePlayerPlaying()),
+ this, SLOT(showReceivedVideo()) );
+
+ mEffectHandler->showReceiveWindow();
}
--- a/mmsharing/livecommsui/lcui/src/lcviewmanager_p.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/src/lcviewmanager_p.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -45,8 +45,8 @@
HbMainWindow(0, Hb::WindowFlagFixedHorizontal | Hb::WindowFlagTransparent)
{
// TODO: remove flag WindowFlagFixedHorizontal if portait layout
- // is going to be supported.
- qApp->installEventFilter(this);
+ connect( this, SIGNAL(obscured()), this, SLOT(handleBackground()));
+ connect( this, SIGNAL(revealed()), this, SLOT(handleForeground()));
}
// -----------------------------------------------------------------------------
@@ -58,20 +58,21 @@
}
// -----------------------------------------------------------------------------
-// LcMainWindow::eventFilter
+// LcMainWindow::handleBackground
// -----------------------------------------------------------------------------
//
-bool LcMainWindow::eventFilter ( QObject * watched, QEvent * event )
-{
- if ( event->type() == QEvent::ApplicationActivate ){
- LC_QDEBUG( "livecomms [UI] -> LcMainWindow::eventFilter(), ApplicationActivate" )
- emit appFocusGained();
- } else if (( event->type() == QEvent::ApplicationDeactivate ) &&
- ( !this->windowSurface()) ){
- LC_QDEBUG( "livecomms [UI] -> LcMainWindow::eventFilter(), ApplicationDeactivate" )
- emit appFocusLost();
- }
- return QObject::eventFilter(watched, event);
+void LcMainWindow::handleBackground()
+{
+ emit appFocusLost();
+}
+
+// -----------------------------------------------------------------------------
+// LcMainWindow::handleForeground
+// -----------------------------------------------------------------------------
+//
+void LcMainWindow::handleForeground()
+{
+ emit appFocusGained();
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbsliderpopup.h Mon Oct 04 00:13:53 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2008-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: HbSliderPopup class definition.
+*
+*/
+
+
+#ifndef HB_SLIDERPOPUP_H
+#define HB_SLIDERPOPUP_H
+
+//#include <hbslider.h>
+#include <hbdialog.h>
+
+class HbSliderPopup : public HbDialog
+{
+
+public:
+ explicit HbSliderPopup(QGraphicsItem *parent = 0);
+ virtual ~HbSliderPopup();
+
+ int maximum() const;
+ void setMaximum(int max);
+
+ int minimum() const;
+ void setMinimum(int min);
+
+ void setRange(int min, int max);
+
+ int singleStep() const;
+ void setSingleStep(int step);
+ int value() const;
+
+public slots:
+ void setValue(int value);
+
+private: // Data added for the unit testing stub
+ int mMinValue;
+ int mMaxValue;
+ int mValue;
+ int mSingleStep;
+};
+
+#endif // HB_SLIDERPOPUP_H
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbstubs.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbstubs.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -43,6 +43,10 @@
#include <QGesture>
#include <QWidget.h>
#include <hbtapgesture.h>
+#include <hbvolumesliderpopup.h>
+#include <hbsliderpopup.h>
+
+
// Helper Class
#include "hbstub_helper.h"
@@ -1279,6 +1283,115 @@
return HbMessageBox::NoButton;
}
+
+
+// HbSliderPopup
+// -----------------------------------------------------------------------------
+// HbSliderPopup::HbSliderPopup
+// -----------------------------------------------------------------------------
+//
+
+HbSliderPopup::HbSliderPopup(QGraphicsItem *parent)
+ : HbDialog(parent)
+
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// HbSliderPopup::~HbSliderPopup
+// -----------------------------------------------------------------------------
+//
+HbSliderPopup::~HbSliderPopup()
+{
+}
+
+// -----------------------------------------------------------------------------
+// HbSliderPopup::setRange
+// -----------------------------------------------------------------------------
+//
+void HbSliderPopup::setRange(int min,int max)
+{
+ mMinValue = min;
+ mMaxValue = max;
+}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+int HbSliderPopup::minimum() const
+{
+ return mMinValue;
+}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+int HbSliderPopup::maximum() const
+{
+ return mMaxValue;
+}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+int HbSliderPopup::value() const
+{
+ return mValue;
+}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+int HbSliderPopup::singleStep() const
+{
+ return mSingleStep;
+}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void HbSliderPopup::setSingleStep(int step)
+ {
+ mSingleStep = step;
+ }
+
+// -----------------------------------------------------------------------------
+// HbSliderPopup::setValue
+// -----------------------------------------------------------------------------
+//
+void HbSliderPopup::setValue(int value)
+{
+ mValue = value;
+}
+
+
+
+// HbVolumeSliderPopup
+
+// -----------------------------------------------------------------------------
+// HbVolumeSliderPopup::HbVolumeSliderPopup
+// -----------------------------------------------------------------------------
+//
+HbVolumeSliderPopup::HbVolumeSliderPopup( ) : HbSliderPopup()
+{
+}
+
+// -----------------------------------------------------------------------------
+// HbVolumeSliderPopup::~HbVolumeSliderPopup
+// -----------------------------------------------------------------------------
+//
+HbVolumeSliderPopup::~HbVolumeSliderPopup()
+{
+}
+
+
+
// -----------------------------------------------------------------------------
// Stub Helper
// -----------------------------------------------------------------------------
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbvolumesliderpopup.h Mon Oct 04 00:13:53 2010 +0300
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (developer.feedback@nokia.com)
+**
+** This file is part of the HbWidgets module of the UI Extensions for Mobile.
+**
+** GNU Lesser General Public License Usage
+** 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 developer.feedback@nokia.com.
+**
+****************************************************************************/
+
+#ifndef HBVOLUMESLIDERPOPUP_H
+#define HBVOLUMESLIDERPOPUP_H
+
+#include <hbsliderpopup.h>
+
+class HbVolumeSliderPopupPrivate;
+
+class HB_WIDGETS_EXPORT HbVolumeSliderPopup : public HbSliderPopup
+{
+
+public:
+ explicit HbVolumeSliderPopup();
+ virtual ~HbVolumeSliderPopup();
+
+};
+
+#endif // HBVOLUMESLIDERPOPUP_H
+
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcuicomponentrepository.h Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcuicomponentrepository.h Mon Oct 04 00:13:53 2010 +0300
@@ -66,6 +66,7 @@
void testLoadView_FileNotFound();
void testConnect();
void testLoadLayout();
+ void testVolumeSlider();
private:
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcview.h Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcview.h Mon Oct 04 00:13:53 2010 +0300
@@ -98,6 +98,9 @@
void testTimerEvent();
void testIsVideoPositionedCorrectly();
void testIsPositioned();
+ void testShowVolumeSlider();
+ void testShowSendVideo();
+ void testshowReceivedVideo();
private:
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcviewmanager.h Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/tsrc/ut_lcui/inc/ut_lcviewmanager.h Mon Oct 04 00:13:53 2010 +0300
@@ -52,7 +52,8 @@
void testChangeView();
void testTerminateSession();
void testPrepareOrientationChange();
- void testMainWindowEvent();
+ void testHandleBackground();
+ void testhandleForeground();
private:
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/lcuiengine_stub/symbian/stub_lcuiengine_p.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/tsrc/ut_lcui/lcuiengine_stub/symbian/stub_lcuiengine_p.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -196,6 +196,19 @@
return 0;
}
+
+void LcUiEnginePrivate::volume( int /*value*/ )
+{
+}
+
+int LcUiEnginePrivate::volumeValues( LcControlValues& values ) const
+{
+ values.mMaxValue = 10;
+ values.mMinValue = 0;
+ values.mValue = 5;
+ return 0;
+}
+
void LcUiEnginePrivate::timerEvent(QTimerEvent */*event*/)
{
}
@@ -398,6 +411,10 @@
{
}
+void LcUiEnginePrivate::volumeMuted( bool /*value*/ )
+{
+}
+
// End of file
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lceffecthandler.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lceffecthandler.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -252,9 +252,11 @@
mEffectHandler->windowDisappearToFlipComplete( status );
QVERIFY( !sharedVideoWidget->isVisible() );
- lcutStub_LcUiEngine_setLocalPlaying( false );
+ //Video Rects are shown so that to show the last frame even if
+ //no streaming i.e. pause
+ lcutStub_LcUiEngine_setLocalPlaying( false );
mEffectHandler->windowFlipComplete( status );
- QVERIFY( !sharedVideoWidget->isVisible() );
+ QVERIFY( sharedVideoWidget->isVisible() );
lcutStub_LcUiEngine_setLocalPlaying( true );
mEffectHandler->windowFlipComplete( status );
@@ -293,20 +295,21 @@
QVERIFY( sharedVideoWidget->isVisible() );
QCOMPARE( spy.count(), 1 );
- // Players are disabled so even when swap completes, widgets are not set
- // visible
+ //Test: Swap Completes and player state is not playing
+ //Ensur that video windows
+
sharedVideoWidget->hide();
receivedVideoWidget->hide();
- lcutStub_LcUiEngine_setLocalPlaying( false );
+ lcutStub_LcUiEngine_setLocalPlaying( false );
mEffectHandler->windowSwapSharedComplete( status );
- QVERIFY( !sharedVideoWidget->isVisible() );
+ QVERIFY( sharedVideoWidget->isVisible() );
sharedVideoWidget->hide();
receivedVideoWidget->hide();
lcutStub_LcUiEngine_setRemotePlaying( false );
mEffectHandler->windowSwapReceivedComplete( status );
- QVERIFY( !receivedVideoWidget->isVisible() );
- QVERIFY( !sharedVideoWidget->isVisible() );
+ QVERIFY( receivedVideoWidget->isVisible() );
+ QVERIFY( sharedVideoWidget->isVisible() );
}
void UT_LcEffectHandler::testStartEffect()
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcuicomponentrepository.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcuicomponentrepository.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -32,6 +32,7 @@
#include <hbaction.h>
#include <hbinstance.h>
#include <hbprogressdialog.h>
+#include <hbvolumesliderpopup.h>
#define UT_SET_ORIENTATION(orient) \
HbInstance::instance()->allMainWindows().at(0)->setOrientation(orient);
@@ -70,6 +71,7 @@
QVERIFY( !mRepository->mInvitingNote );
QVERIFY( !mRepository->mWaitingNote );
QVERIFY( !mRepository->mRecipientQuery );
+ QVERIFY( !mRepository->mVolumeSlider );
}
@@ -320,3 +322,25 @@
QVERIFY( mRepository->previousLayout() == lcLayoutLandscapeDialpadId );
}
+
+
+void UT_LcUiComponentRepository::testVolumeSlider()
+{
+ mEngine->volume(5);
+ QVERIFY( !mRepository->mVolumeSlider );
+ HbDialog* slider = mRepository->volumeSlider();
+ QVERIFY( mRepository->mVolumeSlider );
+ QVERIFY( slider == mRepository->mVolumeSlider );
+ QVERIFY( !mRepository->mVolumeSlider->isVisible() );
+ QCOMPARE( mRepository->mVolumeSlider->timeout(), lcVolSliderTimeOut );
+ QCOMPARE(mRepository->mVolumeSlider->minimum(), lcVolumeMin);
+ QCOMPARE(mRepository->mVolumeSlider->maximum(), lcVolumeMax);
+ QCOMPARE(mRepository->mVolumeSlider->value(), 5);
+ QCOMPARE(mRepository->mVolumeSlider->singleStep(), 1);
+ // Existing slider returned
+ HbDialog* slider2 = mRepository->volumeSlider();
+ QVERIFY( slider2 == slider );
+}
+
+
+// End of File
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcview.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcview.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -41,6 +41,7 @@
#include <dialpad.h>
#include <dialpadvtkeyhandler.h>
#include <HbTapGesture.h>
+#include <hbvolumesliderpopup.h>
// Stub Helper
#include <hbstub_helper.h>
@@ -279,6 +280,7 @@
QVERIFY( !mEngine->fullScreenMode());
}
+
void UT_LcView::testChangeCamera()
{
mView->init();
@@ -476,8 +478,8 @@
QVERIFY( !HbStubHelper::isStatusBarVisible() );
QVERIFY( !mView->toolBar()->isVisible() );
QVERIFY( !mView->mEndCallButton->isVisible() );
- QVERIFY( !mView->mDuration->isVisible() );
- QVERIFY( !mView->mRecipient->isVisible() );
+ QVERIFY( mView->mDuration->isVisible() );
+ QVERIFY( mView->mRecipient->isVisible() );
// Test2 : not in full screen
mView->init();
@@ -653,8 +655,8 @@
QVERIFY( !HbStubHelper::isStatusBarVisible() );
QVERIFY( !mView->toolBar()->isVisible() );
QVERIFY( !mView->mEndCallButton->isVisible());
- QVERIFY( !mView->mDuration->isVisible());
- QVERIFY( !mView->mRecipient->isVisible());
+ QVERIFY( mView->mDuration->isVisible());
+ QVERIFY( mView->mRecipient->isVisible());
delete event;
// not a timer we want
@@ -691,8 +693,8 @@
QVERIFY( !HbStubHelper::isStatusBarVisible() );
QVERIFY( !mView->isItemVisible(Hb::DockWidgetItem ) );
QVERIFY( !mView->mEndCallButton->isVisible());
- QVERIFY( !mView->mDuration->isVisible());
- QVERIFY( !mView->mRecipient->isVisible());
+ QVERIFY( mView->mDuration->isVisible());
+ QVERIFY( mView->mRecipient->isVisible());
}
void UT_LcView::testMenuAboutToShow()
@@ -867,8 +869,6 @@
}
-
-
void UT_LcView::testIsVideoPositionedCorrectly()
{
//Test1: Null video Widget returns true
@@ -909,3 +909,35 @@
mView->isPositioned();
QVERIFY( !mView->isViewReady );
}
+
+
+void UT_LcView::testShowVolumeSlider()
+{
+ mView->showVolumeSlider(5);
+ QVERIFY( mView->mRepository.mVolumeSlider->isVisible() );
+ QCOMPARE( mView->mRepository.mVolumeSlider->value(), 5);
+ QCOMPARE( mView->mRepository.mVolumeSlider->minimum(), lcVolumeMin );
+ QCOMPARE( mView->mRepository.mVolumeSlider->maximum(), lcVolumeMax);
+}
+
+
+void UT_LcView::testShowSendVideo()
+{
+ mRepository->mReturnSendVideo = true;
+ mView->init();
+ mView->mSharedVideoWidget->setVisible(false);
+ mView->showSendVideo();
+ QVERIFY( mView->mSharedVideoWidget->isVisible() );
+}
+
+
+void UT_LcView::testshowReceivedVideo()
+{
+ mView->init();
+ mView->mReceivedVideoWidget->setVisible(false);
+ mView->showReceivedVideo();
+ QVERIFY( mView->mReceivedVideoWidget->isVisible() );
+}
+
+
+// End of File
--- a/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcviewmanager.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcui/tsrc/ut_lcui/src/ut_lcviewmanager.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -161,35 +161,25 @@
mViewManager->prepareOrientationChange();
}
-void UT_LcUiViewManager::testMainWindowEvent()
+
+void UT_LcUiViewManager::testHandleBackground()
{
- QSignalSpy spy( &mViewManager->mMainWindow, SIGNAL(appFocusGained()) );
- // Not interesting event
- QEvent event(QEvent::MaxUser);
- mViewManager->mMainWindow.eventFilter(0, &event);
- QVERIFY( spy.count() == 0 );
-
- // Focus in event
- QEvent event2(QEvent::ApplicationActivate);
- mViewManager->mMainWindow.eventFilter(0, &event2);
- QVERIFY( spy.count() == 1 );
-
- // test: Complete focus lost
- QSignalSpy spy2( &mViewManager->mMainWindow, SIGNAL(appFocusLost()) );
- // Focus in event
- QEvent event3(QEvent::ApplicationDeactivate);
- mViewManager->mMainWindow.mSurface = 0;
- mViewManager->mMainWindow.eventFilter(0, &event3);
- QVERIFY( spy2.count() == 1 );
-
- // test: partial focus lost i.e. in case of golbal popup.
- QSignalSpy spy3( &mViewManager->mMainWindow, SIGNAL(appFocusLost()) );
- // Partial focus in event i.e. Global popup
- QEvent event4(QEvent::ApplicationDeactivate);
- QWindowSurface surf;
- mViewManager->mMainWindow.mSurface = &surf;
- mViewManager->mMainWindow.eventFilter(0, &event4);
- QVERIFY( spy3.count() == 0 );
+ QSignalSpy spy( &mViewManager->mMainWindow, SIGNAL(appFocusLost()) );
+ QEvent event(QEvent::MaxUser);
+ QVERIFY( spy.count() == 0 );
+ mViewManager->mMainWindow.handleBackground();
+ QVERIFY( spy.count() == 1 );
}
+
+void UT_LcUiViewManager::testhandleForeground()
+{
+ QSignalSpy spy( &mViewManager->mMainWindow, SIGNAL(appFocusGained()) );
+ QEvent event(QEvent::MaxUser);
+ QVERIFY( spy.count() == 0 );
+ mViewManager->mMainWindow.handleForeground();
+ QVERIFY( spy.count() == 1 );
+}
+
+
// end of file
--- a/mmsharing/livecommsui/lcuiengine/inc/lcuiengine.h Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcuiengine/inc/lcuiengine.h Mon Oct 04 00:13:53 2010 +0300
@@ -129,6 +129,8 @@
public slots:
void zoom( int value );
+ void volume( int value );
+ void volumeMuted( bool value );
void stop();
void minimize();
void maximize();
@@ -153,6 +155,7 @@
void toggleSpeaker();
bool isSpeakerOn() const;
int zoomValues(LcControlValues& values) const;
+ int volumeValues( LcControlValues& values ) const;
void toggleDisableCamera();
void setMainCamera(const bool aMainCamera);
bool mainCamera() const;
--- a/mmsharing/livecommsui/lcuiengine/inc/lcuiengine_p.h Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcuiengine/inc/lcuiengine_p.h Mon Oct 04 00:13:53 2010 +0300
@@ -63,6 +63,8 @@
public slots:
void zoom( int value );
+ void volume( int value );
+ void volumeMuted( bool value );
void stop();
void stopLocalVideo();
void startLocalVideo();
@@ -87,6 +89,7 @@
void toggleSpeaker();
bool isSpeakerOn() const;
int zoomValues( LcControlValues& values ) const;
+ int volumeValues( LcControlValues& values ) const;
void toggleDisableCamera();
void setMainCamera(const bool aMainCamera);
bool mainCamera() const;
@@ -204,9 +207,9 @@
XQSettingsManager* mSettingsMgr;
XQSettingsKey* mEarVolumeKey;
- XQSettingsKey* mLoudSpeakerKey;
-
-friend class LcUiEngine;
+ XQSettingsKey* mLoudSpeakerKey;
+
+ friend class LcUiEngine;
};
#endif // LCUIENGINEPRIVATE_H
--- a/mmsharing/livecommsui/lcuiengine/src/lcuiengine.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcuiengine/src/lcuiengine.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -55,6 +55,33 @@
LC_QDEBUG( "livecomms [UI] <- LcUiEngine::zoom()" )
}
+
+// -----------------------------------------------------------------------------
+// LcUiEngine::volume
+// -----------------------------------------------------------------------------
+//
+void LcUiEngine::volume( int value )
+{
+ LC_QDEBUG( "livecomms [UI] -> LcUiEngine::volume()" )
+ d->volume(value);
+ LC_QDEBUG( "livecomms [UI] <- LcUiEngine::volume()" )
+}
+
+
+
+// -----------------------------------------------------------------------------
+// LcUiEngine::volumeMuted
+// -----------------------------------------------------------------------------
+//
+void LcUiEngine::volumeMuted( bool value )
+{
+ LC_QDEBUG( "livecomms [UI] -> LcUiEngine::volumeMuted()" )
+ d->volumeMuted(value);
+ LC_QDEBUG( "livecomms [UI] <- LcUiEngine::volumeMuted()" )
+}
+
+
+
// -----------------------------------------------------------------------------
// LcUiEngine::stop
// -----------------------------------------------------------------------------
@@ -209,6 +236,20 @@
return d->zoomValues(values);
}
+
+
+// -----------------------------------------------------------------------------
+// LcUiEngine::volumeValues
+// -----------------------------------------------------------------------------
+//
+int LcUiEngine::volumeValues( LcControlValues& values ) const
+{
+ LC_QDEBUG( "livecomms [UI] <-> LcUiEngine::volumeValues()" )
+ return d->volumeValues(values);
+}
+
+
+
// -----------------------------------------------------------------------------
// LcUiEngine::toggleEnableCamera
// -----------------------------------------------------------------------------
--- a/mmsharing/livecommsui/lcuiengine/src/lcuiengine_p.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcuiengine/src/lcuiengine_p.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -83,7 +83,7 @@
mActivityManager(0),
mSettingsMgr(0),
mEarVolumeKey(0),
- mLoudSpeakerKey(0)
+ mLoudSpeakerKey(0)
{
LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::LcUiEnginePrivate()" )
@@ -168,6 +168,40 @@
}
// -----------------------------------------------------------------------------
+// LcUiEnginePrivate::volume
+// -----------------------------------------------------------------------------
+//
+void LcUiEnginePrivate::volume( int value )
+{
+ LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::volume()" )
+ // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
+ MLcAudioControl* audio = audioControl();
+ if ( audio ) {
+ int currentValue( -1 ); // Not defined yet
+ TRAP_IGNORE( currentValue = audio->LcVolumeL());
+ if ( currentValue != value ) {
+ TRAP_IGNORE( audio->SetLcVolumeL( value ) );
+ }
+ }
+}
+
+// -----------------------------------------------------------------------------
+// LcUiEnginePrivate::volumeMuted
+// -----------------------------------------------------------------------------
+//
+void LcUiEnginePrivate::volumeMuted( bool value)
+{
+ LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::volumeMuted()" )
+ // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
+ MLcAudioControl* audio = audioControl();
+ if ( audio ) {
+ LC_QDEBUG_2( "livecomms [UI] Volume Mute Status = ", value )
+ TRAP_IGNORE( audio->MuteLcAudioL(value) );
+ }
+ LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::volumeMuted()" )
+}
+
+// -----------------------------------------------------------------------------
// LcUiEnginePrivate::stop
// -----------------------------------------------------------------------------
//
@@ -442,6 +476,32 @@
}
// -----------------------------------------------------------------------------
+// LcUiEnginePrivate::volumeValues
+// -----------------------------------------------------------------------------
+//
+int LcUiEnginePrivate::volumeValues( LcControlValues& values ) const
+{
+ LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::volumeValues()" )
+ int err( -1 );
+ // TODO: Replace TRAP with QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION (Qt4.5.2)
+ MLcAudioControl* volume = audioControl();
+ if ( volume ) {
+ //HardCoded Value since no API for quering volume control
+ //Information.
+ TRAP( err,
+ values.mMinValue = lcVolumeMin;
+ values.mMaxValue = lcVolumeMax;
+ values.mValue = volume->LcVolumeL(); );
+ } else {
+ LC_QDEBUG( "livecomms [UI] - Volume control does not exisit" )
+ }
+ LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::volumeValues()" )
+ return err;
+}
+
+
+
+// -----------------------------------------------------------------------------
// LcUiEnginePrivate::toggleEnableCamera
// -----------------------------------------------------------------------------
//
@@ -498,7 +558,6 @@
}
setMainCamera( !mMainCamera );
-
// Enabling / disabling the camera is an asynchronous operation.
// Assuming here that the operation will eventually succeed.
if ( mMainCamera ) {
@@ -1027,6 +1086,7 @@
//
MLcAudioControl* LcUiEnginePrivate::audioControl() const
{
+ LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::audioControl()" )
MLcAudioControl* audioControl( 0 );
if ( session().LocalVideoPlayer() ) {
audioControl = session().LocalVideoPlayer()->LcAudioControl();
@@ -1034,6 +1094,7 @@
if ( !audioControl && session().RemoteVideoPlayer() ) {
audioControl = session().RemoteVideoPlayer()->LcAudioControl();
}
+ LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::audioControl()" )
return audioControl;
}
@@ -1463,6 +1524,7 @@
void LcUiEnginePrivate::doUpdate( MLcVideoPlayer& aPlayer )
{
LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::doUpdate(), videoplayer" )
+
if ( aPlayer.LcVideoPlayerState() == MLcVideoPlayer::EPlaying ) {
if ( &aPlayer == session().RemoteVideoPlayer() ) {
if ( mWaitingNote ) {
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/inc/ut_lcuiengine.h Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/inc/ut_lcuiengine.h Mon Oct 04 00:13:53 2010 +0300
@@ -93,7 +93,9 @@
void testShareVideoIsNotAllowedShown();
void testShareVideoPermissionAskedAlways();
void testVolumeLevelChanged();
-
+ void testVolume();
+ void testVolumeValues();
+ void testvolumeMuted();
private:
LcUiEngine* mEngine;
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/src/lcvideoplayerstub.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/src/lcvideoplayerstub.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -358,16 +358,16 @@
iVolume++;
}
-// -----------------------------------------------------------------------------
-// From MLcAudioControl
-// -----------------------------------------------------------------------------
-//
void CLcVideoPlayer::DecreaseLcVolumeL()
{
User::LeaveIfError( lcutStub_LcEngine_failure() );
iVolume--;
}
+// -----------------------------------------------------------------------------
+// From MLcAudioControl
+// -----------------------------------------------------------------------------
+//
TInt CLcVideoPlayer::LcCameraCountL()
{
User::LeaveIfError( lcutStub_LcEngine_failure() );
--- a/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/src/ut_lcuiengine.cpp Fri Sep 17 08:28:43 2010 +0300
+++ b/mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/src/ut_lcuiengine.cpp Mon Oct 04 00:13:53 2010 +0300
@@ -1272,5 +1272,46 @@
}
+void UT_LcUiEngine::testVolume()
+{
+ MLcVideoPlayer* player =
+ mEngine->d->mLiveCommsEngine->Session().LocalVideoPlayer();
+
+ mEngine->d->volume(1);
+ QCOMPARE( player->LcAudioControl()->LcVolumeL(), 1 );
+
+ mEngine->d->volume(2);
+ QCOMPARE( player->LcAudioControl()->LcVolumeL(), 2 );
+
+ mEngine->d->volume(2);
+ QCOMPARE( player->LcAudioControl()->LcVolumeL(), 2 );
+}
+
+
+void UT_LcUiEngine::testVolumeValues()
+{
+ LcControlValues volumeData;
+ MLcVideoPlayer* player =
+ mEngine->d->mLiveCommsEngine->Session().LocalVideoPlayer();
+ mEngine->d->volume(5);
+ mEngine->volumeValues(volumeData);
+
+ QCOMPARE( volumeData.mMaxValue, lcVolumeMax ); // Hardcoded Value since no getter API yet
+ QCOMPARE( volumeData.mMinValue, lcVolumeMin ); // Hardcoded Value since no getter API yet
+ QCOMPARE( volumeData.mValue, 5 );
+}
+
+
+
+void UT_LcUiEngine::testvolumeMuted()
+{
+ MLcVideoPlayer* player =
+ mEngine->d->mLiveCommsEngine->Session().LocalVideoPlayer();
+ mEngine->d->volumeMuted(true);
+ QVERIFY ( player->LcAudioControl()->IsLcAudioMutedL());
+
+ mEngine->d->volumeMuted(false);
+ QVERIFY ( !player->LcAudioControl()->IsLcAudioMutedL());
+}
// End of file
--- a/mmshplugins/group/bld.inf Fri Sep 17 08:28:43 2010 +0300
+++ b/mmshplugins/group/bld.inf Mon Oct 04 00:13:53 2010 +0300
@@ -21,8 +21,9 @@
PRJ_MMPFILES
#include "../mmshaoplugin/group/bld.inf"
-#include "../mmshaiwplugin/group/bld.inf"
+//#include "../mmshaiwplugin/group/bld.inf" - enable after removing AVKON Notifier API dependencies
#include "../mmshsipcrplugin/group/bld.inf"
//#include "../mmshsettingsuiplugin/group/bld.inf"
#include "../mmshwpadapterplugin/group/bld.inf"
//#include "../mmcctranscoder/group/bld.inf"
+
--- a/package_definition.xml Fri Sep 17 08:28:43 2010 +0300
+++ b/package_definition.xml Mon Oct 04 00:13:53 2010 +0300
@@ -53,7 +53,7 @@
<unit bldFile="mmshplugins/mmshaoplugin/group"/>
</component>
<component id="mmshaiwplugin" filter="s60" name="Multimedia Sharing AIW Plugin" class="plugin">
- <unit bldFile="mmshplugins/mmshaiwplugin/group"/>
+ <!-- <unit bldFile="mmshplugins/mmshaiwplugin/group"/> -->
</component>
<component id="mmshsipcrplugin" filter="s60" name="Multimedia Sharing SIP Client Resolver Plugin" class="plugin">
<unit bldFile="mmshplugins/mmshsipcrplugin/group"/>