equal
deleted
inserted
replaced
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 /* |
2 // All rights reserved. |
2 * Copyright (c) 2004-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 @internalComponent |
21 @internalComponent |
19 @released |
22 @released |
23 #include <cntitem.h> |
26 #include <cntitem.h> |
24 #include <cntdb.h> |
27 #include <cntdb.h> |
25 #include <cntfilt.h> |
28 #include <cntfilt.h> |
26 |
29 |
27 #include "rcntmodel.h" |
30 #include "rcntmodel.h" |
28 #include "persistencelayer.h" // For MLplCollection. |
31 #include "persistencelayer.h" // for mlplcollection. |
29 #include "CCntNotificationMonitor.h" |
32 #include "ccntnotificationmonitor.h" |
30 #include "ccontactprivate.h" // For MProgressEventHander. |
33 #include "ccontactprivate.h" // for mprogresseventhander. |
31 #include "CCntPackager.h" |
34 #include "ccntpackager.h" |
32 #include <cntviewstore.h> |
35 #include <cntviewstore.h> |
33 |
36 |
34 |
37 |
35 /** Contacts server version number. */ |
38 /** Contacts server version number. */ |
36 const TInt KCntServerMajorVersionNumber=1; |
39 const TInt KCntServerMajorVersionNumber=1; |
1449 CleanupStack::Pop(idArray); |
1452 CleanupStack::Pop(idArray); |
1450 |
1453 |
1451 return idArray; |
1454 return idArray; |
1452 } |
1455 } |
1453 |
1456 |
1454 |
|
1455 /** |
1457 /** |
1456 Get a collection of contact IDs using the specified collection parameters. |
1458 Get a collection of contact IDs using the specified collection parameters. |
1457 |
1459 |
1458 @param aCollectionType Type of collection. |
1460 @param aCollectionType Type of collection. |
1459 @param aTime Used if collection type is "changed since". |
1461 @param aTime Used if collection type is "changed since". |
1853 if(aOrigIdArray != NULL) |
1855 if(aOrigIdArray != NULL) |
1854 { |
1856 { |
1855 // Append to the old array if it was not NULL. |
1857 // Append to the old array if it was not NULL. |
1856 for(TInt i=0;i<newIdArray->Count();++i) |
1858 for(TInt i=0;i<newIdArray->Count();++i) |
1857 { |
1859 { |
1858 if(aOrigIdArray->Find((*newIdArray)[i]) == KErrNotFound) |
1860 aOrigIdArray->AddL((*newIdArray)[i]); |
1859 { |
|
1860 //Add only when we are sure that this ID has not been added to this array before. |
|
1861 aOrigIdArray->AddL((*newIdArray)[i]); |
|
1862 } |
|
1863 } |
1861 } |
1864 CleanupStack::PopAndDestroy(newIdArray); |
1862 CleanupStack::PopAndDestroy(newIdArray); |
1865 } |
1863 } |
1866 else |
1864 else |
1867 { |
1865 { |