|
1 /* |
|
2 * Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: An class for handling different type of copying logic |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <CVPbkContactCopier.h> |
|
20 |
|
21 #include "CVPbkCopyContactsOperation.h" |
|
22 |
|
23 |
|
24 // --------------------------------------------------------------------------- |
|
25 // CVPbkContactCopier::CVPbkContactCopier |
|
26 // --------------------------------------------------------------------------- |
|
27 // |
|
28 CVPbkContactCopier::CVPbkContactCopier( CVPbkContactManager& aContactManager ) |
|
29 : iContactManager( aContactManager ) |
|
30 { |
|
31 } |
|
32 |
|
33 // --------------------------------------------------------------------------- |
|
34 // CVPbkContactCopier::NewL |
|
35 // --------------------------------------------------------------------------- |
|
36 // |
|
37 EXPORT_C CVPbkContactCopier* CVPbkContactCopier::NewL( |
|
38 CVPbkContactManager& aContactManager ) |
|
39 { |
|
40 return new( ELeave ) CVPbkContactCopier( aContactManager ); |
|
41 } |
|
42 |
|
43 // --------------------------------------------------------------------------- |
|
44 // CVPbkContactCopier::~CVPbkContactCopier |
|
45 // --------------------------------------------------------------------------- |
|
46 // |
|
47 CVPbkContactCopier::~CVPbkContactCopier() |
|
48 { |
|
49 } |
|
50 |
|
51 // --------------------------------------------------------------------------- |
|
52 // CVPbkContactCopier::CopyContactsL |
|
53 // --------------------------------------------------------------------------- |
|
54 // |
|
55 EXPORT_C MVPbkContactOperationBase* CVPbkContactCopier::CopyContactsL( |
|
56 TUint32 aContactCopyFlags, |
|
57 const MVPbkContactLinkArray& aSourceContactLinks, |
|
58 MVPbkContactStore* aTargetStore, |
|
59 CVPbkContactLinkArray& aCopiedContactLinks, |
|
60 MVPbkBatchOperationObserver& aObserver ) |
|
61 { |
|
62 MVPbkContactOperation* operation = CVPbkCopyContactsOperation::NewLC( |
|
63 aContactCopyFlags, iContactManager, aSourceContactLinks, |
|
64 aTargetStore, &aCopiedContactLinks, aObserver ); |
|
65 operation->StartL(); |
|
66 CleanupStack::Pop(); // operation |
|
67 return operation; |
|
68 } |
|
69 |