psmservices/psmserver/src/engine/psmmanager.cpp
branchRCL_3
changeset 21 ccb4f6b3db21
parent 0 4e1aa6a622a0
child 22 8cb079868133
equal deleted inserted replaced
20:1ddbe54d0645 21:ccb4f6b3db21
     1 /*
     1 /*
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   111         }
   111         }
   112 
   112 
   113     if ( iPluginLoader )
   113     if ( iPluginLoader )
   114         {
   114         {
   115         delete iPluginLoader;
   115         delete iPluginLoader;
   116         }
   116         }    
   117 
   117     
   118     // Close mode observers array
   118     // Close mode observers array
   119     iModeObservers.Close();
   119     iModeObservers.Close();
   120 
   120 
   121     COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::~CPsmManager - return") ) );
   121     COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::~CPsmManager - return") ) );
   122     }
   122     }
   284     NotifyObservers( aError );
   284     NotifyObservers( aError );
   285     return KErrNone;
   285     return KErrNone;
   286     }
   286     }
   287 
   287 
   288 // -----------------------------------------------------------------------------
   288 // -----------------------------------------------------------------------------
   289 // CPsmManager::RegisterObserver
   289 // CPsmManager::RegisterObserverL
   290 // -----------------------------------------------------------------------------
   290 // -----------------------------------------------------------------------------
   291 //
   291 //
   292 void CPsmManager::RegisterObserver( MPsmModeChangeObserver* aObserver )
   292 void CPsmManager::RegisterObserverL( MPsmModeChangeObserver* aObserver )
   293     {
   293     {
   294     COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::RegisterObserver()" ) ) );
   294     COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::RegisterObserverL()" ) ) );
   295     iModeObservers.Append( aObserver );
   295     iModeObservers.AppendL( aObserver );    
   296     COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::RegisterObserver - return" ) ) );
   296     COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::RegisterObserverL() return" ) ) );
   297     }
   297     }
   298 
   298 
   299 // -----------------------------------------------------------------------------
   299 // -----------------------------------------------------------------------------
   300 // CPsmManager::UnregisterObserver
   300 // CPsmManager::UnregisterObserver
   301 // -----------------------------------------------------------------------------
   301 // -----------------------------------------------------------------------------
   324     {
   324     {
   325     COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::SettingsProvider()" ) ) );
   325     COMPONENT_TRACE( ( _L( "PSM Server - CPsmManager::SettingsProvider()" ) ) );
   326     return *iSettingsHandler; 
   326     return *iSettingsHandler; 
   327     }
   327     }
   328 
   328 
       
   329 #ifdef _DEBUG 
       
   330 // -----------------------------------------------------------------------------
       
   331 // CPsmManager::ClosePluginLoader
       
   332 // For testing purpose 
       
   333 // -----------------------------------------------------------------------------
       
   334 void CPsmManager::ClosePluginLoader()
       
   335     {
       
   336     if(iPluginLoader)
       
   337         {
       
   338         delete iPluginLoader;
       
   339         iPluginLoader=NULL;
       
   340         }
       
   341     }
       
   342 
       
   343 // -----------------------------------------------------------------------------
       
   344 // CPsmManager::CompressModeObserversArray
       
   345 // For testing purpose 
       
   346 // -----------------------------------------------------------------------------
       
   347 void CPsmManager::CompressModeObserversArray()
       
   348     {
       
   349     iModeObservers.Compress();
       
   350     }
       
   351 #endif // _DEBUG 
   329 // End of file
   352 // End of file