1 /* |
|
2 * Copyright (c) 2007-2009 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: Definition for mrui list queries |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRLISTQUERY_H |
|
20 #define CESMRLISTQUERY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 //<cmail> |
|
25 #include "esmrdef.h" |
|
26 //</cmail> |
|
27 |
|
28 // FORWARD DECLARATIONS: |
|
29 class CDesC16ArrayFlat; |
|
30 class CAknPopupList; |
|
31 class CESMRAlarm; |
|
32 class CESMRRecurrence; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 class CEikonEnv; |
|
36 /** |
|
37 * CESMRListQuery encapsulates edit before send pop-up list |
|
38 * query for ES MR Utils usage. |
|
39 * |
|
40 * Usage: |
|
41 * |
|
42 * TESMRResponseType resp = (TESMRResponseType) |
|
43 * CESMRListQuery::ExecuteEditBeforeSendL(EESMRAttendeeStatusTentative); |
|
44 * |
|
45 * @lib esmrgui.lib |
|
46 */ |
|
47 NONSHARABLE_CLASS( CESMRListQuery ) : public CBase |
|
48 { |
|
49 public: |
|
50 enum TESMRListQueryType |
|
51 { |
|
52 EESMREditBeforeSendQuery = 0, |
|
53 EESMRSendUpdateToAllQuery, |
|
54 EESMRRecurrenceQuery, |
|
55 EESMRRelativeAlarmTimeQuery, |
|
56 EESMROpenThisOccurenceOrSeriesQuery, |
|
57 EESMRPriorityPopup, |
|
58 EESMRTodoPriorityPopup, |
|
59 EESMRSynchronizationPopup, |
|
60 EESMRDeleteThisOccurenceOrSeriesQuery, |
|
61 EESMREditBeforeSendQueryWithSendOptionsOnly |
|
62 }; |
|
63 |
|
64 public: |
|
65 /** |
|
66 * Two-phased constructor. |
|
67 */ |
|
68 IMPORT_C static CESMRListQuery* NewL(TESMRListQueryType aType); |
|
69 |
|
70 /** |
|
71 * Destructor. |
|
72 */ |
|
73 ~CESMRListQuery(); |
|
74 |
|
75 private: // Constructors |
|
76 |
|
77 CESMRListQuery( TESMRListQueryType aType ); |
|
78 void ConstructL(); |
|
79 |
|
80 public: // Implementation |
|
81 |
|
82 /** |
|
83 * Sets the attendee response status to Edit before send query's |
|
84 * title. |
|
85 * @param aStatus Response status |
|
86 */ |
|
87 void SetAttendeeStatus(TESMRAttendeeStatus aStatus); |
|
88 |
|
89 |
|
90 /** |
|
91 * Executes the dialog and destroys itself. |
|
92 * @return TESMRResponseType, or KErrCancel if dialog has |
|
93 * been cancelled. |
|
94 */ |
|
95 IMPORT_C TInt ExecuteLD(); |
|
96 |
|
97 /** |
|
98 * Static version of ExecuteLD for edit before send dialog |
|
99 * @param aStatus attendee status. |
|
100 * @return TESMRResponseType, or KErrCancel if dialog has |
|
101 * been cancelled. |
|
102 */ |
|
103 IMPORT_C static TInt ExecuteEditBeforeSendL( |
|
104 TESMRAttendeeStatus aStatus); |
|
105 |
|
106 /** |
|
107 * Static version of ExecuteLD for edit before send dialog |
|
108 * @param aStatus attendee status. |
|
109 * @return TESMRResponseType, or KErrCancel if dialog has |
|
110 * been cancelled. |
|
111 */ |
|
112 IMPORT_C static TInt ExecuteEditBeforeSendWithSendOptOnlyL( |
|
113 TESMRAttendeeStatus aStatus ); |
|
114 |
|
115 /** |
|
116 * Static version of ExecuteLD for other list querys |
|
117 * @param aStatus attendee status. |
|
118 * @return |
|
119 * TESMRSendUpdateQueryResponeStatus if the type is EESMRSendUpdateAll |
|
120 * TESMRGUIAlarmValue if the type is EESMRRelativeAlarmTime |
|
121 * TESMRGUIRecurrenceValue if the type is EESMRRecurrence |
|
122 * TESMRThisOccurenceOrSeriesQuery if the type is |
|
123 * EESMRThisOccurenceOrSeriesQuery |
|
124 * or KErrCancel if dialog has |
|
125 * been cancelled. |
|
126 */ |
|
127 IMPORT_C static TInt ExecuteL( |
|
128 TESMRListQueryType aType); |
|
129 |
|
130 private: // Implementation: |
|
131 |
|
132 void SetListQueryTextsL( |
|
133 CDesC16ArrayFlat* aItemArray, |
|
134 CAknPopupList* aPopupList); |
|
135 TInt MapSelectedIndexToReturnValue(TInt aIndex); |
|
136 void LoadTextsFromResourceL(); |
|
137 |
|
138 private: // Data |
|
139 /// Own: Attendee status |
|
140 TESMRAttendeeStatus iStatus; |
|
141 /// Own: Resource offset; |
|
142 TInt iResourceOffset; |
|
143 /// Own: List query type |
|
144 TESMRListQueryType iType; |
|
145 /// Own: Array for Alarm items |
|
146 RPointerArray< CESMRAlarm > iAlarmArray; |
|
147 /// Own: Array for Recurrence items |
|
148 RPointerArray< CESMRRecurrence > iRecurrenceArray; |
|
149 /// Ref: |
|
150 CEikonEnv* iEnv; |
|
151 }; |
|
152 |
|
153 #endif // CESMRLISTQUERY_H |
|
154 |
|
155 // End of File |
|