phonebookengines/contactsmodel/cntsrv/src/CCntStateMachine.cpp
changeset 24 0ba2181d7c28
parent 0 e686773b3f54
child 46 efe85016a067
equal deleted inserted replaced
0:e686773b3f54 24:0ba2181d7c28
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 /*
     2 // All rights reserved.
     2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 // This component and the accompanying materials are made available
     3 * All rights reserved.
     4 // under the terms of "Eclipse Public License v1.0"
     4 * This component and the accompanying materials are made available
     5 // which accompanies this distribution, and is available
     5 * under the terms of "Eclipse Public License v1.0"
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 * which accompanies this distribution, and is available
     7 //
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 // Initial Contributors:
     8 *
     9 // Nokia Corporation - initial contribution.
     9 * Initial Contributors:
    10 //
    10 * Nokia Corporation - initial contribution.
    11 // Contributors:
    11 *
    12 //
    12 * Contributors:
    13 // Description:
    13 *
    14 //
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
    15 
    18 
    16 /**
    19 /**
    17  @file
    20  @file
    18  @internalTechnology
    21  @internalTechnology
    19  @released 
    22  @released 
    20 */
    23 */
    21 
    24 
    22 #include "CCntStateMachine.h"
    25 #include "ccntstatemachine.h"
    23 #include "CCntRequest.h"
    26 #include "ccntrequest.h"
    24 #include "CCntDbManager.h"
    27 #include "ccntdbmanager.h"
    25 #include "CCntBackupRestoreAgent.h"
    28 #include "ccntbackuprestoreagent.h"
    26 #include "persistencelayer.h"
    29 #include "persistencelayer.h"
    27 #include "CntSpeedDials.h"
    30 #include "cntspeeddials.h"
    28 #include <cntfldst.h> 		// for ccontacttextfield
    31 #include <cntfldst.h> 		// for ccontacttextfield
    29 #include <cntfield.h> 		// for ccontacttextfield
    32 #include <cntfield.h> 		// for ccontacttextfield
    30 #include "CNTSTD.H"   		// for Panic codes
    33 #include "cntstd.h"   		// for panic codes
    31 
    34 
    32 // Event related headers
    35 // Event related headers
    33 #include <cntdbobs.h> 	    // for ccontactdbobserver
    36 #include <cntdbobs.h> 	    // for ccontactdbobserver
    34 #include "CCntServer.h"     // for KCntNullConnectionId.
    37 #include "ccntserver.h"     // for kcntnullconnectionid.
    35 #include "CCntEventQueue.h" // for KMaxNumberOfEventsInEventQueue, KCntEventGranularity
    38 #include "ccnteventqueue.h" // for kmaxnumberofeventsineventqueue, kcnteventgranularity
    36 #include "CCntLogger.h"  
    39 #include "ccntlogger.h"  
    37 
    40 
    38 // Require SQL header for leave code checking
    41 // Require SQL header for leave code checking
    39 #include <sqldb.h>
    42 #include <sqldb.h>
    40 	
    43 	
    41 /** 
    44 /** 
  1100 	return DeferRequest(aRequest);
  1103 	return DeferRequest(aRequest);
  1101 	}
  1104 	}
  1102 
  1105 
  1103 
  1106 
  1104 
  1107 
  1105 // CStateWritable Class implementation //
  1108 ///////////////////// CStateWritable Class implementation //////////////////////
  1106 
  1109 
  1107 /** 
  1110 /** 
  1108  CStateWritable Class NewL factory constructor
  1111  CStateWritable Class NewL factory constructor
  1109  @see CState constructor
  1112  @see CState constructor
  1110 */ 
  1113 */ 
  1586 	return KErrInUse;		
  1589 	return KErrInUse;		
  1587 	}
  1590 	}
  1588 
  1591 
  1589 
  1592 
  1590 
  1593 
  1591 // CStateTransaction Implementation//
  1594 ///////////////////// CStateTransaction Implementation/////////////////
  1592 /** 
  1595 /** 
  1593  CStateTransaction Class NewL factory constructor
  1596  CStateTransaction Class NewL factory constructor
  1594  Create a transaction state
  1597  Create a transaction state
  1595  @see CState constructor
  1598  @see CState constructor
  1596 */ 
  1599 */ 
  2127 	iEventQ.Reset(); // Empty the queue	
  2130 	iEventQ.Reset(); // Empty the queue	
  2128 	}
  2131 	}
  2129 
  2132 
  2130 
  2133 
  2131 
  2134 
  2132 // CTransactionTimer Implementation //
  2135 ////////////////// CTransactionTimer Implementation //////////////////////
  2133 
  2136 
  2134 /** 
  2137 /** 
  2135  CTransactionTimer Class NewL factory constructor
  2138  CTransactionTimer Class NewL factory constructor
  2136  Create a transaction timer
  2139  Create a transaction timer
  2137 
  2140 
  2209 	{
  2212 	{
  2210 	CTimer::Cancel();
  2213 	CTimer::Cancel();
  2211 	CTimer::After(KSixtySeconds);
  2214 	CTimer::After(KSixtySeconds);
  2212 	}
  2215 	}
  2213 	
  2216 	
  2214 // CTransactionLock Class Implementation //
  2217 ////////////////// CTransactionLock Class Implementation ////////////////////////
  2215 /** 
  2218 /** 
  2216  CTransactionLock Class NewL factory constructor
  2219  CTransactionLock Class NewL factory constructor
  2217  The CTransactionLock class locks contacts allowing only the locking session to
  2220  The CTransactionLock class locks contacts allowing only the locking session to
  2218  modify the contact item in the database.
  2221  modify the contact item in the database.
  2219 */
  2222 */