|
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: Virtual Phonebook observer API for finding contacts from |
|
15 * the stores. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef MVPBKCONTACTFINDFROMSTORESOBSERVER_H |
|
21 #define MVPBKCONTACTFINDFROMSTORESOBSERVER_H |
|
22 |
|
23 |
|
24 #include <e32def.h> |
|
25 // included here, instead of forward declared, so that clients |
|
26 // dont delete an incomplete class. |
|
27 #include <mvpbkcontactlinkarray.h> |
|
28 |
|
29 class MVPbkContactStore; |
|
30 |
|
31 /** |
|
32 * An observer interface for finding contacts from the stores. |
|
33 * This interface is used to signal find clients of the |
|
34 * operations progress. |
|
35 */ |
|
36 class MVPbkContactFindFromStoresObserver |
|
37 { |
|
38 public: // Interface |
|
39 /** |
|
40 * This is called when one store completes its find. If this |
|
41 * leaves then FindFromStoreFailed is called. Client takes |
|
42 * the ownership of all results immediately! |
|
43 * |
|
44 * FindFromStoresOperationComplete is called after |
|
45 * all stores have called either this or FindFromStoreFailed. |
|
46 * |
|
47 * @param aStore The store whose find results are available |
|
48 * @param aResultsFromStore The find results from the store. |
|
49 * Client takes the ownership immediately! |
|
50 */ |
|
51 virtual void FindFromStoreSucceededL( MVPbkContactStore& aStore, |
|
52 MVPbkContactLinkArray* aResultsFromStore ) = 0; |
|
53 |
|
54 /** |
|
55 * Called when a find operation of one store fails. Doesn't stop |
|
56 * the find from other stores in the case there are multiple stores. |
|
57 * |
|
58 * @param aStore The failed store. |
|
59 * @param aError A system wide error code from the |
|
60 * store implementation. |
|
61 */ |
|
62 virtual void FindFromStoreFailed( |
|
63 MVPbkContactStore& aStore, TInt aError ) = 0; |
|
64 |
|
65 /** |
|
66 * This is called after all stores have called either |
|
67 * FindFromStoreSucceed or FindFromStoreFailed. It's called |
|
68 * also when there are no stores that offer find operation. |
|
69 */ |
|
70 virtual void FindFromStoresOperationComplete() = 0; |
|
71 |
|
72 /** |
|
73 * Returns an extension point for this interface or NULL. |
|
74 * @param aExtensionUid Uid of extension. |
|
75 * @return Extension point or NULL. |
|
76 */ |
|
77 virtual TAny* ContactFindFromStoresObserverExtension( |
|
78 TUid /*aExtensionUid*/) { return NULL; } |
|
79 |
|
80 protected: |
|
81 /** |
|
82 * Destructor. |
|
83 */ |
|
84 virtual ~MVPbkContactFindFromStoresObserver() {} |
|
85 |
|
86 }; |
|
87 |
|
88 #endif // MVPBKCONTACTFINDFROMSTORESOBSERVER_H |
|
89 |
|
90 // End of File |