uifw/AknGlobalUI/AknNfySrv/src/AknNfySrv.cpp
branchRCL_3
changeset 19 aecbbf00d063
parent 15 c52421ed5f07
child 20 d48ab3b357f1
equal deleted inserted replaced
18:fcdfafb36fe7 19:aecbbf00d063
    18 #include <AknNotifierWrapperDefs.h>
    18 #include <AknNotifierWrapperDefs.h>
    19 #include <AknNotifierControllerPlugin.h>
    19 #include <AknNotifierControllerPlugin.h>
    20 #include "AknNfySrv.h"
    20 #include "AknNfySrv.h"
    21 
    21 
    22 const TUid KDllUid = {0x10000079};
    22 const TUid KDllUid = {0x10000079};
    23 const TInt KCheckInterval = 1000000 / 64;
    23 
    24     
    24     
    25 class CAknNotifierEntry: public CBase
    25 class CAknNotifierEntry: public CBase
    26     {
    26     {
    27 public:   
    27 public:   
    28     CAknNotifierEntry():iNotifier(0),iLibraryName(0){}
    28     CAknNotifierEntry():iNotifier(0),iLibraryName(0){}
    63         if (me->iLibraryArray[ii]->iReferenceCount == 0)
    63         if (me->iLibraryArray[ii]->iReferenceCount == 0)
    64             {
    64             {
    65             if (me->iLibraryArray[ii]->iNestingLevel >= CActiveScheduler::Current()->StackDepth())
    65             if (me->iLibraryArray[ii]->iNestingLevel >= CActiveScheduler::Current()->StackDepth())
    66                 {
    66                 {
    67                 me->DoUnload(me->iLibraryArray[ii]->iLibraryName->Des());
    67                 me->DoUnload(me->iLibraryArray[ii]->iLibraryName->Des());
    68                 me->iLibraryRemover->Cancel();
       
    69                 }
    68                 }
    70             else
    69             else
    71                 {
    70                 {
    72                 foundPending = ETrue;
    71                 foundPending = ETrue;
    73                 }   
    72                 }   
   110 
   109 
   111 void CAknNfySrv::CheckPendingRemovalsL()
   110 void CAknNfySrv::CheckPendingRemovalsL()
   112     {
   111     {
   113     if (!iLibraryRemover)
   112     if (!iLibraryRemover)
   114         {
   113         {
   115         iLibraryRemover = CPeriodic::NewL(CActive::EPriorityIdle); // there is no hurry
   114         iLibraryRemover = CIdle::NewL(CActive::EPriorityIdle); // there is no hurry
   116         }
   115         }
   117     else if (iLibraryRemover->IsActive())
   116     else if (iLibraryRemover->IsActive())
   118         {
   117         {
   119         if (CheckUnusedLibraries((TAny*) this))
   118         if (CheckUnusedLibraries((TAny*) this))
   120             {
   119             {
   290                         }
   289                         }
   291                     else
   290                     else
   292                         {                            
   291                         {                            
   293                         if (!iLibraryRemover->IsActive())
   292                         if (!iLibraryRemover->IsActive())
   294                             {
   293                             {
   295                             iLibraryRemover->Start(0, KCheckInterval, TCallBack(CheckUnusedLibraries, this));
   294                             iLibraryRemover->Start(TCallBack(CheckUnusedLibraries, this));
   296                             }
   295                             }
   297                         }
   296                         }
   298                     }
   297                     }
   299                 }    
   298                 }    
   300             break;               
   299             break;