|
1 /* |
|
2 * Copyright (c) 2005-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 implementation for find operation. Can be used e.g |
|
15 * in store domain implementation to handle Find -operations |
|
16 * from stores. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef CVPBKCONTACTFINDOPERATION_H |
|
22 #define CVPBKCONTACTFINDOPERATION_H |
|
23 |
|
24 // INCLUDE FILES |
|
25 #include <CVPbkMultiContactOperationBase.h> |
|
26 #include <MVPbkContactFindObserver.h> |
|
27 |
|
28 class CVPbkContactLinkArray; |
|
29 |
|
30 /** |
|
31 * An implementation for find operation |
|
32 * |
|
33 * @lib VPbkEng.lib |
|
34 */ |
|
35 class CVPbkContactFindOperation : |
|
36 public CVPbkMultiContactOperationBase, |
|
37 public MVPbkContactFindObserver |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * @param aObserver the observer that is called after |
|
42 * all suboperations have completed or |
|
43 * there are zero suboperations. |
|
44 * @return A new instance of this class |
|
45 */ |
|
46 IMPORT_C static CVPbkContactFindOperation* NewLC( |
|
47 MVPbkContactFindObserver& aObserver ); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 ~CVPbkContactFindOperation(); |
|
53 |
|
54 private: // from CVPbkMultiContactOperationBase |
|
55 void HandleZeroSuboperations(); |
|
56 |
|
57 private: // from MVPbkContactFindObserver |
|
58 void FindCompleteL( MVPbkContactLinkArray* aResults ); |
|
59 void FindFailed( TInt aError ); |
|
60 |
|
61 private: // Implementation |
|
62 CVPbkContactFindOperation( MVPbkContactFindObserver& aObserver ); |
|
63 void ConstructL(); |
|
64 void HandleZeroSuboperationsL(); |
|
65 |
|
66 private: // Data |
|
67 ///Own: completed operation count |
|
68 TInt iCompleteCount; |
|
69 ///Own: find operation observer |
|
70 MVPbkContactFindObserver& iObserver; |
|
71 ///Own: find results |
|
72 CVPbkContactLinkArray* iResults; |
|
73 }; |
|
74 |
|
75 #endif // CVPBKCONTACTFINDOPERATION_H |
|
76 |
|
77 // End of file |