19 #ifndef CPHCLTUSSDNOTECONTROLLER_H |
19 #ifndef CPHCLTUSSDNOTECONTROLLER_H |
20 #define CPHCLTUSSDNOTECONTROLLER_H |
20 #define CPHCLTUSSDNOTECONTROLLER_H |
21 |
21 |
22 // INCLUDES |
22 // INCLUDES |
23 #include <e32base.h> |
23 #include <e32base.h> |
24 #include <hbdeviceprogressdialogsymbian.h> |
24 #include "MPhCltUssdNoteControllerCallBack.h" |
25 #include "mphcltussdnotecontrollercallback.h" |
|
26 #include "cphcltussdcommonconstant.h" |
|
27 |
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CAknGlobalNote; |
|
28 class RConeResourceLoader; |
28 |
29 |
29 // CLASS DECLARATION |
30 // CLASS DECLARATION |
30 |
31 |
31 /** |
32 /** |
32 * Encapsulates an active object used in controlling notes. |
33 * Encapsulates an active object used in controlling notes. |
33 * |
34 * |
34 * @lib phoneclient.lib |
35 * @lib phoneclient.lib |
|
36 * @since 9.1 |
35 */ |
37 */ |
36 NONSHARABLE_CLASS( CPhCltUssdNoteController ) : public CBase, |
38 NONSHARABLE_CLASS( CPhCltUssdNoteController ) : public CActive |
37 public MHbDeviceProgressDialogObserver |
|
38 { |
39 { |
39 public: // Constructor and destructor |
40 public: // Constructor and destructor |
40 |
41 |
41 /** |
42 /** |
42 * Two-phased constructor. |
43 * Two-phased constructor. |
43 * |
44 * |
44 * @param aCallBack a callback to be notified events from note controller. |
45 * @param aCallBack a callback to be notified events from note controller. |
45 * @param aPriority active object priority. |
46 * @param aPriority active object priority. |
46 * @return Pointer to created CPhCltUssdImp instance. |
47 * @return Pointer to created CPhCltUssdImp instance. |
47 */ |
48 */ |
48 static CPhCltUssdNoteController* NewL( |
49 static CPhCltUssdNoteController* NewL( |
49 MPhCltUssdNoteControllerCallBack& aCallBack ); |
50 MPhCltUssdNoteControllerCallBack& aCallBack, |
50 |
51 TInt aPriority ); |
|
52 |
51 /** |
53 /** |
52 * Destructor. |
54 * Destructor. |
53 */ |
55 */ |
54 ~CPhCltUssdNoteController(); |
56 ~CPhCltUssdNoteController(); |
55 |
57 |
|
58 |
56 public: |
59 public: |
57 |
60 |
58 /** |
61 // Shows information note. |
59 * Shows global Information note. |
62 void ShowInformationNoteL( TInt aResourceId ); |
60 */ |
63 |
61 void ShowGlobalInformationNoteL( const TPhCltUssdInformationType aInfoType ); |
64 // Shows global information note. |
62 |
65 void ShowGlobalInformationNoteL( TInt aResourceId ); |
63 /** |
66 |
64 * Shows global wait note. |
67 // Shows global confirmation note. |
65 */ |
68 void ShowGlobalConfirmationNoteL( TInt aResourceId ); |
66 void ShowGlobalWaitNoteL(); |
69 |
67 |
70 // Shows global wait note. |
68 /** |
71 void ShowGlobalWaitNoteL( TInt aResourceId, TInt aSoftkeyResourceId = 0 ); |
69 * Destroys global wait note. |
72 |
70 */ |
73 // Destroys global wait note. |
71 void DestroyGlobalWaitNote(); |
74 void DestroyGlobalWaitNote(); |
72 |
75 |
73 /** |
76 private: |
74 * From base class MHbDeviceProgressDialogObserver |
77 |
75 */ |
|
76 void ProgressDialogCancelled( |
|
77 const CHbDeviceProgressDialogSymbian* aProgressDialog); |
|
78 |
|
79 /** |
|
80 * From base class MHbDeviceProgressDialogObserver |
|
81 */ |
|
82 void ProgressDialogClosed( |
|
83 const CHbDeviceProgressDialogSymbian* aProgressDialog); |
|
84 |
|
85 private: |
|
86 |
|
87 /** |
78 /** |
88 * C++ constructor. |
79 * C++ constructor. |
89 */ |
80 */ |
90 CPhCltUssdNoteController( |
81 CPhCltUssdNoteController( |
91 MPhCltUssdNoteControllerCallBack& aCallBack ); |
82 MPhCltUssdNoteControllerCallBack& aCallBack, |
|
83 TInt aPriority ); |
|
84 |
|
85 // Symbian 2nd phase constructor. |
|
86 void ConstructL(); |
|
87 |
|
88 // The note type enumeration, used inside the class. |
|
89 enum TPhCltUssdNoteType |
|
90 { |
|
91 EPhCltUssdInformationNote, |
|
92 EPhCltUssdGlobalInformationNote, |
|
93 EPhCltUssdGlobalConfirmationNote |
|
94 }; |
|
95 |
|
96 // Shows the note of given type. |
|
97 void ShowNoteL( TPhCltUssdNoteType aType, TInt aResourceId ); |
|
98 |
|
99 // Loads the resource file. |
|
100 void LoadResourceFileL(); |
|
101 |
|
102 // From base classes |
|
103 |
|
104 /* |
|
105 * From CActive. Called when dialog is dismissed by soft key. |
|
106 */ |
|
107 void RunL(); |
92 |
108 |
93 /** |
109 /** |
94 * Symbian 2nd phase constructor. |
110 * From CActive. |
95 */ |
111 */ |
96 void ConstructL(); |
112 void DoCancel(); |
|
113 |
97 |
114 |
98 private: // Data |
115 private: // Data |
99 |
116 |
100 /** |
117 // Buffer for messages. |
101 * Own,Global wait note. |
118 HBufC* iMessageBuffer; |
102 */ |
119 |
103 CHbDeviceProgressDialogSymbian* iGlobalWaitNote; |
120 // Global wait note. |
104 |
121 CAknGlobalNote* iGlobalWaitNote; |
105 /** |
122 |
106 * Not own,callback to be notified when wait note is dismissed. |
123 // Id of an active wait note. |
107 */ |
124 TInt iWaitNoteId; |
|
125 |
|
126 // The callback to be notified when wait note is dismissed. |
108 MPhCltUssdNoteControllerCallBack& iCallBack; |
127 MPhCltUssdNoteControllerCallBack& iCallBack; |
109 |
128 |
|
129 // Resource loader. |
|
130 RConeResourceLoader* iResourceLoader; |
110 }; |
131 }; |
111 |
132 |
112 #endif // CPHCLTUSSDNOTECONTROLLER_H |
133 #endif // CPHCLTUSSDNOTECONTROLLER_H |
113 |
134 |
114 // End of File |
135 // End of File |