videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolconfiguration.cpp
branchRCL_3
changeset 21 315810614048
parent 18 baf439b22ddd
equal deleted inserted replaced
20:2d690156cf8f 21:315810614048
    14 * Description:  Implementation of MPXVideoPlaybackControlConfiguration
    14 * Description:  Implementation of MPXVideoPlaybackControlConfiguration
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // Version : %version: 15 %
    19 // Version : %version: 16 %
    20 
    20 
    21 
    21 
    22 // INCLUDE FILES
    22 // INCLUDE FILES
    23 #include <e32def.h>
    23 #include <e32def.h>
    24 #include <e32base.h>
    24 #include <e32base.h>
   135 // -------------------------------------------------------------------------------------------------
   135 // -------------------------------------------------------------------------------------------------
   136 // CMPXVideoPlaybackControlConfiguration::UpdateControlListL
   136 // CMPXVideoPlaybackControlConfiguration::UpdateControlListL
   137 // -------------------------------------------------------------------------------------------------
   137 // -------------------------------------------------------------------------------------------------
   138 //
   138 //
   139 void CMPXVideoPlaybackControlConfiguration::UpdateControlListL(
   139 void CMPXVideoPlaybackControlConfiguration::UpdateControlListL(
   140     TMPXVideoPlaybackControlCommandIds aEvent )
   140     TMPXVideoPlaybackControlCommandIds aEvent, TBool aShowArIcon )
   141 {
   141 {
   142     MPX_DEBUG(_L("CMPXVideoPlaybackControlConfiguration::UpdateControlListL(%d)"), aEvent);
   142     MPX_DEBUG(_L("CMPXVideoPlaybackControlConfiguration::UpdateControlListL(%d)"), aEvent);
   143 
   143 
   144     //
   144     //
   145     //  This fuction will be getting called
   145     //  This fuction will be getting called
   146     //    - After Initialization complete
   146     //    - After Initialization complete
   147     //    - When TV-out cable get connected/disconnected
   147     //    - When TV-out cable get connected/disconnected
   148     //    - When enters/exits aspect ratio mode
       
   149     //
   148     //
   150     switch ( aEvent )
   149     switch ( aEvent )
   151     {
   150     {
   152         case EMPXControlCmdSetDownloadPaused:
   151         case EMPXControlCmdSetDownloadPaused:
   153         {
   152         {
   199                     DeleteControlFromList( EMPXArtistLabel );
   198                     DeleteControlFromList( EMPXArtistLabel );
   200 
   199 
   201                     iTitleArtistIndicatorsAdded = EFalse;
   200                     iTitleArtistIndicatorsAdded = EFalse;
   202                 }
   201                 }
   203 
   202 
   204                 if ( ! iAspectRatioIconAdded && iControlsController->ShowAspectRatioIcon() )
   203                 if ( ! iAspectRatioIconAdded && aShowArIcon )
   205                 {
   204                 {
   206                     iControlsList.AppendL( EMPXAspectRatioIcon );
   205                     iControlsList.AppendL( EMPXAspectRatioIcon );
   207                     iAspectRatioIconAdded = ETrue;
   206                     iAspectRatioIconAdded = ETrue;
   208                 }
   207                 }
   209             }
   208             }
   217                 DeleteControlFromList( EMPXBrandingAnimation );
   216                 DeleteControlFromList( EMPXBrandingAnimation );
   218             }
   217             }
   219 
   218 
   220             break;
   219             break;
   221         }
   220         }
       
   221         case EMPXControlCmdCreateAspectRatioIcon:
       
   222         {
       
   223             if ( ! iAspectRatioIconAdded )
       
   224             {
       
   225                 iControlsList.AppendL( EMPXAspectRatioIcon );
       
   226                 iAspectRatioIconAdded = ETrue;
       
   227             }
       
   228 
       
   229             break;
       
   230         }
       
   231         case EMPXControlCmdDeleteAspectRatioIcon:
       
   232         {
       
   233             if ( iAspectRatioIconAdded )
       
   234             {
       
   235                 DeleteControlFromList( EMPXAspectRatioIcon );
       
   236                 iAspectRatioIconAdded = EFalse;
       
   237             }
       
   238 
       
   239             break;
       
   240         }
   222     }
   241     }
   223 }
   242 }
   224 
   243 
   225 // -------------------------------------------------------------------------------------------------
   244 // -------------------------------------------------------------------------------------------------
   226 // CMPXVideoPlaybackControlConfiguration::DeleteControlFromList
   245 // CMPXVideoPlaybackControlConfiguration::DeleteControlFromList
   267                 iControlsList.AppendL( EMPXTitleLabel );
   286                 iControlsList.AppendL( EMPXTitleLabel );
   268                 iControlsList.AppendL( EMPXArtistLabel );
   287                 iControlsList.AppendL( EMPXArtistLabel );
   269 
   288 
   270                 iTitleArtistIndicatorsAdded = ETrue;
   289                 iTitleArtistIndicatorsAdded = ETrue;
   271             }
   290             }
   272 
       
   273             if ( iAspectRatioIconAdded )
       
   274             {
       
   275                 DeleteControlFromList( EMPXAspectRatioIcon );
       
   276                 iAspectRatioIconAdded = EFalse;
       
   277             }
       
   278         }
   291         }
   279         else
   292         else
   280         {
   293         {
   281             if ( iTitleArtistIndicatorsAdded )
   294             if ( iTitleArtistIndicatorsAdded )
   282             {
   295             {
   283                 DeleteControlFromList( EMPXTitleLabel );
   296                 DeleteControlFromList( EMPXTitleLabel );
   284                 DeleteControlFromList( EMPXArtistLabel );
   297                 DeleteControlFromList( EMPXArtistLabel );
   285 
   298 
   286                 iTitleArtistIndicatorsAdded = EFalse;
   299                 iTitleArtistIndicatorsAdded = EFalse;
   287             }
       
   288 
       
   289             if ( ! iAspectRatioIconAdded && iControlsController->ShowAspectRatioIcon() )
       
   290             {
       
   291                 iControlsList.AppendL( EMPXAspectRatioIcon );
       
   292                 iAspectRatioIconAdded = ETrue;
       
   293             }
   300             }
   294         }
   301         }
   295     }
   302     }
   296     else
   303     else
   297     {
   304     {
   333             iControlsList.AppendL( EMPXTitleLabel );
   340             iControlsList.AppendL( EMPXTitleLabel );
   334             iControlsList.AppendL( EMPXArtistLabel );
   341             iControlsList.AppendL( EMPXArtistLabel );
   335 
   342 
   336             iTitleArtistIndicatorsAdded = ETrue;
   343             iTitleArtistIndicatorsAdded = ETrue;
   337         }
   344         }
   338 
       
   339         //
       
   340         //  If video isn't enable, delete aspect ratio icon
       
   341         //
       
   342         if ( iAspectRatioIconAdded )
       
   343         {
       
   344             DeleteControlFromList( EMPXAspectRatioIcon );
       
   345             iAspectRatioIconAdded = EFalse;
       
   346         }
       
   347     }
   345     }
   348 }
   346 }
   349 
   347 
   350 
   348 
   351 // End of File
   349 // End of File