|
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: Contact match strategy interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MPHCNTCONTACTSTORES_H |
|
19 #define MPHCNTCONTACTSTORES_H |
|
20 |
|
21 class MVPbkContactLink; |
|
22 class MPhCntContactFetchObserver; |
|
23 class CVPbkContactLinkArray; |
|
24 class CVPbkPhoneNumberMatchStrategy; |
|
25 class MVPbkContactFindObserver; |
|
26 |
|
27 /** |
|
28 * Contact stores interface. |
|
29 * |
|
30 * @lib PhoneCntFinder.lib |
|
31 * @since S60 v3.1 |
|
32 */ |
|
33 NONSHARABLE_CLASS( MPhCntContactStores ) |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Destructor. |
|
40 * |
|
41 * @since v3.1 |
|
42 */ |
|
43 virtual ~MPhCntContactStores() {}; |
|
44 |
|
45 /** |
|
46 * Determines if request is pending. |
|
47 * @since S60 v3.2 |
|
48 */ |
|
49 virtual TBool IsRequestActive() const = 0; |
|
50 |
|
51 /** |
|
52 * Cancels outstanding request if any. |
|
53 */ |
|
54 virtual void CancelRequest() = 0; |
|
55 |
|
56 /** |
|
57 * Fetches contact, which is pointed by contact link from |
|
58 * currently open contact stores. Observer is notified |
|
59 * after the contact has been fetched or fetch was not |
|
60 * successfull. Note that new fetch should not be |
|
61 * started before the existing fetch has completed. |
|
62 * |
|
63 * @since S60 v3.1 |
|
64 * @param aLink Link to the contact. |
|
65 * @param aObserver Observer of the fetch. |
|
66 */ |
|
67 |
|
68 virtual void FetchContactL( const MVPbkContactLink& aLink, |
|
69 MPhCntContactFetchObserver& aObserver ) = 0; |
|
70 |
|
71 /** |
|
72 * Creates contact link array from descriptor, which |
|
73 * defines contact links. |
|
74 * |
|
75 * @since S60 v3.1 |
|
76 * @param aContactLinks Contact links in descriptor. |
|
77 * @return Array of contactlinks, ownership given. |
|
78 */ |
|
79 virtual CVPbkContactLinkArray* CreateContactLinkArrayL( |
|
80 const TDesC8& aContactLinks ) = 0; |
|
81 |
|
82 /** |
|
83 * Fetches first contact in contact links, which are defined |
|
84 * by aContactLinks. Observer is notified |
|
85 * after the contact has been fetched or fetch was not |
|
86 * successfull. Note that new fetch should not be |
|
87 * started before the existing fetch has completed. |
|
88 * |
|
89 * @since S60 v3.1 |
|
90 * @param aContactLinks Links to a contacts. |
|
91 * @param aObserver Observer of the fetch. |
|
92 */ |
|
93 virtual void FetchFirstContactL( const TDesC8& aContactLinks, |
|
94 MPhCntContactFetchObserver& aObserver ) = 0; |
|
95 |
|
96 }; |
|
97 |
|
98 #endif |