phonebookengines/contactsmodel/cntmodel/src/ccontactdatabase.cpp
changeset 24 0ba2181d7c28
parent 0 e686773b3f54
child 37 fd64c38c277d
equal deleted inserted replaced
0:e686773b3f54 24:0ba2181d7c28
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 /*
     2 // All rights reserved.
     2 * Copyright (c) 2005-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 #include <cntitem.h>
    19 #include <cntitem.h>
    17 #include <f32file.h>
    20 #include <f32file.h>
    18 #include <cntfldst.h>   //for ccontactfieldstorage used in setfieldasspeeddiall
    21 #include <cntfldst.h>   //for ccontactfieldstorage used in setfieldasspeeddiall
    19 #include <phbksync.h>
    22 #include <phbksync.h>
    20 #include <cntdb.h>
    23 #include <cntdb.h>
    21 
    24 
    22 #include "CNTSTD.H"
    25 #include "cntstd.h"
    23 #include "rcntmodel.h"
    26 #include "rcntmodel.h"
    24 #include "ccontactprivate.h"
    27 #include "ccontactprivate.h"
    25 
    28 
    26 #include "clplproxyfactory.h"
    29 #include "clplproxyfactory.h"
    27 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    28 #include "cntdb_internal.h"
       
    29 #include "cntsyncecom.h"
       
    30 
       
    31 const TInt KMajorVersion=1;
       
    32 
       
    33 const TInt KMinorVersion=0;
       
    34 
       
    35 const TInt KBuildNumber=40;
       
    36 #endif
       
    37 
    30 
    38 CContactDatabase::CContactDatabase():
    31 CContactDatabase::CContactDatabase():
    39 		iDbConnectionState(EDbConnectionNotReady),
    32 		iDbConnectionState(EDbConnectionNotReady),
    40 		iTablesOpen(EFalse),
    33 		iTablesOpen(EFalse),
    41 		iDbViewContactType(KUidContactItem),
    34 		iDbViewContactType(KUidContactItem),
  4159 	{
  4152 	{
  4160     return KErrNone; 
  4153     return KErrNone; 
  4161 	}
  4154 	}
  4162 
  4155 
  4163 
  4156 
  4164 void CContactDatabase::AddObserverL(MContactDbObserver& aChangeNotifier)
  4157 EXPORT_C void CContactDatabase::AddObserverL(MContactDbObserver& aChangeNotifier)
  4165 	{
  4158 	{
  4166 	iCntSvr->AddObserverL(aChangeNotifier);
  4159 	iCntSvr->AddObserverL(aChangeNotifier);
  4167 	}
  4160 	}
  4168 
  4161 
  4169 
  4162 
  4170 void CContactDatabase::RemoveObserver(const MContactDbObserver& aChangeNotifier)
  4163 EXPORT_C void CContactDatabase::RemoveObserver(const MContactDbObserver& aChangeNotifier)
  4171 	{
  4164 	{
  4172 	iCntSvr->RemoveObserver(aChangeNotifier);
  4165 	iCntSvr->RemoveObserver(aChangeNotifier);
  4173 	}
  4166 	}
  4174 	
  4167 	
  4175 
       
  4176 void CContactDatabase::CancelNotifyRequestL()
  4168 void CContactDatabase::CancelNotifyRequestL()
  4177 	{
  4169 	{
  4178 	}
  4170 	}
  4179 
  4171 
  4180 
  4172 
  5197 	RemoveFromTemplateList(aContactId);
  5189 	RemoveFromTemplateList(aContactId);
  5198 	//Now we check if the contact belonged to the Group Id list, if so 
  5190 	//Now we check if the contact belonged to the Group Id list, if so 
  5199 	//remove it from iGroupIds	
  5191 	//remove it from iGroupIds	
  5200 	RemoveFromGroupIds(aContactId);
  5192 	RemoveFromGroupIds(aContactId);
  5201 	}
  5193 	}
       
  5194