1 /* |
|
2 * Copyright (c) 2005 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: Synchronisation server alert notifier. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CSYNCMLDLGNOTIFIER_H |
|
21 #define CSYNCMLDLGNOTIFIER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <SyncMLNotifierParams.h> |
|
25 #include "SyncMLNotifierBase.h" // Base class |
|
26 #include <aknselectionlist.h> |
|
27 #include <aknlists.h> |
|
28 #include <AknIconArray.h> |
|
29 // FORWARD DECLARATIONS |
|
30 class CSyncMLAppLaunchNotifier; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Notifier for information received from synchronisation server. |
|
36 * |
|
37 * @lib SyncMLNotifier |
|
38 * @since Series 60 3.0 |
|
39 */ |
|
40 NONSHARABLE_CLASS( CSyncMLDlgNotifier ) : public CSyncMLNotifierBase |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 */ |
|
47 static CSyncMLDlgNotifier* NewL( |
|
48 CSyncMLAppLaunchNotifier* aAppLaunchNotif ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CSyncMLDlgNotifier(); |
|
54 |
|
55 protected: // New functions |
|
56 |
|
57 /** |
|
58 * Tries to enable or disable the sync progress notes. |
|
59 * @since Series 60 3.0 |
|
60 * @param aEnable Should the progress notes be enabled. |
|
61 * @return None |
|
62 */ |
|
63 void EnableSyncProgressNoteL( TBool aEnable ); |
|
64 |
|
65 private: // Functions from base classes |
|
66 |
|
67 /** |
|
68 * From CSyncMLNotifierBase Called when a notifier is first loaded. |
|
69 * @param None. |
|
70 * @return A structure containing priority and channel info. |
|
71 */ |
|
72 TNotifierInfo RegisterL(); |
|
73 |
|
74 /** |
|
75 * From CSyncMLNotifierBase Used in asynchronous notifier launch to |
|
76 * store received parameters into members variables and |
|
77 * make needed initializations. |
|
78 * @param aBuffer A buffer containing received parameters |
|
79 * @param aReturnVal The return value to be passed back. |
|
80 * @param aMessage Should be completed when the notifier is deactivated. |
|
81 * @return None. |
|
82 */ |
|
83 void GetParamsL( const TDesC8& aBuffer, |
|
84 TInt aReplySlot, |
|
85 const RMessagePtr2& aMessage ); |
|
86 |
|
87 /** |
|
88 * From CSyncMLNotifierBase The notifier has been deactivated |
|
89 * so resources can be freed and outstanding messages completed. |
|
90 * @param None. |
|
91 * @return None. |
|
92 */ |
|
93 void Cancel(); |
|
94 |
|
95 /** |
|
96 * From CSyncMLNotifierBase Gets called when a request completes. |
|
97 * @param None. |
|
98 * @return None. |
|
99 */ |
|
100 void RunL(); |
|
101 |
|
102 private: |
|
103 |
|
104 /** |
|
105 * C++ default constructor. |
|
106 */ |
|
107 CSyncMLDlgNotifier( CSyncMLAppLaunchNotifier* aAppLaunchNotif ); |
|
108 /** |
|
109 * Action for the Alphanumeric input. |
|
110 * @param result. |
|
111 * @return None. |
|
112 */ |
|
113 void InputTypeAlphaNumericL(TInt & result); |
|
114 /** |
|
115 * Action for the Numeric input. |
|
116 * @param result. |
|
117 * @return None. |
|
118 */ |
|
119 void InputTypeNumericL(TInt & result); |
|
120 /** |
|
121 * Action for the Date input. |
|
122 * @param result. |
|
123 * @return None. |
|
124 */ |
|
125 void InputTypeDateL(TInt & result); |
|
126 /** |
|
127 * Action for the Time input. |
|
128 * @param result. |
|
129 * @return None. |
|
130 */ |
|
131 void InputTypeTimeL(TInt & result); |
|
132 /** |
|
133 * Action for the Phone number input. |
|
134 * @param result. |
|
135 * @return None. |
|
136 */ |
|
137 void InputTypePhoneNumberL(TInt & result); |
|
138 |
|
139 /** |
|
140 * Set icons on markable list |
|
141 * @param aListBox, pointer to listbox. |
|
142 * @return None. |
|
143 */ |
|
144 void SetIconsL(CEikFormattedCellListBox* aListBox); |
|
145 |
|
146 private: // Data |
|
147 // The type of the note requested. |
|
148 TSyncMLDlgNoteTypes iNoteType; |
|
149 |
|
150 // Server message from the parameters |
|
151 TBuf<KSyncMLMaxServerMsgLength> iServerMsg; |
|
152 |
|
153 // Maximum time the query is shown. (In seconds) |
|
154 TInt iMaxTime; |
|
155 //Maximum length of the server message |
|
156 TInt iMaxlen; |
|
157 //Default response of the alert |
|
158 TBuf<KSyncMLMaxDefaultResponseMsgLength> iDR; |
|
159 //Input type of user input alert |
|
160 TInt iIT; |
|
161 //Echo type of user input alert |
|
162 TInt iET; |
|
163 //Number of choice items in user choice alerts |
|
164 TInt iNumberOfItems; |
|
165 // Pointer to the application launcher notifier instance. |
|
166 CSyncMLAppLaunchNotifier* iAppLaunchNotif; |
|
167 //array of user choice alert items |
|
168 CDesCArrayFlat* iListItems; |
|
169 //Default selection item in user choice alerts |
|
170 TInt iDefindex; |
|
171 //reply buffer |
|
172 TSyncMLDlgNotifReturnParams reply; |
|
173 //Member variable to identify end key press |
|
174 TBool EndKeyPress; |
|
175 //Chunk to retrieve the user choice alert items |
|
176 RChunk iChunk; |
|
177 }; |
|
178 |
|
179 |
|
180 #endif // CSYNCMLDLGNOTIFIER_H |
|
181 |
|
182 // End of File |
|