|
1 /* |
|
2 * Copyright (c) 2006 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: Base class for contact link fetchers. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHCNTCONTACTLINKARRAYFETCH_H |
|
20 #define CPHCNTCONTACTLINKARRAYFETCH_H |
|
21 |
|
22 #include <MVPbkContactFindObserver.h> |
|
23 |
|
24 #include "cphcntasynctosync.h" |
|
25 |
|
26 class MVPbkContactLinkArray; |
|
27 |
|
28 /** |
|
29 * Base class for contact link fetchers. |
|
30 * |
|
31 * @lib PhoneCntFinder |
|
32 * @since S60 v3.1 |
|
33 */ |
|
34 NONSHARABLE_CLASS( CPhCntContactLinkArrayFetch ) : |
|
35 public CPhCntAsyncToSync, |
|
36 public MVPbkContactFindObserver |
|
37 { |
|
38 |
|
39 public: |
|
40 |
|
41 // from base class MVPbkContactFindObserver |
|
42 |
|
43 /** |
|
44 * From base class MVPbkContactFindObserver |
|
45 * Called when find is complete. Callee takes ownership of the results. |
|
46 * In case of an error during find, the aResults may contain only |
|
47 * partial results of the find. |
|
48 * |
|
49 * @since S60 v3.1 |
|
50 * @param aResults Array of contact links that matched the find. |
|
51 * Callee must take ownership of this object in |
|
52 * the end of the function, ie. in case the function |
|
53 * does not leave. |
|
54 */ |
|
55 void FindCompleteL( MVPbkContactLinkArray* aResults ); |
|
56 |
|
57 /** |
|
58 * From base class MVPbkContactFindObserver |
|
59 * |
|
60 * @since S60 v3.1 |
|
61 * Called in case the find fails for some reason. |
|
62 * |
|
63 * @param aError One of the system wide error codes. |
|
64 */ |
|
65 void FindFailed( TInt aError ); |
|
66 |
|
67 protected: |
|
68 |
|
69 virtual ~CPhCntContactLinkArrayFetch(); |
|
70 |
|
71 void BaseConstructL(); |
|
72 |
|
73 CPhCntContactLinkArrayFetch(); |
|
74 |
|
75 protected: // data |
|
76 |
|
77 /** |
|
78 * Fetched contact links |
|
79 * Own, but derived class can destroy this if after deletion |
|
80 * iFetchedContactLinks pointer is set to NULL. |
|
81 */ |
|
82 MVPbkContactLinkArray* iFetchedContactLinks; |
|
83 |
|
84 }; |
|
85 |
|
86 #endif // CPHCNTCONTACTLINKARRAYFETCH_H |