idlehomescreen/xmluirendering/uiengine/src/xnplugindata.cpp
branchRCL_3
changeset 11 ff572dfe6d86
parent 9 f966699dea19
child 23 7be2816dbabd
--- a/idlehomescreen/xmluirendering/uiengine/src/xnplugindata.cpp	Fri Feb 19 22:42:37 2010 +0200
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnplugindata.cpp	Fri Mar 12 15:41:49 2010 +0200
@@ -35,7 +35,10 @@
 #include "xnoomsyshandler.h"
 #include "xnpanic.h"
 
+#include "debug.h"
+
 // Constants
+_LIT8( KLockingStatusLocked, "locked" );
 
 // ============================ LOCAL FUNCTIONS ================================
 
@@ -132,8 +135,7 @@
         }
 
     iFlags.Clear( EIsEmpty );
-    iFlags.Set( EIsRemovable );
-           
+              
     TInt err( KErrNone );
     
     TRAP( err, err = iManager.Composer().ComposeWidgetL( *this ) );
@@ -224,7 +226,9 @@
 // -----------------------------------------------------------------------------
 //
 TInt CXnPluginData::LoadPublishers( TInt aReason )
-    {                
+    {           
+    __PRINTS( "*** CXnPluginData::LoadPublishers" );
+    
     TInt err( KErrNone );
 
     TRAP( err,
@@ -250,6 +254,8 @@
         return KErrNone;
         }
     
+    __PRINTS( "*** CXnPluginData::LoadPublishers - done" );
+    
     return err;        
     }
 
@@ -259,7 +265,9 @@
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::DestroyPublishers()
-    {              
+    {    
+    __PRINTS( "*** CXnPluginData::DestroyPublishers" );
+    
     if ( Occupied() )
         {
         // If not all plugins loaded yet               
@@ -269,6 +277,8 @@
         
         User::Heap().Compress();
         }    
+    
+    __PRINTS( "*** CXnPluginData::DestroyPublishers - done" );
     }
 
 // -----------------------------------------------------------------------------
@@ -288,6 +298,8 @@
 //
 void CXnPluginData::DoDestroyPublishersL()
     {
+    __TIME_MARK( time );
+    
     for ( TInt i = 0; i < iContentSourceNodes.Count(); i++ )
         {
         CXnNodeAppIf& plugin( iContentSourceNodes[i]->AppIfL() );
@@ -296,6 +308,8 @@
         iManager.AppUiAdapter().DestroyPublisher( 
             plugin, EAiFwPluginShutdown );        
         }
+    
+    __TIME_ENDMARK( "CXnPluginData::DoDestroyPublishersL, done", time );
     }
 
 // -----------------------------------------------------------------------------
@@ -583,8 +597,7 @@
     // Takes ownership
     iPluginId = id;
            
-    iFlags.Set( EIsEmpty );
-    iFlags.Clear( EIsRemovable );
+    iFlags.Set( EIsEmpty );    
     }
     
 // -----------------------------------------------------------------------------
@@ -619,6 +632,18 @@
     return ( iPopupNodes.Count() > 0 );
     }
 
+// -----------------------------------------------------------------------------
+// CXnPluginData::PopupNodesL()
+// -----------------------------------------------------------------------------
+//
+void CXnPluginData::PopupNodesL( RPointerArray< CXnNode >& aList ) const
+    {
+    for ( TInt i = 0; i < iPopupNodes.Count(); i++ )
+        {
+        aList.AppendL( iPopupNodes[i] );
+        }
+    }
+
 //------------------------------------------------------------------------------
 // CXnPluginData::ShowContentRemovedError()      
 //
@@ -657,4 +682,21 @@
     TRAP_IGNORE( ViewManager().OomSysHandler().HandlePotentialOomL() );
     }
 
+// -----------------------------------------------------------------------------
+// CXnViewData::SetLockingStatus
+// 
+// -----------------------------------------------------------------------------
+//
+void CXnPluginData::SetLockingStatus( const TDesC8& aStatus )
+    {
+    if ( aStatus.CompareF( KLockingStatusLocked ) == 0 )
+        {
+        iFlags.Clear( EIsRemovable );
+        }
+    else
+        {
+        iFlags.Set( EIsRemovable );
+        }
+    }
+
 // End of file