201033
authorhgs
Mon, 23 Aug 2010 15:49:33 +0300
changeset 43 fc383c0181e8
parent 42 607cc97c6047
child 44 b6ab36974f47
201033
layers.sysdef.xml
videotelephony.pro
vtuis/lcvtindicatorcontroller/data/lcvtindicatorcontroller_stub.pkg
vtuis/lcvtindicatorcontroller/data/lcvtindicatorcontroller_stub.sis
vtuis/lcvtindicatorcontroller/lcvtindicatorcontroller.pro
vtuis/lcvtindicatorcontroller/rom/lcvtindctr.iby
vtuis/lcvtindicatorplugin/data/lcvtindicatorplugin_stub.pkg
vtuis/lcvtindicatorplugin/data/lcvtindicatorplugin_stub.sis
vtuis/lcvtindicatorplugin/lcvtindicatorplugin.pro
vtuis/lcvtindicatorplugin/rom/lcvtindicatorplugin.iby
vtuis/lcvtindicatorplugin/src/lcvtindicatorplugin.cpp
vtuis/lcvtindicatorplugin/tsrc/ut_lcvtindicatorplugin/src/ut_lcvtindicatorplugin.cpp
vtuis/lcvtindicatorplugin/tsrc/ut_lcvtindicatorplugin/stubs/qprocess.h
vtuis/lcvtindicatorplugin/tsrc/ut_lcvtindicatorplugin/stubs/symbianstubs.cpp
vtuis/lcvtindicatorplugin/tsrc/ut_lcvtindicatorplugin/stubs/symbianstubs_helper.h
vtuis/lcvtplugin/group/lcvt.mmp
vtuis/lcvtplugin/inc/base/clcvtsession.h
vtuis/lcvtplugin/inc/control/clcvtlocalvideoplayer.h
vtuis/lcvtplugin/src/base/clcvtsession.cpp
vtuis/lcvtplugin/src/control/clcvtlocalvideoplayer.cpp
--- a/layers.sysdef.xml	Fri Jul 23 12:39:42 2010 +0300
+++ b/layers.sysdef.xml	Mon Aug 23 15:49:33 2010 +0300
@@ -15,6 +15,8 @@
         <unit name="vtengines" unitID="tedo.vtengines" bldFile="&layer_real_source_path;/vtengines/Group" mrp="" />  
         <unit name="lcvtplugin" unitID="tedo.lcvtplugin" bldFile="&layer_real_source_path;/vtuis/lcvtplugin/group" mrp="" /> 
 				<unit name="lcvtapp" unitID="tedo.lcvtapp" bldFile="&layer_real_source_path;/vtuis/lcvtapp" mrp="" proFile="lcvtapp.pro" />
+				<unit name="lcvtindicatorplugin" unitID="tedo.lcvtindicatorplugin" bldFile="&layer_real_source_path;/vtuis/lcvtindicatorplugin" mrp="" proFile="lcvtindicatorplugin.pro" />
+        <unit name="lcvtindicatorcontroller" unitID="tedo.lcvtindicatorcontroller" bldFile="&layer_real_source_path;/vtuis/lcvtindicatorcontroller" mrp="" proFile="lcvtindicatorcontroller.pro" />
       </module>
     </layer>
   </systemModel>
--- a/videotelephony.pro	Fri Jul 23 12:39:42 2010 +0300
+++ b/videotelephony.pro	Mon Aug 23 15:49:33 2010 +0300
@@ -27,6 +27,6 @@
     :BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"videotelephony_plat/group/bld.inf\""
 }
 
-//SUBDIRS += vtuis/lcvtindicatorplugin
-//SUBDIRS += vtuis/lcvtindicatorcontroller
+SUBDIRS += vtuis/lcvtindicatorplugin
+SUBDIRS += vtuis/lcvtindicatorcontroller
 SUBDIRS += vtuis/lcvtapp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vtuis/lcvtindicatorcontroller/data/lcvtindicatorcontroller_stub.pkg	Mon Aug 23 15:49:33 2010 +0300
@@ -0,0 +1,30 @@
+;
+; 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:
+;
+; Languages
+&EN
+
+; Header
+#{"lcvtindicatorcontroller"}, (0x200315EC), 1, 0, 0, TYPE=SA
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+;Files
+""-"z:\sys\bin\lcvtindicatorcontroller.dll"
+
Binary file vtuis/lcvtindicatorcontroller/data/lcvtindicatorcontroller_stub.sis has changed
--- a/vtuis/lcvtindicatorcontroller/lcvtindicatorcontroller.pro	Fri Jul 23 12:39:42 2010 +0300
+++ b/vtuis/lcvtindicatorcontroller/lcvtindicatorcontroller.pro	Mon Aug 23 15:49:33 2010 +0300
@@ -38,8 +38,7 @@
         "DEFFILE eabi/lcvtindicatorcontroller.def" \
         "$${LITERAL_HASH}endif"
     MMP_RULES += defFiles
-    :BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>"           
-    :BLD_INF_RULES.prj_exports += "./inc/lcvtindicatorcontroller.h /epoc32/include/lcvtindicatorcontroller.h"
+    :BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>"               
     :BLD_INF_RULES.prj_exports += "rom/lcvtindctr.iby CORE_APP_LAYER_IBY_EXPORT_PATH(lcvtindctr.iby)"
 }
 # Input
--- a/vtuis/lcvtindicatorcontroller/rom/lcvtindctr.iby	Fri Jul 23 12:39:42 2010 +0300
+++ b/vtuis/lcvtindicatorcontroller/rom/lcvtindctr.iby	Mon Aug 23 15:49:33 2010 +0300
@@ -25,7 +25,7 @@
 file=ABI_DIR\UREL\lcvtindicatorcontroller.dll SHARED_LIB_DIR\lcvtindicatorcontroller.dll
 
 // Enabler for eclipsing ROM binaries
-//data=ZSYSTEM\install\lcvtplugin_stub.sis           system\install\lcvtplugin_stub.sis
+data=ZSYSTEM\install\lcvtindicatorcontroller_stub.sis           system\install\lcvtindicatorcontroller_stub.sis
 
 #endif
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vtuis/lcvtindicatorplugin/data/lcvtindicatorplugin_stub.pkg	Mon Aug 23 15:49:33 2010 +0300
@@ -0,0 +1,30 @@
+;
+; 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:
+;
+; Languages
+&EN
+
+; Header
+#{"lcvtindicatorplugin"}, (0x200315EB), 1, 0, 0, TYPE=SA
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+;Files
+""-"z:\sys\bin\lcvtindicatorplugin.dll"
+""-"z:\resource\plugins\indicators\lcvtindicatorplugin.qtplugin"
Binary file vtuis/lcvtindicatorplugin/data/lcvtindicatorplugin_stub.sis has changed
--- a/vtuis/lcvtindicatorplugin/lcvtindicatorplugin.pro	Fri Jul 23 12:39:42 2010 +0300
+++ b/vtuis/lcvtindicatorplugin/lcvtindicatorplugin.pro	Mon Aug 23 15:49:33 2010 +0300
@@ -15,7 +15,6 @@
 #
 
 TEMPLATE = lib
-TARGET = lcvtindicatorplugin
 CONFIG += plugin hb
 
 # directories
--- a/vtuis/lcvtindicatorplugin/rom/lcvtindicatorplugin.iby	Fri Jul 23 12:39:42 2010 +0300
+++ b/vtuis/lcvtindicatorplugin/rom/lcvtindicatorplugin.iby	Mon Aug 23 15:49:33 2010 +0300
@@ -21,5 +21,9 @@
 #include <data_caging_paths_for_iby.hrh>
 
 file=ABI_DIR\UREL\lcvtindicatorplugin.dll               SHARED_LIB_DIR\lcvtindicatorplugin.dll 
-data=\epoc32\data\z\resource\plugins\indicators\lcvtindicatorplugin.qtplugin   \resource\plugins\indicators\lcvtindicatorplugin.qtplugin
+data=\epoc32\data\z\resource\plugins\indicators\lcvtindicatorplugin.qtplugin   RESOURCE_FILES_DIR\plugins\indicators\lcvtindicatorplugin.qtplugin
+
+// Enabler for eclipsing ROM binaries
+data=ZSYSTEM\install\lcvtindicatorplugin_stub.sis           system\install\lcvtindicatorplugin_stub.sis
+
 #endif
--- a/vtuis/lcvtindicatorplugin/src/lcvtindicatorplugin.cpp	Fri Jul 23 12:39:42 2010 +0300
+++ b/vtuis/lcvtindicatorplugin/src/lcvtindicatorplugin.cpp	Mon Aug 23 15:49:33 2010 +0300
@@ -18,8 +18,7 @@
 #include <QtPlugin>
 #include <QVariant>
 #include <QDebug>
-#include <eikenv.h>
-#include <apgtask.h>
+#include <QProcess>
 
 #include "lcvtindicatorplugin.h"
 
@@ -37,7 +36,7 @@
     mError(0)
 {
     qDebug() << "LcVtIndicatorPlugin::LcVtIndicatorPlugin()";
-    mIndicatorTypes << IndicatorType;
+    mIndicatorTypes << IndicatorType;    
 }
 
 // -----------------------------------------------------------------------------
@@ -45,7 +44,7 @@
 // -----------------------------------------------------------------------------
 //
 LcVtIndicatorPlugin::~LcVtIndicatorPlugin()
-{
+{    
 }
 
 // -----------------------------------------------------------------------------
@@ -160,15 +159,8 @@
 //
 bool LcVtIndicatorPlugin::bringVtToForeground()
 {
-    bool ret = false;
-    RWsSession& wsSession = CEikonEnv::Static()->WsSession();
-    TApaTaskList taskList( wsSession );
-    const TUid KUidVtApp = { 0x101F8681 }; 
-    TApaTask task = taskList.FindApp(KUidVtApp);
-    if (task.Exists()) {
-        qDebug() << "-> SwitchBackToVTCall";
-        task.BringToForeground();
-        ret = true;
-    }
-    return ret;
+    qDebug() << "LcVtIndicatorPlugin::bringVtToForeground()";
+    const QString AppName = "videotelui.exe";
+    return QProcess::startDetached(AppName);
 }
+
--- a/vtuis/lcvtindicatorplugin/tsrc/ut_lcvtindicatorplugin/src/ut_lcvtindicatorplugin.cpp	Fri Jul 23 12:39:42 2010 +0300
+++ b/vtuis/lcvtindicatorplugin/tsrc/ut_lcvtindicatorplugin/src/ut_lcvtindicatorplugin.cpp	Mon Aug 23 15:49:33 2010 +0300
@@ -16,7 +16,7 @@
 */
 #include "ut_lcvtindicatorplugin.h"
 #include "lcvtindicatorplugin.h"
-#include "symbianstubs_helper.h"
+#include "qprocess.h"
 
 #include <QtTest/QtTest>
 
@@ -78,16 +78,15 @@
                  HbIndicatorInterface::NoInteraction) );
     QCOMPARE( spy.count(), 0 );
     
-    //Indicator activated, no VT running => deactivating
-    SymbianStubHelper::setVtTaskExists(false);
+    //Indicator activated, no VT running => deactivating    
     QVERIFY( !mLcVtIndicatorPlugin->handleInteraction(
                      HbIndicatorInterface::InteractionActivated) );
     QCOMPARE( spy.count(), 1 );
     
-    //Indicator activated, VT running => bringing to FG
-    SymbianStubHelper::setVtTaskExists(true);
+    //Indicator activated, VT running => bringing to FG    
     spy.clear();
     QVERIFY( mLcVtIndicatorPlugin->bringVtToForeground() );    
+    QVERIFY( QProcess::isRunning );    
     QCOMPARE( spy.count(), 0 );   
 }
 
@@ -164,10 +163,8 @@
 }
 
 void UT_LcVtIndicatorPlugin::testBringVtToForeground()
-{
-    SymbianStubHelper::setVtTaskExists(false);
+{    
     QVERIFY( !mLcVtIndicatorPlugin->bringVtToForeground() );
-    
-    SymbianStubHelper::setVtTaskExists(true);
-    QVERIFY( mLcVtIndicatorPlugin->bringVtToForeground() );    
+    QVERIFY( QProcess::isRunning );    
 }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vtuis/lcvtindicatorplugin/tsrc/ut_lcvtindicatorplugin/stubs/qprocess.h	Mon Aug 23 15:49:33 2010 +0300
@@ -0,0 +1,12 @@
+
+#ifndef QPROCESS_H
+#define QPROCESS_H
+
+class QProcess
+{    
+public:
+    static bool startDetached(const QString &program){ QProcess::isRunning = true; } ;
+    static bool isRunning;
+};
+
+#endif // QPROCESS_H
\ No newline at end of file
--- a/vtuis/lcvtindicatorplugin/tsrc/ut_lcvtindicatorplugin/stubs/symbianstubs.cpp	Fri Jul 23 12:39:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* 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:  HbMenu2 implementation.
-*
-*/
-
-
-#include "symbianstubs_helper.h"
-#include <apgtask.h>
-#include <w32std.h>
-#include <qglobal.h>
-
-bool testVtTaskExists = false;
-
-void SymbianStubHelper::reset()
-{
-    testVtTaskExists = false;
-}
-
-void SymbianStubHelper::setVtTaskExists(bool exists)
-{
-    testVtTaskExists = exists;
-}
-
-
-///////////////////////////////////////////////
-
-TApaTask TApaTaskList::FindApp(TUid aAppUid)
-{
-    Q_UNUSED(aAppUid)
-    RWsSession session;
-    return TApaTask(session);
-}
-
-
-TBool TApaTask::Exists() const
-{
-    return testVtTaskExists;
-}
-
-void TApaTask::BringToForeground()
-{
-    
-}
--- a/vtuis/lcvtindicatorplugin/tsrc/ut_lcvtindicatorplugin/stubs/symbianstubs_helper.h	Fri Jul 23 12:39:42 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* 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 SYMBIANSTUB_HELPER_H
-#define SYMBIANSTUB_HELPER_H
-
-
-/**
-* Helper class to control stub behavior
-*
-*/ 
-class SymbianStubHelper 
-{
-    public:
-        static void reset();
-        static void setVtTaskExists(bool exists);
-};
-
-#endif //SYMBIANSTUB_HELPER_H
--- a/vtuis/lcvtplugin/group/lcvt.mmp	Fri Jul 23 12:39:42 2010 +0300
+++ b/vtuis/lcvtplugin/group/lcvt.mmp	Mon Aug 23 15:49:33 2010 +0300
@@ -36,6 +36,8 @@
 USERINCLUDE  ../inc/common
 USERINCLUDE  ../inc/control
 USERINCLUDE  ../inc/states
+USERINCLUDE  ../../lcvtindicatorcontroller/inc
+
 APP_LAYER_SYSTEMINCLUDE
 SYSTEMINCLUDE 	/epoc32/include/ecom
 SYSTEMINCLUDE   ../../../inc
@@ -91,3 +93,5 @@
 DEBUGLIBRARY    vtlogger.lib
 
 LIBRARY         phoneclient.lib
+
+LIBRARY         lcvtindicatorcontroller.lib
--- a/vtuis/lcvtplugin/inc/base/clcvtsession.h	Fri Jul 23 12:39:42 2010 +0300
+++ b/vtuis/lcvtplugin/inc/base/clcvtsession.h	Mon Aug 23 15:49:33 2010 +0300
@@ -34,7 +34,6 @@
 #include    <lcsessionobserver.h>
 #include    <lcuiprovider.h>
 #include    <lcengine.h>
-//#include    <lcvtindicatorcontroller.h>
 #include    <cvtlogger.h>
 #include    <mvtengeventobserver.h>
 #include    <mvtengcommandobserver.h>
@@ -54,6 +53,7 @@
 #include    "tlcvtcamerahandler.h"
 #include    "clcvtactiveexec.h"
 #include    "tlcvtstatebase.h"
+#include    "lcvtindicatorcontroller.h"
 
 #define     NGA_VIDEO_RENDER 
 
@@ -556,7 +556,10 @@
 
     HBufC* iRemoteDisplayName;
     HBufC* iRemoteDetails;
-    //LcVtIndicatorController* iIndicatorCtr;
+
+    TInt VideoSendingKey;
+    
+    LcVtIndicatorController* iIndicatorCtr;
     };
     
 
--- a/vtuis/lcvtplugin/inc/control/clcvtlocalvideoplayer.h	Fri Jul 23 12:39:42 2010 +0300
+++ b/vtuis/lcvtplugin/inc/control/clcvtlocalvideoplayer.h	Mon Aug 23 15:49:33 2010 +0300
@@ -74,7 +74,6 @@
 private: // Data
     
     TVtCameraHandler& iCameraHandler;
-    TBool           iIsPlaying;
     TBool           iOrientationChanged;
     
     };
--- a/vtuis/lcvtplugin/src/base/clcvtsession.cpp	Fri Jul 23 12:39:42 2010 +0300
+++ b/vtuis/lcvtplugin/src/base/clcvtsession.cpp	Mon Aug 23 15:49:33 2010 +0300
@@ -25,6 +25,7 @@
 #include <eikenv.h>
 #include <eikappui.h>
 #include <apgcli.h>
+#include <centralrepository.h> 
 
 #include "clcvtsession.h"
 
@@ -39,6 +40,10 @@
 #include "lcvtplugincommand.h"
 #include "lcvtutility.h"
 
+// User selectable Call answer status values
+const TInt KAllwaysQuery = 0;
+const TInt KAllwaysAllow = 2;
+
 // Default call index.
 const TInt KVtUiDefaultCallId = 1;
 
@@ -266,8 +271,20 @@
             TCallBack( &DelayedHandleLayoutChanged, this ),
             CActive::EPriorityStandard );   
 #endif    
+    CRepository* repository = CRepository::NewL( KCRUidTelephonySettings );
 
-    //iIndicatorCtr = new  ( ELeave ) LcVtIndicatorController();
+    if ( repository->Get( KSettingsVTVideoSending, VideoSendingKey ) == KErrNone )
+        {
+        __VTPRINT2( DEBUG_GEN, "CLcVtSession.IsFeatureSupported get key=%d", VideoSendingKey )
+        }
+    else
+        {
+        __VTPRINT( DEBUG_GEN, "CLcVtSession.IsFeatureSupported set key to default KAllwaysAllow" )
+        VideoSendingKey = KAllwaysAllow;
+        }
+    delete repository;
+    
+    iIndicatorCtr = new  ( ELeave ) LcVtIndicatorController();
     __VTPRINTEXIT( "CLcVtSession.ConstructL" )
     
     }
@@ -303,10 +320,10 @@
     
     delete iRemoteDisplayName;
     delete iRemoteDetails;
-//    if (iIndicatorCtr) {
-//        iIndicatorCtr->disableActiveCallIndicator();
-//        delete iIndicatorCtr;
-//    }    
+    if (iIndicatorCtr) {
+        iIndicatorCtr->disableActiveCallIndicator();
+        delete iIndicatorCtr;
+    }    
     __VTPRINTEXIT( "CLcVtSession.~CLcVtSession" )
     FeatureManager::UnInitializeLib();  
     }
@@ -844,13 +861,13 @@
     TInt err = KErrNotFound;
     if ( LcVtUtility::HasStillImage( iModel->Media() ) )
         {
-        __VTPRINT( DEBUG_GEN, "VtUi.:CmdDisableVideoL.HasStill" )
+        __VTPRINT( DEBUG_GEN, "CLcVtSession.CmdDisableVideoL.HasStill" )
         MVtEngMedia::TMediaSource source = MVtEngMedia::EMediaStillImage;
         TRAP( err, ExecuteCmdL( KVtEngSetSource, source ) );
         }
     if ( ( err != KErrNone ) )
         {
-        __VTPRINT( DEBUG_GEN, "VtUi.:CmdDisableVideoL.MediaNone" )
+        __VTPRINT( DEBUG_GEN, "CLcVtSession.CmdDisableVideoL.MediaNone" )
         MVtEngMedia::TMediaSource source = MVtEngMedia::EMediaNone;
         ExecuteCmdL( KVtEngSetSource, source );
         }
@@ -946,12 +963,13 @@
         iLocalVideoWindow->SetOrdinalPosition( 1 , priority );
         iRwSession.Flush();
         }
-//    if ( aIsForeground ) {
-//            iIndicatorCtr->disableActiveCallIndicator();
-//        }
-//    else  {
-//            iIndicatorCtr->enableActiveCallIndicator();
-//        }
+    if ( aIsForeground )
+       {
+       iIndicatorCtr->disableActiveCallIndicator();
+       }
+    else {
+       iIndicatorCtr->enableActiveCallIndicator();
+       }
 
     __VTPRINTEXIT( "CLcVtSession.SetForegroundStatus" )
     
@@ -1175,13 +1193,32 @@
             ActiveExecInitExecuteCommandL( KVtEngStartRenderRemote, aRequest );
             //TRequestStatus* status = &aRequest;
             //User::RequestComplete( status, KErrNone );            
+
+            MVtEngSessionInfo::TDirection direction;
+            if ( iModel->Session().GetDirection( direction ) != KErrNone )
+                {
+                direction = MVtEngSessionInfo::EDirectionMT;
+                }
             
-            MVtEngSessionInfo& session = iModel->Session();
             MVtEngMedia& media = iModel->Media();    
             if ( LcVtUtility::HasCameras( media ) )
                 {
-                //aNextState = EVtSessionAnsweredDoPrepareCamera;
-                aNextState = EVtSessionAnsweredSetlectNone;
+                if ( direction == MVtEngSessionInfo::EDirectionMT )
+                    {
+                        if ( VideoSendingKey == KAllwaysAllow)
+                            {
+                            aNextState = EVtSessionAnsweredDoPrepareCamera;
+                            }
+                        else
+                            {
+                            aNextState = EVtSessionAnsweredSetlectNone;
+                            }
+                    }
+                else
+                    {
+                    //MVtEngSessionInfo::EDirectionMO
+                    aNextState = EVtSessionAnsweredDoPrepareCamera;
+                    }
                 }
             else
                 {
@@ -2198,17 +2235,24 @@
 {
     __VTPRINT2( DEBUG_GEN, "CLcVtSession.IsFeatureSupported feature=%d", aLcFeature)
     TBool flag = EFalse;
+
     switch ( aLcFeature )
         {
         case CLcEngine::ELcSendVideoQuery:
             {
+            //MO call: return false; MT call: return true if key = Ask first, return false if key = No or Yes.
             MVtEngSessionInfo::TDirection direction;
             if ( iModel->Session().GetDirection( direction ) != KErrNone )
                 {
                 direction = MVtEngSessionInfo::EDirectionMT;
                 }
             __VTPRINT2( DEBUG_GEN, "CLcVtSession.IsFeatureSupported direction=%d", direction )
-            flag = ( direction == MVtEngSessionInfo::EDirectionMT );
+
+            if ( direction == MVtEngSessionInfo::EDirectionMT 
+                 && VideoSendingKey == KAllwaysQuery )
+                {
+                flag = ETrue;
+                }
             }
             break;
 
--- a/vtuis/lcvtplugin/src/control/clcvtlocalvideoplayer.cpp	Fri Jul 23 12:39:42 2010 +0300
+++ b/vtuis/lcvtplugin/src/control/clcvtlocalvideoplayer.cpp	Mon Aug 23 15:49:33 2010 +0300
@@ -51,7 +51,6 @@
     CLcVtVideoPlayerBase( avtSession, aLcAudioControl ),
     iCameraHandler( aCameraHandler ) 
     {
-    iIsPlaying = ETrue;
     iOrientationChanged = EFalse;
     }
 
@@ -77,8 +76,17 @@
 //
 MLcVideoPlayer::TLcVideoPlayerState 
 CLcVtLocalVideoPlayer::LcVideoPlayerState() const
-    {    
-    TLcVideoPlayerState playerState = MLcVideoPlayer::EPlaying;
+    {
+    TLcVideoPlayerState playerState;
+    if ( ivtSession->LcVtStates().MediaState().IsVideo() )
+        {
+        playerState = MLcVideoPlayer::EPlaying;
+        }
+    else
+        {
+        playerState = MLcVideoPlayer::EPaused;
+        }
+    __VTPRINT2( DEBUG_GEN, "CLcVtLocalVideoPlayer.LcVideoPlayerState = %d", playerState )
     return playerState;
     }
 
@@ -88,7 +96,7 @@
 //
 TBool CLcVtLocalVideoPlayer::LcIsPlayingL()
     {         
-    TBool result = ivtSession->LcVtStates().MediaState().IsVideo();
+    TBool result = (LcVideoPlayerState() == MLcVideoPlayer::EPlaying);
     __VTPRINT2( DEBUG_GEN, "CLcVtLocalVideoPlayer.LcIsPlayingL = %d", result )
     return result;
     }
@@ -100,7 +108,6 @@
 void CLcVtLocalVideoPlayer::LcPlayL(TLcVideoPlayerSource /*aSource*/)
     {
     __VTPRINT( DEBUG_GEN, "CLcVtLocalVideoPlayer.LcPlayL" )
-    iIsPlaying = ETrue;
     ivtSession->HandleCommandL(EPluginCmdEnableVideo);
     }
 
@@ -111,7 +118,6 @@
 void CLcVtLocalVideoPlayer::LcPauseL()
     {
     __VTPRINT( DEBUG_GEN, "CLcVtLocalVideoPlayer.LcPauseL" )
-    iIsPlaying = EFalse;
     ivtSession->HandleCommandL(EPluginCmdDisableVideo);
     }