|
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: Mail Viewer reply to address matcher. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_CMSGMAILVIEWERREPLYTOMATCHER_H |
|
19 #define C_CMSGMAILVIEWERREPLYTOMATCHER_H |
|
20 |
|
21 #include <e32base.h> // CBase |
|
22 #include <MsgRecipientItem.h> |
|
23 |
|
24 class CMsgMailViewerContactMatcher; |
|
25 class CMsgMailViewerAppUi; |
|
26 |
|
27 |
|
28 /** |
|
29 * Mail Viewer reply to address matcher. |
|
30 * Finds matches for sender's email address |
|
31 * from phonebook. Uses CMsgMailViewerContactMatcher. |
|
32 * |
|
33 * @lib none |
|
34 * @since S60 v3.2 |
|
35 */ |
|
36 NONSHARABLE_CLASS(CMsgMailViewerReplyToMatcher) |
|
37 : public CBase |
|
38 { |
|
39 |
|
40 public: |
|
41 /** |
|
42 * NewL |
|
43 * @since S60 v3.2 |
|
44 * @param aAppUi reference to application appui. |
|
45 * Needed for notifying that matching is done. |
|
46 * @param aMatcher reference to CMsgMailViewerContactMatcher. |
|
47 * @return self |
|
48 */ |
|
49 static CMsgMailViewerReplyToMatcher* NewL(CMsgMailViewerAppUi& aAppUi, |
|
50 CMsgMailViewerContactMatcher& aMatcher); |
|
51 |
|
52 |
|
53 ~CMsgMailViewerReplyToMatcher(); |
|
54 |
|
55 /** |
|
56 * CheckMatchesL |
|
57 * @since S60 v3.2 |
|
58 * @param aMtmUid Uid of mtm that needs this information. |
|
59 * @param aRecs recipient array that has address which is |
|
60 * searched/matched from phonebook. |
|
61 * Leaves with KErrNotFound if array is empty. |
|
62 */ |
|
63 void CheckMatchesL(TUid aMtmUid, CMsgRecipientArray* aRecs); |
|
64 |
|
65 private: // implementation |
|
66 |
|
67 CMsgMailViewerReplyToMatcher(CMsgMailViewerAppUi& aAppUi, |
|
68 CMsgMailViewerContactMatcher& aMatcher); |
|
69 void ConstructL(); |
|
70 |
|
71 |
|
72 static TInt AddressMatchCallbackL(TAny* aAny); |
|
73 void NotifyMatchingReadyL(); |
|
74 |
|
75 |
|
76 private: // data |
|
77 |
|
78 //reference |
|
79 CMsgMailViewerContactMatcher& iContactMacther; |
|
80 |
|
81 TUid iSendingMtmUid; |
|
82 |
|
83 //reference |
|
84 CMsgMailViewerAppUi& iAppUi; |
|
85 |
|
86 HBufC* iName; |
|
87 HBufC* iData; |
|
88 |
|
89 }; |
|
90 |
|
91 #endif // C_CMSGMAILVIEWERREPLYTOMATCHER_H |