phonebookengines/contactsmodel/cntplsql/src/csqlitelocalview.cpp
changeset 37 fd64c38c277d
parent 25 76a2435edfd4
child 46 efe85016a067
equal deleted inserted replaced
31:2a11b5b00470 37:fd64c38c277d
    28 #include <cntviewsortplugin.h>
    28 #include <cntviewsortplugin.h>
    29 #include "persistencelayer.h"
    29 #include "persistencelayer.h"
    30 #include "cviewcontactmanager.h"
    30 #include "cviewcontactmanager.h"
    31 #include "cntstd.h"
    31 #include "cntstd.h"
    32 #include <phbksync.h>
    32 #include <phbksync.h>
       
    33 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    34 #include <cntviewsortpluginbase.h>
       
    35 #endif
    33 //uncomment to test
    36 //uncomment to test
    34 //#define __PROFILE_SORT__
    37 //#define __PROFILE_SORT__
    35 
    38 
    36 //uncomment for commonly required debug printing
    39 //uncomment for commonly required debug printing
    37 //#define __VERBOSE_DEBUG__
    40 //#define __VERBOSE_DEBUG__
   605 #if defined(__VERBOSE_DEBUG__)
   608 #if defined(__VERBOSE_DEBUG__)
   606 			DebugLogNotification(_L("[CNTMODEL] . . . . . Queueing Database Event "), aEvent);
   609 			DebugLogNotification(_L("[CNTMODEL] . . . . . Queueing Database Event "), aEvent);
   607 #endif
   610 #endif
   608 			iOutstandingEvents.AppendL(aEvent);
   611 			iOutstandingEvents.AppendL(aEvent);
   609 			
   612 			
   610 			// The view state is set to ENotReady when a recovery takes place, and also when the tables
   613             // The view state is set to ENotReady when a recovery takes place, and also when the tables
   611 			// are closed, so set ready here.
   614             // are closed, so set ready here.
   612 			if (iState == ENotReady && (aEvent.iType
   615             if (iState == ENotReady && (aEvent.iType
   613 			        == EContactDbObserverEventRecover || aEvent.iType
   616                     == EContactDbObserverEventRecover || aEvent.iType
   614 			        == EContactDbObserverEventTablesOpened))
   617                     == EContactDbObserverEventTablesOpened))
   615 			    {
   618                 {
   616                 SetState(EReady);
   619                 SetState(EReady);
   617 			    }
   620                 }
   618 			// view was Initializing (sorting) before recovery or compression started! 
   621             // view was Initializing (sorting) before recovery or compression started!  
   619 			if (iState == EInitializing && (aEvent.iType
   622             if (iState == EInitializing && (aEvent.iType
   620 			        == EContactDbObserverEventRecover || aEvent.iType
   623                     == EContactDbObserverEventRecover || aEvent.iType
   621 			        == EContactDbObserverEventCompress))
   624                     == EContactDbObserverEventCompress))
   622 			    {
   625                 {
   623                 // re-read database and sort
   626                 // re-read database and sort
   624                 SafeResort();
   627                 SafeResort();
   625 			    }
   628                 }
   626 			
   629                 
   627 			}		
   630 			}		
   628 			
   631 			
   629 			
   632 			
   630 #if defined(__VERBOSE_DEBUG__)
   633 #if defined(__VERBOSE_DEBUG__)
   631 		else
   634 		else