tsrc/fusionmpxplayer_test/FusionMpxPlayerTestExeUi/src/FusionPlayerTestAppUi.cpp
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <aknutils.h>
       
    20 #include <S32FILE.H>
       
    21 #include <f32file.h>
       
    22 #include <EIKAPP.H>
       
    23 
       
    24 #include "VCXTestLog.h"
       
    25 #include "VCXTestCommon.h"
       
    26 #include "FusionMpxPlayerTestCommon.h"
       
    27 #include "FusionPlayerTestApp.hrh"
       
    28 #include "FusionPlayerTestAppUi.h"
       
    29 
       
    30 // Constants
       
    31 
       
    32 // ConstructL is called by the application framework
       
    33 void CFusionPlayerTestAppAppUi::ConstructL()
       
    34     {
       
    35 	BaseConstructL(EAknEnableSkin);
       
    36 
       
    37 	RProcess process;
       
    38 	
       
    39 	iCmdListener = CFusionMpxPlayerTestCmdListener::NewL( process.Id(), this );
       
    40 	
       
    41     User::LeaveIfError( CVCXTestCommon::GetPSProperty( KFusionMpxPlayerTestPScategory, 
       
    42             KFusionMpxPlayerTestExeGlobalTesterCount, iPSKeyBase ) );
       
    43     iPSKeyBase = iPSKeyBase * 1000 + process.Id();    
       
    44     }
       
    45 
       
    46 CFusionPlayerTestAppAppUi::CFusionPlayerTestAppAppUi()
       
    47     {
       
    48     }
       
    49 
       
    50 CFusionPlayerTestAppAppUi::~CFusionPlayerTestAppAppUi()
       
    51     {
       
    52     VCXLOGLO1(">>>CFusionPlayerTestAppAppUi::~CFusionPlayerTestAppAppUi");
       
    53     
       
    54     RProcess process;
       
    55 	
       
    56     delete iCmdListener;
       
    57 	iCmdListener = NULL;
       
    58 	
       
    59     VCXLOGLO2("CFusionPlayerTestAppAppUi:: Sending EVcxFusionMpxPlayerResponseShutdown (%d) ----->", 
       
    60             KFusionMpxPlayerTestExePsKeyResponse + iPSKeyBase );
       
    61     
       
    62     CVCXTestCommon::SetPSProperty( KFusionMpxPlayerTestPScategory,
       
    63             KFusionMpxPlayerTestExePsKeyResponse + iPSKeyBase, EVcxFusionMpxPlayerResponseShutdown );
       
    64     
       
    65     VCXLOGLO1("<<<CFusionPlayerTestAppAppUi::~CFusionPlayerTestAppAppUi");
       
    66     }
       
    67 
       
    68 // handle menu commands
       
    69 void CFusionPlayerTestAppAppUi::HandleCommandL(TInt aCommand)
       
    70     {
       
    71     VCXLOGLO1(">>>CFusionPlayerTestAppAppUi::HandleCommandL");
       
    72     
       
    73     TInt err( KErrNone );
       
    74     
       
    75     switch( aCommand )
       
    76         {
       
    77         case EEikCmdExit:
       
    78 		case EAknSoftkeyExit:	// only softkey handled at this level
       
    79             Exit();
       
    80             break;
       
    81 		
       
    82 		case ESettingCmdPlayVideo:
       
    83 		    err = iCmdListener->PlayLocalVideo( _L("e:\\testing\\data\\prettyfu.3gp") );
       
    84 		    if( err != KErrNone )
       
    85 		        {
       
    86 		        VCXLOGLO2("CFusionPlayerTestAppAppUi:: PlayLocalVideo returned err: %d", err);
       
    87 		        }
       
    88 		    break;
       
    89 		
       
    90 		default:        
       
    91             break;
       
    92         }
       
    93         
       
    94     VCXLOGLO1("<<<CFusionPlayerTestAppAppUi::HandleCommandL");
       
    95     }
       
    96 
       
    97 void CFusionPlayerTestAppAppUi::ShutdownCommandReceived()
       
    98     {
       
    99     VCXLOGLO1("CFusionPlayerTestAppAppUi::ShutdownCommandReceived ------> ");
       
   100     Exit();
       
   101     }
       
   102 
       
   103 //EOF