1 /* |
|
2 * Copyright (c) 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: Synchronisation server alert notifier. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CSYNCMLAKNPOPUPLIST_H |
|
19 #define CSYNCMLAKNPOPUPLIST_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <aknPopup.h> // CAknPopupList |
|
23 #include <aknlists.h> |
|
24 #include <SyncMLNotifierParams.h> |
|
25 #include "SyncMLQueryTimer.h" |
|
26 #include "syncmlmmcwatcher.h" |
|
27 #include "SyncMLNotifDebug.h" |
|
28 // CONSTANTS |
|
29 const TInt KSyncMLNNoListTimeout = 0; // The query does not time out |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * List query with timeout. |
|
35 * |
|
36 * @lib SyncMLNotifier |
|
37 * @since Series 60 5.2 |
|
38 */ |
|
39 NONSHARABLE_CLASS ( CSyncMLAknPopUpList ) : public CAknPopupList, |
|
40 public MSyncMLQueryTimerObserver, |
|
41 public MSyncMLQueryMmcObserver |
|
42 { |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 */ |
|
48 static CSyncMLAknPopUpList* NewL(CAknSingleHeadingPopupMenuStyleListBox* listBox, |
|
49 TInt aResId,AknPopupLayouts::TAknPopupLayouts aPopuplayout, |
|
50 TInt aTimeout = KSyncMLNNoListTimeout); |
|
51 |
|
52 /** |
|
53 * Constructor. |
|
54 */ |
|
55 CSyncMLAknPopUpList(TInt aTimeout = KSyncMLNNoListTimeout); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CSyncMLAknPopUpList(); |
|
61 |
|
62 /** |
|
63 * From CEikDialog. |
|
64 * |
|
65 * Loads, displays, and destroys the dialog. |
|
66 */ |
|
67 TBool ExecuteLD(); |
|
68 |
|
69 public: // Functions from base classes |
|
70 |
|
71 /** |
|
72 * From MSyncMLQueryTimerObserver Is called when the timer |
|
73 * runs out. |
|
74 * @since Series 60 3.0 |
|
75 * @param None |
|
76 * @return None |
|
77 */ |
|
78 void TimerExpired(); |
|
79 |
|
80 /** |
|
81 * From MSyncMLQueryMmcObserver is called when mmc removed |
|
82 * @since Series 60 5.2 |
|
83 * @param None |
|
84 * @return None |
|
85 */ |
|
86 void MmcRemoved(); |
|
87 |
|
88 /** |
|
89 * returns the status of mmc removal |
|
90 * @since Series 60 5.2 |
|
91 * @param None |
|
92 * @return ETrue/EFalse |
|
93 */ |
|
94 TBool IsMmcRemoved(); |
|
95 |
|
96 protected: |
|
97 /** |
|
98 * Constructs a pop up list box |
|
99 * @since Series 60 5.2 |
|
100 * @param aListBox, reference to CAknSingleHeadingPopupMenuStyleListBox |
|
101 * @param aCbaResource, resource id of CBA |
|
102 * @param aType, popup layout of the list |
|
103 * @return None |
|
104 */ |
|
105 void ConstructL(CAknSingleHeadingPopupMenuStyleListBox* aListBox, |
|
106 TInt aCbaResource, |
|
107 AknPopupLayouts::TAknPopupLayouts aType ); |
|
108 |
|
109 private: |
|
110 // Number of seconds before the query is timed out. 0 = no timeout. |
|
111 TInt iTimeout; |
|
112 |
|
113 //Current state of MMC removal |
|
114 TBool immcremoved; |
|
115 |
|
116 // Pointer to the timer instance |
|
117 CSyncMLQueryTimer* iTimer; |
|
118 |
|
119 //Pointer to MMC watcher |
|
120 CSyncmlmmcwatcher* iMmcwatcher; |
|
121 }; |
|
122 |
|
123 #endif // CSYNCMLTIMEDMESSAGEQUERY_H |
|
124 |
|
125 // End of File |
|