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" |
25 |
27 |
26 // FORWARD DECLARATIONS |
|
27 class CAknGlobalNote; |
|
28 class RConeResourceLoader; |
|
29 |
28 |
30 // CLASS DECLARATION |
29 // CLASS DECLARATION |
31 |
30 |
32 /** |
31 /** |
33 * Encapsulates an active object used in controlling notes. |
32 * Encapsulates an active object used in controlling notes. |
34 * |
33 * |
35 * @lib phoneclient.lib |
34 * @lib phoneclient.lib |
36 * @since 9.1 |
|
37 */ |
35 */ |
38 NONSHARABLE_CLASS( CPhCltUssdNoteController ) : public CActive |
36 NONSHARABLE_CLASS( CPhCltUssdNoteController ) : public CBase, |
|
37 public MHbDeviceProgressDialogObserver |
39 { |
38 { |
40 public: // Constructor and destructor |
39 public: // Constructor and destructor |
41 |
40 |
42 /** |
41 /** |
43 * Two-phased constructor. |
42 * Two-phased constructor. |
44 * |
43 * |
45 * @param aCallBack a callback to be notified events from note controller. |
44 * @param aCallBack a callback to be notified events from note controller. |
46 * @param aPriority active object priority. |
45 * @param aPriority active object priority. |
47 * @return Pointer to created CPhCltUssdImp instance. |
46 * @return Pointer to created CPhCltUssdImp instance. |
48 */ |
47 */ |
49 static CPhCltUssdNoteController* NewL( |
48 static CPhCltUssdNoteController* NewL( |
50 MPhCltUssdNoteControllerCallBack& aCallBack, |
49 MPhCltUssdNoteControllerCallBack& aCallBack ); |
51 TInt aPriority ); |
50 |
52 |
|
53 /** |
51 /** |
54 * Destructor. |
52 * Destructor. |
55 */ |
53 */ |
56 ~CPhCltUssdNoteController(); |
54 ~CPhCltUssdNoteController(); |
57 |
55 |
58 |
|
59 public: |
56 public: |
60 |
57 |
61 // Shows information note. |
58 /** |
62 void ShowInformationNoteL( TInt aResourceId ); |
59 * Shows global Information note. |
63 |
60 */ |
64 // Shows global information note. |
61 void ShowGlobalInformationNoteL( const TPhCltUssdInformationType aInfoType ); |
65 void ShowGlobalInformationNoteL( TInt aResourceId ); |
62 |
66 |
63 /** |
67 // Shows global confirmation note. |
64 * Shows global wait note. |
68 void ShowGlobalConfirmationNoteL( TInt aResourceId ); |
65 */ |
69 |
66 void ShowGlobalWaitNoteL(); |
70 // Shows global wait note. |
67 |
71 void ShowGlobalWaitNoteL( TInt aResourceId, TInt aSoftkeyResourceId = 0 ); |
68 /** |
72 |
69 * Destroys global wait note. |
73 // Destroys global wait note. |
70 */ |
74 void DestroyGlobalWaitNote(); |
71 void DestroyGlobalWaitNote(); |
75 |
72 |
76 private: |
73 /** |
77 |
74 * From base class MHbDeviceProgressDialogObserver |
|
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 |
78 /** |
87 /** |
79 * C++ constructor. |
88 * C++ constructor. |
80 */ |
89 */ |
81 CPhCltUssdNoteController( |
90 CPhCltUssdNoteController( |
82 MPhCltUssdNoteControllerCallBack& aCallBack, |
91 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(); |
|
108 |
92 |
109 /** |
93 /** |
110 * From CActive. |
94 * Symbian 2nd phase constructor. |
111 */ |
95 */ |
112 void DoCancel(); |
96 void ConstructL(); |
113 |
97 |
|
98 /** |
|
99 * LoadDefaultString. |
|
100 */ |
|
101 HBufC* LoadDefaultStringL( const TDesC& aText ); |
114 |
102 |
115 private: // Data |
103 private: // Data |
116 |
104 |
117 // Buffer for messages. |
105 /** |
118 HBufC* iMessageBuffer; |
106 * Own,Global wait note. |
119 |
107 */ |
120 // Global wait note. |
108 CHbDeviceProgressDialogSymbian* iGlobalWaitNote; |
121 CAknGlobalNote* iGlobalWaitNote; |
109 |
122 |
110 /** |
123 // Id of an active wait note. |
111 * Not own,callback to be notified when wait note is dismissed. |
124 TInt iWaitNoteId; |
112 */ |
125 |
|
126 // The callback to be notified when wait note is dismissed. |
|
127 MPhCltUssdNoteControllerCallBack& iCallBack; |
113 MPhCltUssdNoteControllerCallBack& iCallBack; |
128 |
114 |
129 // Resource loader. |
115 /** |
130 RConeResourceLoader* iResourceLoader; |
116 * Check Load Success .ts file successfully or not |
|
117 */ |
|
118 TBool iIsResolverSuccess; |
|
119 |
|
120 /** |
|
121 * Own, resouce of global note. |
|
122 */ |
|
123 HBufC* iGlobalResource; |
131 }; |
124 }; |
132 |
125 |
133 #endif // CPHCLTUSSDNOTECONTROLLER_H |
126 #endif // CPHCLTUSSDNOTECONTROLLER_H |
134 |
127 |
135 // End of File |
128 // End of File |