src/screensaverctrlplugin.cpp
branchRCL_3
changeset 11 4784a3bc2236
parent 10 1c806ee746e7
child 16 1f307dce3b5a
equal deleted inserted replaced
10:1c806ee746e7 11:4784a3bc2236
    61 // -----------------------------------------------------------------------------
    61 // -----------------------------------------------------------------------------
    62 //
    62 //
    63 void CScreensaverCtrlPlugin::StartTimer()
    63 void CScreensaverCtrlPlugin::StartTimer()
    64     {
    64     {
    65     // Notify plugin that screensaver is starting
    65     // Notify plugin that screensaver is starting
       
    66     Model().SharedDataInterface()->SetSSForcedLightsOn( ESSForceLightsOn );
       
    67     
    66     SendPluginEvent( EScreensaverEventStarting );
    68     SendPluginEvent( EScreensaverEventStarting );
    67     
    69     
    68     
    70     
    69     StartPluginRefreshTimer();
    71     StartPluginRefreshTimer();
    70 
    72 
   144         }
   146         }
   145 
   147 
   146     return KErrNone;
   148     return KErrNone;
   147     }
   149     }
   148 
   150 
       
   151 // ---------------------------------------------------------------------------
       
   152 // CScreensaverCtrlPlugin::PluginImplementationUid()
       
   153 // ---------------------------------------------------------------------------
       
   154 //
       
   155 TUid CScreensaverCtrlPlugin::PluginImplementationUid() const
       
   156     {
       
   157     return iPluginImplUid;
       
   158     }
       
   159 
   149 // From MScreensaverPluginHost
   160 // From MScreensaverPluginHost
   150 // -----------------------------------------------------------------------------
   161 // -----------------------------------------------------------------------------
   151 // CScreensaverCtrlPlugin::UseStandardIndicators
   162 // CScreensaverCtrlPlugin::UseStandardIndicators
   152 // -----------------------------------------------------------------------------
   163 // -----------------------------------------------------------------------------
   153 //
   164 //
   542     TLex lex( pluginName );
   553     TLex lex( pluginName );
   543     
   554     
   544     // Skip the first character: '['
   555     // Skip the first character: '['
   545     lex.Get();
   556     lex.Get();
   546     
   557     
   547     TUint screenSaverPluginImpUid;
   558     TUint32 tempUid;
   548     
   559     
   549     // Get the UID
   560     // Get the UID
   550     TInt err = lex.Val( screenSaverPluginImpUid, EHex );
   561     TInt err = lex.Val( tempUid, EHex );
   551     
   562     
   552     // Bail out, if the UID is not parseable
   563     // Bail out, if the UID is not parseable
   553     if ( err != KErrNone )
   564     if ( err != KErrNone )
   554         {
   565         {
   555         iPlugin = NULL;
   566         iPlugin = NULL;
   556         }
   567         }
       
   568     
       
   569     iPluginImplUid = TUid::Uid( tempUid );
   557     //codescanner will crib if leaving function inside trap is called
   570     //codescanner will crib if leaving function inside trap is called
   558     //after line break within the macro. Hence the following trap call
   571     //after line break within the macro. Hence the following trap call
   559     //is made in a single line
   572     //is made in a single line
   560     TRAP(err, iPlugin = STATIC_CAST( MScreensaverPlugin*, 
   573     TRAP(err, iPlugin = STATIC_CAST( MScreensaverPlugin*, 
   561         CScreensaverPluginInterfaceDefinition::NewL( 
   574         CScreensaverPluginInterfaceDefinition::NewL( iPluginImplUid ) ) );
   562             TUid::Uid( screenSaverPluginImpUid ) ) ) );
       
   563     
   575     
   564     if( err != KErrNone )
   576     if( err != KErrNone )
   565         return;
   577         return;
   566     
   578     
   567     TRAP( err, err = iPlugin->InitializeL( this ) );
   579     TRAP( err, err = iPlugin->InitializeL( this ) );