emailservices/emailframework/src/CFSMailPluginManager.cpp
branchRCL_3
changeset 61 dcf0eedfc1a3
parent 8 e1b6206813b4
child 63 d189ee25cf9d
equal deleted inserted replaced
60:d620048b4810 61:dcf0eedfc1a3
   137 	{
   137 	{
   138     FUNC_LOG;
   138     FUNC_LOG;
   139 	return iPluginList.Count();
   139 	return iPluginList.Count();
   140 	}
   140 	}
   141 	
   141 	
       
   142 // -----------------------------------------------------------------------------
       
   143 // CFSMailPluginManager::RecheckPlugins
       
   144 // -----------------------------------------------------------------------------
   142 
   145 
   143 
   146 void CFSMailPluginManager::RecheckPlugins( )
       
   147     {
       
   148     FUNC_LOG;
       
   149     
       
   150     CFSMailPlugin* plugin = NULL;
       
   151     
       
   152     TInt tempCount = iPluginInfo.Count();
       
   153     
       
   154     for ( TInt i = 0; i < tempCount; i++ )
       
   155         {
       
   156         TUid id = iPluginInfo[i]->ImplementationUid();
       
   157         TBool found = false;
       
   158         
       
   159         // check if plugin is already in plugin list
       
   160         for ( TInt j = 0; j < iPluginList.Count(); j++)
       
   161             {
       
   162             
       
   163             if ( iPluginList[j]->iPluginId == id )
       
   164                 {
       
   165                 found = true;
       
   166                 break;
       
   167                 }
       
   168             }
       
   169         // if plugin is not found try to create it and add it to plugin list.
       
   170         if ( !found )
       
   171             {
       
   172             TRAPD(err,plugin = CFSMailPlugin::NewL( id ));
       
   173             CFSMailPlugin::Close();
       
   174             if ( err == KErrNone && plugin != NULL )
       
   175                 {
       
   176                 AddPluginL(id,plugin);
       
   177                 }
       
   178             }
       
   179         }
       
   180     }