|
1 /* |
|
2 * Copyright (c) 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: CLS list item class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef FREESTYLEEMAILUICLSITEM_H |
|
20 #define FREESTYLEEMAILUICLSITEM_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <cntdef.h> |
|
25 #include "FSEmailBuildFlags.h" |
|
26 |
|
27 #include <CPcsDefs.h> // TPsMatchLocation |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 class MVPbkContactLink; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 /** |
|
35 * Freestyle email application cls list item |
|
36 * |
|
37 * |
|
38 */ |
|
39 |
|
40 class CFSEmailUiClsItem : public CBase |
|
41 { |
|
42 |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 * Creates a new instance of class |
|
48 * |
|
49 * @returns CFSEmailUiClsItem instance |
|
50 */ |
|
51 static CFSEmailUiClsItem* NewL(); |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. |
|
55 * Creates a new instance of class |
|
56 * |
|
57 * @returns CFSEmailUiClsItem instance |
|
58 */ |
|
59 static CFSEmailUiClsItem* NewLC(); |
|
60 |
|
61 /** |
|
62 * Destructor. |
|
63 */ |
|
64 virtual ~CFSEmailUiClsItem(); |
|
65 |
|
66 /** |
|
67 * Creates a copy of the CLS item and leaves it in cleanup stack. |
|
68 */ |
|
69 CFSEmailUiClsItem* CloneLC() const; |
|
70 |
|
71 /** |
|
72 * Finds actual match place from the cls item and sets the highlight |
|
73 * information to cls item. |
|
74 * |
|
75 * @param aHighlights Match list for the item text |
|
76 * |
|
77 */ |
|
78 void SetHighlights( const RArray<TPsMatchLocation>& aHighlights ); |
|
79 void SetDisplayNameL( const TDesC& aDisplayName ); |
|
80 void SetEmailAddressL( const TDesC& aEmailAddress ); |
|
81 void SetIsMruItem( TBool aIsMruItem ); |
|
82 void SetContactLinkL( const MVPbkContactLink& aLink ); |
|
83 void SetMultipleEmails( TBool ETrue ); |
|
84 |
|
85 // getters |
|
86 |
|
87 const RArray<TPsMatchLocation>& Highlights() const; |
|
88 |
|
89 const TDesC& DisplayName() const; |
|
90 const TDesC& EmailAddress() const; |
|
91 const TDesC& FullTextL(); |
|
92 TBool IsMruItem() const; |
|
93 TBool MultipleEmails() const; |
|
94 |
|
95 MVPbkContactLink* ContactLink() const; |
|
96 |
|
97 protected: |
|
98 |
|
99 /** |
|
100 * C++ default constructor. |
|
101 * |
|
102 */ |
|
103 CFSEmailUiClsItem(); |
|
104 |
|
105 private: |
|
106 |
|
107 /** |
|
108 * ConstructL |
|
109 * |
|
110 */ |
|
111 void ConstructL(); |
|
112 |
|
113 |
|
114 private: // data |
|
115 |
|
116 // Highlight positions |
|
117 RArray<TPsMatchLocation> iHighlights; |
|
118 |
|
119 // Display name |
|
120 HBufC* iDisplayName; |
|
121 // Email address |
|
122 HBufC* iEMailAddress; |
|
123 |
|
124 HBufC* iFullText; |
|
125 |
|
126 TBool iIsMruItem; |
|
127 |
|
128 TBool iMultipleEmails; |
|
129 |
|
130 // Contact item id in which this item refers to. MRU list items |
|
131 // do not have this set. |
|
132 MVPbkContactLink* iLink; |
|
133 }; |
|
134 |
|
135 #endif // FREESTYLEEMAILUICLSITEM_H |
|
136 |
|
137 // End of File |