mediasettings/gsvideoplugin/src/GSMediaPlayerStreamingView.cpp
branchRCL_3
changeset 8 ce5ada96ab30
parent 1 6711b85517b7
equal deleted inserted replaced
6:7d91903f795f 8:ce5ada96ab30
    13 *
    13 *
    14 * Description:   View class for Streaming list view.*
    14 * Description:   View class for Streaming list view.*
    15 */
    15 */
    16 
    16 
    17 
    17 
    18 // Version : %version: 8 %
    18 // Version : %version: 10 %
    19 
    19 
    20 
    20 
    21 
    21 
    22 // INCLUDE FILES
    22 // INCLUDE FILES
    23 #include    <avkon.hrh>
    23 #include    <avkon.hrh>
    39 #include    "MPSettingsBaseView.h"
    39 #include    "MPSettingsBaseView.h"
    40 #include	"mpxlog.h"
    40 #include	"mpxlog.h"
    41 
    41 
    42 class CMPSettingsModelForROP;
    42 class CMPSettingsModelForROP;
    43 
    43 
    44 // CONSTANTS
       
    45 
       
    46 const   TInt    KMPSettProxyViewListItemId  =   0;
       
    47 const   TInt    KMPSettNetworkViewListItemId  =   1;
       
    48 
       
    49 // ================= MEMBER FUNCTIONS =======================
    44 // ================= MEMBER FUNCTIONS =======================
    50 
    45 
    51 // -----------------------------------------------------------------------------
    46 // -----------------------------------------------------------------------------
    52 // CGSMediaPlayerStreamingView::CGSMediaPlayerStreamingView
    47 // CGSMediaPlayerStreamingView::CGSMediaPlayerStreamingView
    53 // C++ default constructor can NOT contain any code, that
    48 // C++ default constructor can NOT contain any code, that
    54 // might leave.
    49 // might leave.
    55 // -----------------------------------------------------------------------------
    50 // -----------------------------------------------------------------------------
    56 //
    51 //
    57 CGSMediaPlayerStreamingView::CGSMediaPlayerStreamingView(CMPSettingsModelForROP* aModel, CArrayPtrFlat<MGSTabbedView>* /* aTabViewArray */ ) 
    52 CGSMediaPlayerStreamingView::CGSMediaPlayerStreamingView(
       
    53         CMPSettingsModelForROP* aModel, 
       
    54         CArrayPtrFlat<MGSTabbedView>* /* aTabViewArray */ ) 
    58 	: iModel( aModel)
    55 	: iModel( aModel)
    59     {
    56     {
    60     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::CGSMediaPlayerStreamingView()");
    57     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::CGSMediaPlayerStreamingView()");
    61     }
    58     }
    62 
    59 
    65 // Symbian OS two-phased constructor
    62 // Symbian OS two-phased constructor
    66 // ---------------------------------------------------------
    63 // ---------------------------------------------------------
    67 //
    64 //
    68 void CGSMediaPlayerStreamingView::ConstructL(CArrayPtrFlat<MGSTabbedView>* aTabViewArray)
    65 void CGSMediaPlayerStreamingView::ConstructL(CArrayPtrFlat<MGSTabbedView>* aTabViewArray)
    69     {
    66     {
    70         MPX_FUNC("#MS# CGSMediaPlayerStreamingView::ConstructL()");
    67     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::ConstructL()");
    71 		iTabHelper = CGSTabHelper::NewL();
    68     if ( aTabViewArray )
    72 		aTabViewArray->AppendL(this);
    69         {
    73 		BaseConstructL(R_GS_MPSETT_STREAMING_VIEW);
    70         iTabHelper = CGSTabHelper::NewL();
       
    71         aTabViewArray->AppendL(this);
       
    72         }
       
    73     BaseConstructL( R_GS_MPSETT_STREAMING_VIEW );
    74     }
    74     }
    75 
    75 
    76 // -----------------------------------------------------------------------------
    76 // -----------------------------------------------------------------------------
    77 // CGSMediaPlayerStreamingView::NewLC
    77 // CGSMediaPlayerStreamingView::NewLC
    78 // Two-phased constructor.
    78 // Two-phased constructor.
    79 // -----------------------------------------------------------------------------
    79 // -----------------------------------------------------------------------------
    80 //
    80 //
    81 CGSMediaPlayerStreamingView* CGSMediaPlayerStreamingView::NewLC(CMPSettingsModelForROP* aModel, CArrayPtrFlat<MGSTabbedView>* aTabViewArray)
    81 CGSMediaPlayerStreamingView* CGSMediaPlayerStreamingView::NewLC(
    82     {
    82         CMPSettingsModelForROP* aModel, 
    83         MPX_FUNC("#MS# CGSMediaPlayerStreamingView::NewLC()");
    83         CArrayPtrFlat<MGSTabbedView>* aTabViewArray )
    84 		CGSMediaPlayerStreamingView* self = new(ELeave) CGSMediaPlayerStreamingView(aModel,aTabViewArray);
    84     {
    85     
    85     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::NewLC()");
    86 		CleanupStack::PushL(self);
    86     CGSMediaPlayerStreamingView* self = new(ELeave) CGSMediaPlayerStreamingView(aModel,aTabViewArray);
    87 		self->ConstructL( aTabViewArray );
    87 
    88 
    88     CleanupStack::PushL(self);
    89 		return self;
    89     self->ConstructL( aTabViewArray );
       
    90 
       
    91     return self;
    90     }
    92     }
    91 
    93 
    92 // ---------------------------------------------------------
    94 // ---------------------------------------------------------
    93 // CGSMediaPlayerStreamingView::~CGSMediaPlayerStreamingView
    95 // CGSMediaPlayerStreamingView::~CGSMediaPlayerStreamingView
    94 // Destructor
    96 // Destructor
    95 // ---------------------------------------------------------
    97 // ---------------------------------------------------------
    96 //
    98 //
    97 CGSMediaPlayerStreamingView::~CGSMediaPlayerStreamingView()
    99 CGSMediaPlayerStreamingView::~CGSMediaPlayerStreamingView()
    98     {
   100     {
    99         MPX_FUNC("#MS# CGSMediaPlayerStreamingView::~CGSMediaPlayerStreamingView()");
   101     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::~CGSMediaPlayerStreamingView()");
   100 	    if ( iContainer )
   102     if ( iContainer )
   101         {
   103         {
   102         AppUi()->RemoveFromStack( iContainer );
   104         AppUi()->RemoveFromStack( iContainer );
   103         delete iContainer;
   105         delete iContainer;
   104         }
   106         }
   105 	    delete iTabHelper;    
   107     delete iTabHelper;    
   106     }
   108 }
   107 
   109 
   108 // ---------------------------------------------------------
   110 // ---------------------------------------------------------
   109 // TUid CGSMediaPlayerStreamingView::Id
   111 // TUid CGSMediaPlayerStreamingView::Id
   110 // ---------------------------------------------------------
   112 // ---------------------------------------------------------
   111 //
   113 //
   112 TUid CGSMediaPlayerStreamingView::Id() const
   114 TUid CGSMediaPlayerStreamingView::Id() const
   113     {
   115     {
   114         MPX_FUNC("#MS# CGSMediaPlayerStreamingView::Id()");
   116     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::Id()");
   115 	    return KMPSettStreamingViewId;
   117     return KMPSettStreamingViewId;
   116     }
   118     }
   117 
   119 
   118 // ---------------------------------------------------------
   120 // ---------------------------------------------------------
   119 // CGSMediaPlayerStreamingView::HandleCommandL
   121 // CGSMediaPlayerStreamingView::HandleCommandL
   120 // ---------------------------------------------------------
   122 // ---------------------------------------------------------
   121 //
   123 //
   122 void CGSMediaPlayerStreamingView::HandleCommandL(TInt aCommand)
   124 void CGSMediaPlayerStreamingView::HandleCommandL(TInt aCommand)
   123     {   
   125     {   
   124         MPX_DEBUG2(_L("#MS# CGSMediaPlayerStreamingView::HandleCommandL(%d)"),aCommand);
   126     MPX_DEBUG2(_L("#MS# CGSMediaPlayerStreamingView::HandleCommandL(%d)"),aCommand);
   125 	    CGSVideoPlugin* parent =
   127     CGSVideoPlugin* parent =
   126 			static_cast<CGSVideoPlugin*> (
   128         static_cast<CGSVideoPlugin*> (
   127 				AppUi()->View( KGSVideoPluginUid ) );
   129             AppUi()->View( KGSVideoPluginUid ) );
   128 
   130 
   129 		switch (aCommand)
   131     switch (aCommand)
   130         {
   132         {
   131 			case EMPSettCmdOpen:
   133         case EMPSettCmdOpen:
   132 				HandleListBoxSelectionL();
   134             break;
   133 				break;
   135         case EAknSoftkeyBack:
   134 			case EAknSoftkeyBack:
   136 			{
   135 				parent->SetCurrentItem(EGSMediaSettingsStreamingIndex);
   137             if ( iTabHelper )
   136 				parent->ResetSelectedItemIndex();
   138                 {
   137      			AppUi()->ActivateLocalViewL(KGSVideoPluginUid);
   139                 parent->SetCurrentItem(EGSMediaSettingsStreamingIndex);
   138 				break;
   140                 parent->ResetSelectedItemIndex();
   139 			case EMPSettCmdHelp:
   141                 AppUi()->ActivateLocalViewL(KGSVideoPluginUid);
   140 				if( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
   142                 }
   141 				{
   143             else    
   142 				HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), AppUi()->AppHelpContextL() );
   144                 {
   143 				}
   145 				// If there's no TabHelper, we have just streaming view and
   144 				break;
   146 				// should exit MediaSettings.
   145 			default:
   147                 AppUi()->ActivateLocalViewL( KGSAppsPluginUid );
   146 				AppUi()->HandleCommandL(aCommand);
   148                 }
   147 				break;
   149             }
       
   150 			break;
       
   151         case EMPSettCmdAdvancedSett:
       
   152             AppUi()->ActivateLocalViewL( KMPSettAdvancedBwViewId );
       
   153             break;            
       
   154         case EMPSettCmdHelp:
       
   155             if( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
       
   156                 {
       
   157                 HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), AppUi()->AppHelpContextL() );
       
   158                 }
       
   159             break;
       
   160         default:
       
   161             AppUi()->HandleCommandL(aCommand);
       
   162             break;
   148         }
   163         }
   149     }
   164     }
   150 
   165 
   151 // ---------------------------------------------------------------------------
   166 // ---------------------------------------------------------------------------
   152 // CGSMediaPlayerStreamingView::DoActivateL
   167 // CGSMediaPlayerStreamingView::DoActivateL
   153 // Activate this view
   168 // Activate this view
   154 // ---------------------------------------------------------------------------
   169 // ---------------------------------------------------------------------------
   155 //
   170 //
   156 void CGSMediaPlayerStreamingView::DoActivateL( const TVwsViewId& /* aPrevViewId */,
   171 void CGSMediaPlayerStreamingView::DoActivateL( 
   157                                           TUid /*aCustomMessageId*/,
   172         const TVwsViewId& /* aPrevViewId */,
   158                                           const TDesC8& /*aCustomMessage*/ )
   173         TUid /*aCustomMessageId*/,
       
   174         const TDesC8& /*aCustomMessage*/ )
   159     { 
   175     { 
   160         MPX_FUNC("#MS# CGSMediaPlayerStreamingView::DoActivateL()");
   176     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::DoActivateL()");
   161 	    if( iContainer )
   177     if( iContainer )
   162         {
   178         {
   163         AppUi()->RemoveFromViewStack( *this, iContainer );
   179         AppUi()->RemoveFromViewStack( *this, iContainer );
   164         delete iContainer;
   180         delete iContainer;
   165         iContainer = NULL;
   181         iContainer = NULL;
   166         }
   182         }
   167 
   183 
   168 	    CreateContainerL();
   184     CreateContainerL();
   169 	    AppUi()->AddToViewStackL( *this, iContainer );
   185     AppUi()->AddToViewStackL( *this, iContainer );
   170    
   186 
   171 	    CGSVideoPlugin* parent = 
   187     CGSVideoPlugin* parent = 
   172 	        static_cast<CGSVideoPlugin*> ( 
   188         static_cast<CGSVideoPlugin*> ( 
   173 	            AppUi()->View( KGSVideoPluginUid ) );
   189             AppUi()->View( KGSVideoPluginUid ) );
   174         
   190     
   175 	    if( parent )
   191     if( parent && iTabHelper )
   176         {
   192         {
   177         iTabHelper->CreateTabGroupL( Id(), 
   193         iTabHelper->CreateTabGroupL( Id(), 
   178             static_cast<CArrayPtrFlat<MGSTabbedView> *> (parent->TabbedViews() ) ); 
   194                 static_cast<CArrayPtrFlat<MGSTabbedView> *> (parent->TabbedViews() ) ); 
   179         } 
   195         } 
   180 	    iContainer->SetRect( ClientRect() );   
   196     iContainer->SetRect( ClientRect() );   
   181 	    iContainer->ActivateL();   
   197     iContainer->ActivateL();   
   182     
   198 
   183 	    DynInitContainerL();
   199     DynInitContainerL();
   184     
       
   185     }
   200     }
   186 
   201 
   187 // ---------------------------------------------------------------------------
   202 // ---------------------------------------------------------------------------
   188 // CGSMediaPlayerStreamingView::DoDeactivate
   203 // CGSMediaPlayerStreamingView::DoDeactivate
   189 // Deactivate this view
   204 // Deactivate this view
   190 // ---------------------------------------------------------------------------
   205 // ---------------------------------------------------------------------------
   191 //
   206 //
   192 void CGSMediaPlayerStreamingView::DoDeactivate()
   207 void CGSMediaPlayerStreamingView::DoDeactivate()
   193     {
   208     {
   194 
   209     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::DoDeactivate()");
   195         MPX_FUNC("#MS# CGSMediaPlayerStreamingView::DoDeactivate()");
   210     if ( iContainer )
   196         if ( iContainer )
       
   197         {        
   211         {        
   198             CEikTextListBox* listbox = iContainer->ListBox();
   212         CEikTextListBox* listbox = iContainer->ListBox();
   199             if (listbox)
   213         if (listbox)
   200             {
   214             {
   201             iCurrentItem = listbox->CurrentItemIndex();
   215             iCurrentItem = listbox->CurrentItemIndex();
   202             iTopItemIndex = listbox->TopItemIndex();
   216             iTopItemIndex = listbox->TopItemIndex();
   203             } 
   217             } 
   204             
   218         
   205             AppUi()->RemoveFromStack( iContainer );
   219         AppUi()->RemoveFromStack( iContainer );
   206             delete iContainer;
   220         delete iContainer;
   207             iContainer = NULL;
   221         iContainer = NULL;
   208             iTabHelper->RemoveTabGroup();                   
   222         if ( iTabHelper )
       
   223             {
       
   224             iTabHelper->RemoveTabGroup();
       
   225             }
   209         }
   226         }
   210     }
   227     }
   211 
   228 
   212 // ---------------------------------------------------------------------------
   229 // ---------------------------------------------------------------------------
   213 // CGSMediaPlayerStreamingView::Container
   230 // CGSMediaPlayerStreamingView::Container
   214 // Returns network container item
   231 // Returns network container item
   215 // ---------------------------------------------------------------------------
   232 // ---------------------------------------------------------------------------
   216 //
   233 //
   217 CMPSettingsBaseContainer* CGSMediaPlayerStreamingView::Container()
   234 CMPSettingsBaseContainer* CGSMediaPlayerStreamingView::Container()
   218     {
   235     {
   219         MPX_FUNC("#MS# CGSMediaPlayerStreamingView::Container()");
   236     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::Container()");
   220 	    return static_cast <CMPSettingsStreamingContainer*> ( iContainer );
   237     return static_cast <CMPSettingsStreamingContainer*> ( iContainer );
   221     }
   238     }
   222 
   239 
   223 // ---------------------------------------------------------------------------
   240 // ---------------------------------------------------------------------------
   224 // CGSMediaPlayerStreamingView::DynInitMenuPaneL
   241 // CGSMediaPlayerStreamingView::DynInitMenuPaneL
   225 // Before showing a options menu
   242 // Before showing a options menu
   226 // ---------------------------------------------------------------------------
   243 // ---------------------------------------------------------------------------
   227 //
   244 //
   228 void CGSMediaPlayerStreamingView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
   245 void CGSMediaPlayerStreamingView::DynInitMenuPaneL( TInt aResourceId, 
   229     {
   246                                                     CEikMenuPane* aMenuPane)
   230         MPX_DEBUG2(_L("#MS# CGSMediaPlayerStreamingView::DynInitMenuPaneL(0x%X)"),aResourceId);
   247     {
   231 	    if (aResourceId == R_MPSETT_APP_MENU)
   248     MPX_DEBUG2(_L("#MS# CGSMediaPlayerStreamingView::DynInitMenuPaneL(0x%X)"),aResourceId);
   232         {
   249     if ( aResourceId == R_MPSETT_APP_MENU )
   233 			// Help should be displayed only if the feature is supported according
   250         {
   234 			// to Feature Manager
   251         // Help should be displayed only if the feature is supported according
   235 			if (!FeatureManager::FeatureSupported(KFeatureIdHelp))
   252         // to Feature Manager
       
   253         if (!FeatureManager::FeatureSupported(KFeatureIdHelp))
   236             {
   254             {
   237             aMenuPane->SetItemDimmed(EMPSettCmdHelp, ETrue);
   255             aMenuPane->SetItemDimmed(EMPSettCmdHelp, ETrue);
   238             }
   256             }
   239         }
   257         }
   240     }
   258     }
   243 // CGSMediaPlayerStreamingView::NewContainerL()
   261 // CGSMediaPlayerStreamingView::NewContainerL()
   244 // Creates new iContainer.
   262 // Creates new iContainer.
   245 // ---------------------------------------------------------------------------
   263 // ---------------------------------------------------------------------------
   246 void CGSMediaPlayerStreamingView::NewContainerL()
   264 void CGSMediaPlayerStreamingView::NewContainerL()
   247     {
   265     {
   248         MPX_FUNC("#MS# CGSMediaPlayerStreamingView::NewContainerL()");
   266     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::NewContainerL()");
   249 	    iContainer = new (ELeave) CMPSettingsStreamingContainer(iModel);
   267     iContainer = new (ELeave) CMPSettingsStreamingContainer(iModel);
   250     }
   268     }
   251 
   269 
   252 // -----------------------------------------------------------------------------
   270 // -----------------------------------------------------------------------------
   253 // CGSMediaPlayerStreamingView::HandleClientRectChange
   271 // CGSMediaPlayerStreamingView::HandleClientRectChange
   254 // Handle screen size change.
   272 // Handle screen size change.
   255 // -----------------------------------------------------------------------------
   273 // -----------------------------------------------------------------------------
   256 //
   274 //
   257 void CGSMediaPlayerStreamingView::HandleClientRectChange()
   275 void CGSMediaPlayerStreamingView::HandleClientRectChange()
   258     {
   276     {
   259         MPX_FUNC("#MS# CGSMediaPlayerStreamingView::HandleClientRectChange()");
   277     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::HandleClientRectChange()");
   260 	    if ( iContainer )
   278     if ( iContainer )
   261         {
   279         {
   262         iContainer->SetRect( ClientRect() );
   280         iContainer->SetRect( ClientRect() );
   263         } 
   281         } 
   264     }
   282     }
   265                   
       
   266 // ---------------------------------------------------------------------------
       
   267 // CGSMediaPlayerStreamingView::HandleListBoxEventL
       
   268 // ---------------------------------------------------------------------------
       
   269 
       
   270 void CGSMediaPlayerStreamingView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
       
   271     {
       
   272         MPX_FUNC("#MS# CGSMediaPlayerStreamingView::HandleListBoxEventL()");
       
   273 	    switch (aEventType)
       
   274         {
       
   275 			case EEventEnterKeyPressed:
       
   276 			case EEventItemSingleClicked:
       
   277 			case EEventItemDoubleClicked:
       
   278 				HandleListBoxSelectionL();
       
   279 				break;
       
   280 			default:
       
   281 			   break;
       
   282         }
       
   283     }
       
   284 
   283 
   285 // ---------------------------------------------------------------------------
   284 // ---------------------------------------------------------------------------
   286 // CGSMediaPlayerStreamingView::DynInitContainerL
   285 // CGSMediaPlayerStreamingView::DynInitContainerL
   287 // ---------------------------------------------------------------------------
   286 // ---------------------------------------------------------------------------
   288 //
   287 //
   289 void CGSMediaPlayerStreamingView::DynInitContainerL()
   288 void CGSMediaPlayerStreamingView::DynInitContainerL()
   290     {
   289     {
   291         MPX_FUNC("#MS# CGSMediaPlayerStreamingView::DynInitContainerL()");
   290     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::DynInitContainerL()");
   292 		CEikTextListBox* listbox = iContainer->ListBox();
   291     CEikTextListBox* listbox = iContainer->ListBox();
   293 
   292 
   294 		listbox->SetListBoxObserver(this);
   293     listbox->SetTopItemIndex(iTopItemIndex);
   295 		listbox->SetTopItemIndex(iTopItemIndex);
   294 
   296 
   295     if (iCurrentItem >= 0 && iCurrentItem < listbox->Model()->NumberOfItems()) // magic
   297 		if (iCurrentItem >= 0 && iCurrentItem < listbox->Model()->NumberOfItems()) // magic
   296         {
   298 			{
   297         listbox->SetCurrentItemIndexAndDraw(iCurrentItem);
   299 			listbox->SetCurrentItemIndexAndDraw(iCurrentItem);
   298         }
   300 			}
   299     }
   301     }
       
   302 
       
   303 // ---------------------------------------------------------------------------
       
   304 // CGSMediaPlayerStreamingView::HandleListBoxSelectionL()
       
   305 // Handles listbox selection.
       
   306 // ---------------------------------------------------------------------------
       
   307 //
       
   308 void CGSMediaPlayerStreamingView::HandleListBoxSelectionL() 
       
   309     {
       
   310 		iCurrentItem = iContainer->ListBox()->CurrentItemIndex();
       
   311 		iTopItemIndex = iContainer->ListBox()->TopItemIndex();
       
   312 		MPX_DEBUG3(_L("#MS# CGSMediaPlayerStreamingView::HandleListBoxSelectionL() iCurrentItem(%d) iTopItemIndex(%d)"),iCurrentItem,iTopItemIndex);
       
   313 
       
   314 		switch (iCurrentItem)
       
   315 			{
       
   316 			case KMPSettProxyViewListItemId:
       
   317 				if (!FeatureManager::FeatureSupported(KFeatureIdProtocolCdma))
       
   318 				{
       
   319 				// If KFeatureIdProtocolCdma is not supported then show the 
       
   320 				// Proxy view. Otherwise, fall through to show Network view because
       
   321 				// only Network setting is available.
       
   322 				AppUi()->ActivateLocalViewL(KMPSettProxyViewId);
       
   323 				break;
       
   324 				}
       
   325 			case KMPSettNetworkViewListItemId:
       
   326 				AppUi()->ActivateLocalViewL(KMPSettNetworkViewId);
       
   327 				break;
       
   328 			default:
       
   329 				break;
       
   330 			}
       
   331     }
       
   332 
       
   333     
   300     
   334 // ---------------------------------------------------------------------------
   301 // ---------------------------------------------------------------------------
   335 // CGSMediaPlayerStreamingView::CreateContainerL()
   302 // CGSMediaPlayerStreamingView::CreateContainerL()
   336 // Creates new iContainer.
   303 // Creates new iContainer.
   337 // ---------------------------------------------------------------------------
   304 // ---------------------------------------------------------------------------
   338 //
   305 //
   339 void CGSMediaPlayerStreamingView::CreateContainerL()
   306 void CGSMediaPlayerStreamingView::CreateContainerL()
   340     {
   307     {
   341         
   308     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::CreateContainerL()");
   342         MPX_FUNC("#MS# CGSMediaPlayerStreamingView::CreateContainerL()");
   309     NewContainerL();
   343 		NewContainerL();
   310     __ASSERT_DEBUG( 
   344 		__ASSERT_DEBUG( 
   311         iContainer, User::Panic( KGSDoActivateError, EGSViewPanicNullPtr ) );
   345 			iContainer, User::Panic( KGSDoActivateError, EGSViewPanicNullPtr ) );
   312     iContainer->SetMopParent( this );
   346 		iContainer->SetMopParent( this );
   313 
   347 
   314     //TRAPD( error, iContainer->ConstructL() );
   348 		//TRAPD( error, iContainer->ConstructL() );
   315     TRAPD( error, iContainer->ConstructL( ClientRect() ) );
   349 		TRAPD( error, iContainer->ConstructL( ClientRect() ) );
   316 
   350 
   317     if ( error )
   351 		if ( error )
   318         {
   352 		{
   319         delete iContainer;
   353 			delete iContainer;
   320         iContainer = NULL;
   354 			iContainer = NULL;
   321         User::Leave( error );
   355 			User::Leave( error );
   322         }
   356 		}
       
   357     }
   323     }
   358         
   324         
   359 // ---------------------------------------------------------------------------
   325 // ---------------------------------------------------------------------------
   360 // CGSMediaPlayerStreamingView::CreateTabIconL()
   326 // CGSMediaPlayerStreamingView::CreateTabIconL()
   361 // Creates tab icon for this view.
   327 // Creates tab icon for this view.
   362 // ---------------------------------------------------------------------------
   328 // ---------------------------------------------------------------------------
   363 //    
   329 //    
   364 CGulIcon* CGSMediaPlayerStreamingView::CreateTabIconL()
   330 CGulIcon* CGSMediaPlayerStreamingView::CreateTabIconL()
   365     {
   331     {
   366 
   332     MPX_FUNC("#MS# CGSMediaPlayerStreamingView::CreateTabIconL()");
   367         MPX_FUNC("#MS# CGSMediaPlayerStreamingView::CreateTabIconL()");
   333     CGulIcon* icon;
   368 		CGulIcon* icon;
   334     TFileName fileName;
   369 	    TFileName fileName;
   335 
   370 
   336     CGSVideoPlugin* parent = 
   371 		CGSVideoPlugin* parent = 
   337         static_cast<CGSVideoPlugin*> ( 
   372 			static_cast<CGSVideoPlugin*> ( 
   338             AppUi()->View( KGSVideoPluginUid ) );
   373 				AppUi()->View( KGSVideoPluginUid ) );
   339     
   374 		
   340     if( parent )
   375 	    if( parent )
   341         {
   376         {
   342         parent->LocateFilePathL( fileName );    
   377 	        parent->LocateFilePathL( fileName );    
   343         }
   378         } 
   344     
   379 	    
   345     icon = AknsUtils::CreateGulIconL(
   380 		icon = AknsUtils::CreateGulIconL(
   346         AknsUtils::SkinInstance(), 
   381 			AknsUtils::SkinInstance(), 
   347         KAknsIIDDefault, 
   382 			KAknsIIDDefault, 
   348         fileName,
   383 			fileName,
   349         EMbmMediasettingsQgn_prop_set_mp_stream_tab2,
   384 			EMbmMediasettingsQgn_prop_set_mp_stream_tab2,
   350         EMbmMediasettingsQgn_prop_set_mp_stream_tab2_mask );
   385 			EMbmMediasettingsQgn_prop_set_mp_stream_tab2_mask );
   351 
   386     
   352     return icon;
   387 		return icon;
       
   388 
       
   389     } 
   353     } 
   390     
   354     
   391 // ---------------------------------------------------------------------------
   355 // ---------------------------------------------------------------------------
   392 // CGSMediaPlayerStreamingView::HandleClientRectChange
   356 // CGSMediaPlayerStreamingView::HandleClientRectChange
   393 // ---------------------------------------------------------------------------
   357 // ---------------------------------------------------------------------------
   394 //
   358 //
   395 void CGSMediaPlayerStreamingView::SetCurrentItem(TInt aIndex)
   359 void CGSMediaPlayerStreamingView::SetCurrentItem(TInt aIndex)
   396     {
   360     {
   397         MPX_DEBUG2(_L("#MS# CGSMediaPlayerStreamingView::SetCurrentItem(%d)"),aIndex);
   361     MPX_DEBUG2(_L("#MS# CGSMediaPlayerStreamingView::SetCurrentItem(%d)"),aIndex);
   398 	    iCurrentItem = aIndex;
   362     iCurrentItem = aIndex;
   399     }      
   363     }      
   400 // End of File
   364 // End of File
   401 
   365