mediasettings/gsvideoplugin/src/GSVideoPlugin.cpp
changeset 0 96612d01cf9f
child 1 6711b85517b7
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2005 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:   GSVideoPlugin.cpp*
       
    15 */
       
    16 
       
    17 
       
    18 // Version : %version: 6 %
       
    19 
       
    20 
       
    21 
       
    22 // INCLUDES
       
    23 #include "MPSettingsModelForROP.h"
       
    24 #include "GSVideoPlugin.h"
       
    25 #include "MPSettingsConstants.h"
       
    26 #include "MPSettingsMainView.h"
       
    27 #include "MPSettingsProxyView.h"
       
    28 #include "MPSettingsNetworkView.h"
       
    29 #include "MPSettingsPluginView.h"
       
    30 #include "MPSettingsAdvancedBwView.h"
       
    31 #include "MPSettingsMainContainer.h" 
       
    32 #include "mediasettings.hrh"
       
    33 #include "gstabhelper.h"
       
    34 #include "GSMediaPlayerVideoView.h"
       
    35 #include "GSMediaPlayerStreamingView.h"
       
    36 #include "feedsettingsview.h"
       
    37 #include "mpxlog.h"
       
    38 
       
    39 #include <coeaui.h>
       
    40 #include <hlplch.h>             // For HlpLauncher
       
    41 #include <aknview.h>
       
    42 #include <aknViewAppUi.h>
       
    43 #include <featmgr.h>
       
    44 #include <bautils.h>
       
    45 #include <StringLoader.h>     //for StringLoader
       
    46 #include <gsprivatepluginproviderids.h>
       
    47 #include <gsmainview.h>
       
    48 #include <mediasettings.mbg>
       
    49 #include <gsfwviewuids.h>     //for KGSMainViewUid
       
    50 #include <MediaSettings.rsg>
       
    51 #include <eiktxlbm.h>
       
    52 #include <eikmenup.h> 
       
    53 
       
    54 // CONSTANTS
       
    55 const TInt KGSRopSettViewIdArrayGranularity = 3;
       
    56 const TInt KGSRopSettTopItemIndex = 0;
       
    57 
       
    58 // ========================= MEMBER FUNCTIONS ================================
       
    59 
       
    60 // ---------------------------------------------------------------------------
       
    61 // CGSVideoPlugin::CGSVideoPlugin()
       
    62 // Constructor
       
    63 //
       
    64 // ---------------------------------------------------------------------------
       
    65 //
       
    66 CGSVideoPlugin::CGSVideoPlugin() 
       
    67     : iResources( *iCoeEnv ), iConstructAsGsPlugin(ETrue)
       
    68     {
       
    69     MPX_FUNC("#MS# CGSVideoPlugin::CGSVideoPlugin()");
       
    70     }
       
    71 
       
    72 // ---------------------------------------------------------------------------
       
    73 // CGSVideoPlugin::~CGSVideoPlugin()
       
    74 //  
       
    75 // Destructor
       
    76 // ---------------------------------------------------------------------------
       
    77 //
       
    78 CGSVideoPlugin::~CGSVideoPlugin()
       
    79     {
       
    80     MPX_FUNC("#MS# CGSVideoPlugin::~CGSVideoPlugin()");
       
    81     FeatureManager::UnInitializeLib();
       
    82     iImplInfoArray.ResetAndDestroy();   
       
    83     
       
    84     if ( iTabHelper ) 
       
    85         {
       
    86         delete iTabHelper;
       
    87         }
       
    88 
       
    89     iResources.Close();
       
    90     
       
    91     if ( iViewIds )
       
    92         {
       
    93         delete iViewIds;
       
    94         }
       
    95     
       
    96     if ( iModel )
       
    97         {
       
    98         delete iModel;
       
    99         iModel = NULL;
       
   100         }
       
   101 
       
   102     if ( iViewArray ) 
       
   103         {
       
   104         iViewArray->Reset();
       
   105         delete iViewArray;
       
   106         }
       
   107     }
       
   108 
       
   109 // ---------------------------------------------------------------------------
       
   110 // CGSVideoPlugin::ConstructL(const TRect& aRect)
       
   111 // Symbian OS two-phased constructor
       
   112 //
       
   113 // ---------------------------------------------------------------------------
       
   114 //
       
   115 void CGSVideoPlugin::ConstructL()
       
   116     {
       
   117     MPX_FUNC("#MS# CGSVideoPlugin::ConstructL()");
       
   118     FeatureManager::InitializeLibL();
       
   119     iViewArray = new (ELeave) CArrayPtrFlat<MGSTabbedView>( 3 ); 
       
   120 
       
   121     TFileName fileName;
       
   122     LocateFilePathL( fileName, EFalse );    
       
   123     OpenLocalizedResourceFileL( fileName, iResources );
       
   124         
       
   125     BaseConstructL(R_GS_MEDIASETTING_VIEW);
       
   126 
       
   127     iTabHelper = CGSTabHelper::NewL();
       
   128     }
       
   129    
       
   130 // ---------------------------------------------------------------------------
       
   131 // CGSVideoPlugin::NewL()
       
   132 // Static constructor
       
   133 //  
       
   134 // ---------------------------------------------------------------------------
       
   135 //
       
   136 CGSVideoPlugin* CGSVideoPlugin::NewL( /* TAny* aInitParams */)
       
   137     {
       
   138     MPX_FUNC("#MS# CGSVideoPlugin::NewL()");
       
   139     CGSVideoPlugin* self = new( ELeave ) CGSVideoPlugin();
       
   140     CleanupStack::PushL(self);
       
   141     self->ConstructL();
       
   142     CleanupStack::Pop(self);
       
   143     return self; 
       
   144     }
       
   145 
       
   146 // ---------------------------------------------------------------------------
       
   147 // CGSVideoPlugin::Id
       
   148 // 
       
   149 // Returns own view ID.
       
   150 // ---------------------------------------------------------------------------
       
   151 //
       
   152 TUid CGSVideoPlugin::Id() const
       
   153     {
       
   154     MPX_FUNC("#MS# CGSVideoPlugin::Id()");
       
   155     return KGSVideoPluginUid;
       
   156     }
       
   157 
       
   158 // ---------------------------------------------------------------------------
       
   159 // CGSVideoPlugin::HandleClientRectChange
       
   160 // 
       
   161 // Handle changes to rect().
       
   162 // ---------------------------------------------------------------------------
       
   163 //
       
   164 void CGSVideoPlugin::HandleClientRectChange()
       
   165     {
       
   166     MPX_FUNC("#MS# CGSVideoPlugin::HandleClientRectChange()");
       
   167     if ( iContainer )
       
   168         {
       
   169         iContainer->SetRect( ClientRect() );
       
   170         }
       
   171     }
       
   172 
       
   173 // ---------------------------------------------------------------------------
       
   174 // CGSVideoPlugin::DoActivateL
       
   175 // 
       
   176 // First method called by the Avkon framwork to invoke a view.
       
   177 // ---------------------------------------------------------------------------
       
   178 //
       
   179 void CGSVideoPlugin::DoActivateL( const TVwsViewId& aPrevViewId,
       
   180                                 TUid /* aCustomMessageId */,
       
   181                                 const TDesC8& /* aCustomMessage */)
       
   182     {
       
   183     MPX_FUNC("#MS# CGSVideoPlugin::DoActivateL()");
       
   184     iPrevViewId = aPrevViewId;
       
   185     if( iContainer )
       
   186         {
       
   187         AppUi()->RemoveFromViewStack( *this, iContainer );
       
   188 
       
   189         delete iContainer;
       
   190         iContainer = NULL;
       
   191         }
       
   192 
       
   193     if (!iViewIds)
       
   194         {
       
   195         CreateLocalViewsL();        
       
   196         }
       
   197     CreateContainerL();
       
   198     AppUi()->AddToViewStackL( *this, iContainer );
       
   199     iContainer->ListBox()->SetListBoxObserver( this ) ;
       
   200     ResetSelectedItemIndex();
       
   201     }
       
   202 
       
   203 // ---------------------------------------------------------------------------
       
   204 // CGSVideoPlugin::DoDeactivate
       
   205 // 
       
   206 // Called by the Avkon view framework when closing.
       
   207 // ---------------------------------------------------------------------------
       
   208 //
       
   209 void CGSVideoPlugin::DoDeactivate()
       
   210     {
       
   211     MPX_FUNC("#MS# CGSVideoPlugin::DoDeactivate()");
       
   212     if ( iContainer )
       
   213         {
       
   214         AppUi()->RemoveFromViewStack( *this, iContainer );
       
   215         delete iContainer;
       
   216         iContainer = NULL;
       
   217         }
       
   218     }
       
   219 
       
   220 // ---------------------------------------------------------------------------
       
   221 // CGSVideoPlugin::HandleCommandL
       
   222 // 
       
   223 // Handle user menu actions in this view.
       
   224 // ---------------------------------------------------------------------------
       
   225 //
       
   226 void CGSVideoPlugin::HandleCommandL( TInt aCommand )
       
   227     {
       
   228     MPX_FUNC("#MS# CGSVideoPlugin::HandleCommandL()");
       
   229     switch ( aCommand )
       
   230         {
       
   231         case EMPSettCmdOpen:
       
   232             HandleListBoxSelectionL();
       
   233             break;          
       
   234         case EAknSoftkeyBack:
       
   235             SetCurrentItem(EGSMediaSettingsVideoIndex);
       
   236             AppUi()->ActivateLocalViewL( KGSAppsPluginUid );
       
   237             break;
       
   238         case EMPSettCmdHelp:
       
   239             {
       
   240             if( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
       
   241                 {
       
   242                 HlpLauncher::LaunchHelpApplicationL(
       
   243                     iEikonEnv->WsSession(), AppUi()->AppHelpContextL() );
       
   244                 }
       
   245             break;
       
   246             }
       
   247         default:
       
   248             AppUi()->HandleCommandL( aCommand );
       
   249             break;
       
   250         }
       
   251     }
       
   252 
       
   253 // ---------------------------------------------------------------------------
       
   254 // CGSVideoPlugin::GetCaption
       
   255 // 
       
   256 // Return application/view caption.
       
   257 // ---------------------------------------------------------------------------
       
   258 //
       
   259 void CGSVideoPlugin::GetCaptionL( TDes& aCaption ) const
       
   260     {
       
   261     MPX_FUNC("#MS# CGSVideoPlugin::GetCaptionL()");
       
   262     // the resource file is already opened.
       
   263     HBufC* result = StringLoader::LoadL( R_GS_MEDIASETTING_VIEW_CAPTION );
       
   264     
       
   265     aCaption.Copy( *result );
       
   266     delete result;
       
   267     }
       
   268   
       
   269 // ---------------------------------------------------------------------------
       
   270 // CGSVideoPlugin::PluginProviderCategory
       
   271 // 
       
   272 // A means to identify the location of this plug-in in the framework.
       
   273 // ---------------------------------------------------------------------------
       
   274 //
       
   275 TInt CGSVideoPlugin::PluginProviderCategory() const
       
   276     {
       
   277     MPX_FUNC("#MS# CGSVideoPlugin::PluginProviderCategory()");
       
   278     //To identify internal plug-ins.
       
   279     return KGSPluginProviderInternal;
       
   280     }
       
   281   
       
   282 // ========================= From CGSBaseView ==================
       
   283 
       
   284 
       
   285 // ---------------------------------------------------------------------------
       
   286 // CGSVideoPlugin::NewContainerL
       
   287 // 
       
   288 // Creates new iContainer.
       
   289 // ---------------------------------------------------------------------------
       
   290 //
       
   291 void CGSVideoPlugin::NewContainerL()
       
   292     {
       
   293     MPX_FUNC("#MS# CGSVideoPlugin::NewContainerL()");
       
   294     iContainer = new( ELeave ) CMPSettingsMainContainer;
       
   295     }
       
   296 
       
   297 // ---------------------------------------------------------------------------
       
   298 // CGSVideoPlugin::HandleListBoxSelectionL
       
   299 // 
       
   300 // Handle any user actions while in the list view.
       
   301 // ---------------------------------------------------------------------------
       
   302 void CGSVideoPlugin::HandleListBoxSelectionL() 
       
   303     {
       
   304     MPX_FUNC("#MS# CGSVideoPlugin::HandleListBoxSelectionL()");
       
   305     iCurrentItem = iContainer->ListBox()->CurrentItemIndex();
       
   306     iTopItemIndex = iContainer->ListBox()->TopItemIndex();
       
   307     
       
   308     CGSMediaPlayerVideoView* videoView = NULL;
       
   309     CGSMediaPlayerStreamingView* streamingView = NULL;
       
   310 
       
   311     TInt count = iViewIds->Count();
       
   312 
       
   313     for (TInt i = 0; i < count; i++)
       
   314         {
       
   315         if (i == 0) //first item of the list is Video view
       
   316             {
       
   317             videoView = static_cast<CGSMediaPlayerVideoView*>(AppUi()->View(iViewIds->At(i)));
       
   318             videoView->SetCurrentItem(KGSRopSettTopItemIndex);        
       
   319             }
       
   320         else if (i == 1) //second item of the list is Streaming view
       
   321             {
       
   322             streamingView = static_cast<CGSMediaPlayerStreamingView*>(AppUi()->View(iViewIds->At(i)));
       
   323             streamingView->SetCurrentItem(KGSRopSettTopItemIndex);        
       
   324             }
       
   325         // Third item of the list is "Video service selection"
       
   326         }
       
   327          
       
   328     AppUi()->ActivateLocalViewL(iViewIds->At(iCurrentItem));
       
   329     }
       
   330 
       
   331 // ---------------------------------------------------------------------------
       
   332 // CGSVideoPlugin::Container
       
   333 // 
       
   334 // Return handle to container class.
       
   335 // ---------------------------------------------------------------------------
       
   336 //
       
   337 CMPSettingsMainContainer* CGSVideoPlugin::Container()
       
   338     {
       
   339     MPX_FUNC("#MS# CGSVideoPlugin::Container()");
       
   340     return static_cast<CMPSettingsMainContainer*>( iContainer );
       
   341     }
       
   342 
       
   343 // ---------------------------------------------------------------------------
       
   344 // CGSVideoPlugin::CreateContainerL()
       
   345 // 
       
   346 // 
       
   347 // ---------------------------------------------------------------------------
       
   348 //
       
   349 void CGSVideoPlugin::CreateContainerL()
       
   350     {
       
   351     MPX_FUNC("#MS# CGSVideoPlugin::CreateContainerL()");
       
   352     NewContainerL();
       
   353     __ASSERT_DEBUG( 
       
   354         iContainer, User::Panic( KGSDoActivateError, EGSViewPanicNullPtr ) );
       
   355     iContainer->SetMopParent( this );
       
   356 
       
   357     TRAPD( error, iContainer->ConstructL( ClientRect() ) );
       
   358 
       
   359     if ( error )
       
   360         {
       
   361         delete iContainer;
       
   362         iContainer = NULL;
       
   363         User::Leave( error );
       
   364         }
       
   365     }
       
   366 
       
   367 // ---------------------------------------------------------------------------
       
   368 // CGSVideoPlugin::CreateLocalViews()
       
   369 // 
       
   370 // 
       
   371 // ---------------------------------------------------------------------------
       
   372 //
       
   373 void CGSVideoPlugin::CreateLocalViewsL()
       
   374     {
       
   375     MPX_FUNC("#MS# CGSVideoPlugin::CreateLocalViewsL()");
       
   376     // model creation
       
   377     iModel = CMPSettingsModelForROP::NewL();
       
   378 
       
   379     // Create vector which contains view id's for all setting folders. 
       
   380     iViewIds = new(ELeave) CArrayFixFlat<TUid>(KGSRopSettViewIdArrayGranularity);
       
   381     iViewIds->AppendL(KMPSettVideoViewId);
       
   382     iViewIds->AppendL(KMPSettStreamingViewId);
       
   383     iViewIds->AppendL(KMPSettFeedsViewId);
       
   384     CAknView* view;  
       
   385 
       
   386     view = CMPSettingsMainView::NewLC(iViewIds,iModel,iConstructAsGsPlugin); 
       
   387     AppUi()->AddViewL(view);      // transfer ownership to CAknViewAppUi
       
   388     CleanupStack::Pop();    // view
       
   389 
       
   390     // iMainView is not owned, i.e. it is not deleted in the destructor ->
       
   391     // main view cannot be directly creted to iMainView, as it's against the coding
       
   392     // conventions to place class' pointers to cleanup stack => static_cast.
       
   393     iMainView = static_cast<CMPSettingsMainView*>(view);
       
   394 
       
   395     view = CGSMediaPlayerVideoView::NewLC(iModel,iViewArray);
       
   396     AppUi()->AddViewL(view);      // transfer ownership to CAknViewAppUi
       
   397     CleanupStack::Pop();    // view
       
   398 
       
   399     view = CGSMediaPlayerStreamingView::NewLC(iModel,iViewArray);
       
   400     AppUi()->AddViewL(view);      // transfer ownership to CAknViewAppUi
       
   401     CleanupStack::Pop();    // view 
       
   402 
       
   403     view = CVcxNsSettingsView::NewLC( iViewArray );
       
   404     AppUi()->AddViewL(view);      // transfer ownership to CAknViewAppUi
       
   405     CleanupStack::Pop();    // view
       
   406     
       
   407     view = CMPSettingsProxyView::NewLC(iModel,iConstructAsGsPlugin);
       
   408     AppUi()->AddViewL(view);      // transfer ownership to CAknViewAppUi
       
   409     CleanupStack::Pop();    // view 
       
   410 
       
   411     view = CMPSettingsNetworkView::NewLC(iModel,iConstructAsGsPlugin);
       
   412     AppUi()->AddViewL(view);      // transfer ownership to CAknViewAppUi
       
   413     CleanupStack::Pop();    // view 
       
   414 
       
   415     view = CMPSettingsAdvancedBwView::NewLC(iModel,iConstructAsGsPlugin);
       
   416     AppUi()->AddViewL(view);      // transfer ownership to CAknViewAppUi
       
   417     CleanupStack::Pop();    // view 
       
   418     
       
   419     // Construct plug-in views (if any exists)
       
   420     CMPSettingsPluginView::ListImplementationsL(iImplInfoArray);
       
   421     TInt count = iImplInfoArray.Count();
       
   422 
       
   423     if (count > 0)
       
   424         {
       
   425         CMPSettingsPluginView* pluginView = NULL;
       
   426 
       
   427         for (TInt ii(0); ii < count; ++ii)
       
   428             {
       
   429             TUid uid = iImplInfoArray[ii]->ImplementationUid();
       
   430             pluginView = CMPSettingsPluginView::NewL(uid);
       
   431             CleanupStack::PushL(pluginView);
       
   432             AppUi()->AddViewL(pluginView);
       
   433             CleanupStack::Pop();    // pluginView
       
   434 
       
   435             if (pluginView->OpenedFromMainView())
       
   436                 {
       
   437                 iViewIds->AppendL(pluginView->Id());
       
   438                 }
       
   439             }
       
   440         // Sort UID array to rising order
       
   441         TKeyArrayFix sortKey(0, ECmpTUint);
       
   442         User::LeaveIfError(iViewIds->Sort(sortKey));
       
   443         }
       
   444     }
       
   445 
       
   446 // ---------------------------------------------------------------------------
       
   447 // CGSVideoPlugin::CreateIconL
       
   448 // 
       
   449 // Return the icon, if has one.
       
   450 // ---------------------------------------------------------------------------
       
   451 //
       
   452 CGulIcon* CGSVideoPlugin::CreateIconL( const TUid aIconType )
       
   453     {
       
   454     MPX_FUNC("#MS# CGSVideoPlugin::CreateIconL()");
       
   455     //EMbm<Mbm_file_name><Bitmap_name>
       
   456     CGulIcon* icon;
       
   457     
       
   458     TFileName fileName;
       
   459     LocateFilePathL( fileName );    
       
   460     
       
   461     if( aIconType == KGSIconTypeLbxItem )
       
   462         {
       
   463         icon = AknsUtils::CreateGulIconL(
       
   464         AknsUtils::SkinInstance(), 
       
   465         KAknsIIDDefault, 
       
   466         fileName,
       
   467         EMbmMediasettingsQgn_menu_video,
       
   468         EMbmMediasettingsQgn_menu_video_mask );
       
   469         }
       
   470     else
       
   471         {
       
   472         icon = CGSPluginInterface::CreateIconL( aIconType );
       
   473         }
       
   474 
       
   475     return icon;
       
   476     }
       
   477   
       
   478 // ---------------------------------------------------------------------------
       
   479 // CGSVideoPlugin::TabbedViews()
       
   480 // Returns pointer to tabbed views of application.
       
   481 // ---------------------------------------------------------------------------
       
   482 //
       
   483 CArrayPtrFlat<MGSTabbedView>* CGSVideoPlugin::TabbedViews()
       
   484     {
       
   485     MPX_FUNC("#MS# CGSVideoPlugin::TabbedViews()");
       
   486     return iViewArray;
       
   487     }
       
   488     
       
   489 // -----------------------------------------------------------------------------
       
   490 // CGSVideoPlugin::ResetSelectedItemIndex()
       
   491 //
       
   492 //
       
   493 // -----------------------------------------------------------------------------
       
   494 //
       
   495 void CGSVideoPlugin::ResetSelectedItemIndex()
       
   496     {
       
   497     MPX_FUNC("#MS# CGSVideoPlugin::ResetSelectedItemIndex()");
       
   498     if( iContainer )
       
   499         {
       
   500         iContainer->SetSelectedItem( iCurrentItem );
       
   501         }
       
   502     }
       
   503 
       
   504 // ---------------------------------------------------------------------------
       
   505 // CGSVideoPlugin::SetCurrentItem
       
   506 //
       
   507 //
       
   508 // ---------------------------------------------------------------------------
       
   509 void CGSVideoPlugin::SetCurrentItem( TInt aIndex )
       
   510     {
       
   511     MPX_FUNC("#MS# CGSVideoPlugin::SetCurrentItem()");
       
   512     iCurrentItem = aIndex;
       
   513     }
       
   514 
       
   515 // ---------------------------------------------------------------------------
       
   516 // CGSVideoPlugin::DynInitMenuPaneL
       
   517 // Before showing a options menu
       
   518 // ---------------------------------------------------------------------------
       
   519 void CGSVideoPlugin::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
       
   520     {
       
   521     MPX_FUNC("#MS# CGSVideoPlugin::DynInitMenuPaneL()");
       
   522     if ( aResourceId == R_MPSETT_APP_MENU )
       
   523         {
       
   524         // Help should be displayed only if the feature is supported according
       
   525         // to Feature Manager
       
   526         if (!FeatureManager::FeatureSupported(KFeatureIdHelp))
       
   527             {
       
   528             aMenuPane->SetItemDimmed(EMPSettCmdHelp, ETrue);
       
   529             }
       
   530         }
       
   531     }
       
   532 
       
   533 // -----------------------------------------------------------------------------
       
   534 // CGSVideoPlugin::LocateFilePathL
       
   535 // -----------------------------------------------------------------------------
       
   536 //
       
   537 void CGSVideoPlugin::LocateFilePathL( TFileName& aFileName, TBool aBitmapFile )
       
   538     {
       
   539     _LIT( KGSResourceFileName, "mediasettings.rsc" );
       
   540     //_LIT( KGSIconFileName, "mediasettings.mbm");
       
   541     _LIT( KGSIconFileName, "mediasettings.mif");
       
   542     
       
   543     TParse parse;
       
   544     TFileName temp;
       
   545                 
       
   546     if ( aBitmapFile )  // Mbm file
       
   547         {
       
   548         temp.Append(KGSIconFileName);
       
   549         }
       
   550     else                // Rsc file
       
   551         {
       
   552         temp.Append(KGSResourceFileName);
       
   553         }
       
   554         
       
   555     parse.Set( temp, &KDC_APP_RESOURCE_DIR, NULL );
       
   556     TPtrC iconFile = parse.FullName();
       
   557         
       
   558     // This is done to ensure upgraded file is used first. 
       
   559     // If no upgraded file is found, default file in Z: drive will be used.
       
   560     TFindFile find( CCoeEnv::Static()->FsSession() );
       
   561     TInt err = find.FindByDir( iconFile, KNullDesC );
       
   562         
       
   563     if ( err )
       
   564         {
       
   565         if ( aBitmapFile )
       
   566             {
       
   567             aFileName.Append( KGSVideoPluginIconFileName );    
       
   568             }
       
   569         else
       
   570             {
       
   571             aFileName.Append( KGSVideoPluginResourceFileName );     
       
   572             }
       
   573         }
       
   574     else
       
   575         {
       
   576         if ( aBitmapFile ) 
       
   577             {
       
   578             // this Mbm file has the whole path including the drive
       
   579             aFileName.Append( find.File() );    
       
   580             }
       
   581         else               
       
   582             {
       
   583             // General Settings base class would only take in this format <drive>:<rsc_file_name>
       
   584             // So, the file name is returned in that particular format
       
   585             TFileName tempFile;
       
   586             tempFile.Append( find.File() );    // this rsc file has the whole path including the drive
       
   587             aFileName.Append( tempFile[0] );   // append drive letter
       
   588             aFileName.Append( tempFile[1] );   // append delimiter
       
   589             aFileName.Append( KGSResourceFileName ); // append rsc_file_name
       
   590             }
       
   591         }
       
   592         MPX_DEBUG3(_L("#MS# CGSVideoPlugin::LocateFilePathL(%d,%S)"),aBitmapFile,&aFileName);
       
   593     }   
       
   594 
       
   595 //End of File