idlehomescreen/xmluirendering/uiengine/src/xnrootdata.cpp
branchRCL_3
changeset 35 3321d3e205b6
parent 34 5456b4e8b3a8
equal deleted inserted replaced
34:5456b4e8b3a8 35:3321d3e205b6
    43 
    43 
    44 #include "debug.h"
    44 #include "debug.h"
    45 
    45 
    46 // Constants
    46 // Constants
    47 const TInt KScheduleInterval( 2000000 );
    47 const TInt KScheduleInterval( 2000000 );
       
    48 _LIT8( KTemplateViewUID, "0x20026f50" );
    48 
    49 
    49 // ============================ LOCAL FUNCTIONS ================================
    50 // ============================ LOCAL FUNCTIONS ================================
    50 
    51 
    51 // ============================ MEMBER FUNCTIONS ===============================
    52 // ============================ MEMBER FUNCTIONS ===============================
    52 // -----------------------------------------------------------------------------
    53 // -----------------------------------------------------------------------------
    92 // C++ default destructor.
    93 // C++ default destructor.
    93 // -----------------------------------------------------------------------------
    94 // -----------------------------------------------------------------------------
    94 //
    95 //
    95 CXnRootData::~CXnRootData()
    96 CXnRootData::~CXnRootData()
    96     {
    97     {
       
    98     delete iTemplateViewUid;
       
    99     iTemplateViewUid = NULL;
       
   100     
    97     if ( iLoadTimer )
   101     if ( iLoadTimer )
    98         {
   102         {
    99         iLoadTimer->Cancel();
   103         iLoadTimer->Cancel();
   100         }
   104         }
   101     
   105     
   248 // -----------------------------------------------------------------------------
   252 // -----------------------------------------------------------------------------
   249 // CXnRootData::LoadRemainingViews()
   253 // CXnRootData::LoadRemainingViews()
   250 // 
   254 // 
   251 // -----------------------------------------------------------------------------
   255 // -----------------------------------------------------------------------------
   252 //
   256 //
   253 void CXnRootData::LoadRemainingViews()
   257 void CXnRootData::LoadRemainingViewsL()
   254     {
   258     {
   255     if ( iFlags.IsClear( EIsDispose ) )
   259     if ( iFlags.IsClear( EIsDispose ) )
   256         {
   260         {
   257         if ( !AllViewsLoaded() )
   261         if ( !AllViewsLoaded() )
   258             {
   262             {
   432     
   436     
   433     if ( index != KErrNotFound )
   437     if ( index != KErrNotFound )
   434         {
   438         {
   435         iPluginsData.Remove( index );
   439         iPluginsData.Remove( index );
   436                 
   440                 
   437         if ( iViewsToDestroy.Find( aViewData ) == KErrNotFound )
   441         if ( iViewsToDestroy.Find( aViewData ) == KErrNotFound && 
   438             {
   442            iViewsToDestroy.Append( aViewData ) == KErrNone )
   439             iViewsToDestroy.Append( aViewData );
   443             {
   440             
       
   441             iDestroyTimer->Cancel();
   444             iDestroyTimer->Cancel();
   442             
   445             
   443             iDestroyTimer->Start( TTimeIntervalMicroSeconds32( 0 ),
   446             iDestroyTimer->Start( TTimeIntervalMicroSeconds32( 0 ),
   444                                   TTimeIntervalMicroSeconds32( 0 ),
   447                                   TTimeIntervalMicroSeconds32( 0 ),
   445                                   TCallBack( RunDestroyL, this ) );                       
   448                                   TCallBack( RunDestroyL, this ) );                       
   597 //
   600 //
   598 TInt32 CXnRootData::MaxPages()
   601 TInt32 CXnRootData::MaxPages()
   599     {
   602     {
   600     return iMaxPages;
   603     return iMaxPages;
   601     }
   604     }
       
   605 
       
   606 // ---------------------------------------------------------------------------
       
   607 // Returns TemplateViewUid
       
   608 // ---------------------------------------------------------------------------
       
   609 //
       
   610 const TDesC8& CXnRootData::TemplateViewUid() const
       
   611     {
       
   612     const TDesC8& templateViewUid = KTemplateViewUID;
       
   613     return iTemplateViewUid ? *iTemplateViewUid : templateViewUid; // qhd uid
       
   614     };
       
   615 
       
   616 // ---------------------------------------------------------------------------
       
   617 // Sets TemplateViewUid
       
   618 // ---------------------------------------------------------------------------
       
   619 //
       
   620 void CXnRootData::SetTemplateViewUidL( const TDesC8& aTemplateViewUid )
       
   621     {
       
   622     delete iTemplateViewUid;
       
   623     iTemplateViewUid = NULL;
       
   624 
       
   625     iTemplateViewUid = aTemplateViewUid.AllocL();
       
   626     };
   602 
   627 
   603 // -----------------------------------------------------------------------------
   628 // -----------------------------------------------------------------------------
   604 // CXnRootData::RunDestroyL()
   629 // CXnRootData::RunDestroyL()
   605 // 
   630 // 
   606 // -----------------------------------------------------------------------------
   631 // -----------------------------------------------------------------------------