9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: Declares USB OTG Warning notifier. |
14 * Description: Declares USB UI connection notifier. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 #ifndef USBUINOTIFOTGWARNING_H |
19 #ifndef USBUINOTIFOTGWARNING_H |
20 #define USBUINOTIFOTGWARNING_H |
20 #define USBUINOTIFOTGWARNING_H |
21 |
21 |
22 // INCLUDES |
22 // INCLUDES |
23 |
23 #include <aknnotewrappers.h> |
24 #include <usbuinotif.h> |
24 #include <usbuinotif.h> |
25 #include <hb/hbwidgets/hbdevicemessageboxsymbian.h> |
|
26 |
25 |
27 #include "usbnotifier.h" // Base class |
26 #include "usbnotifier.h" // Base class |
|
27 #define KUsbUiNotifOtgGeneralNoteGranularity 1 |
28 // CLASS DECLARATION |
28 // CLASS DECLARATION |
29 |
29 |
30 /** |
30 /** |
31 * This class is used to show general USB note. |
31 * This class is used to show general USB note. |
32 * Synchronous call is enouph. |
32 * Synchronous call is enouph. |
33 * |
33 * |
34 */ |
34 */ |
35 NONSHARABLE_CLASS(CUsbUiNotifOtgWarning) : public CUSBUINotifierBase, |
35 NONSHARABLE_CLASS(CUsbUiNotifOtgWarning) : public CUSBUINotifierBase |
36 public MHbDeviceMessageBoxObserver |
|
37 { |
36 { |
38 public: |
37 public: |
39 // Constructors and destructor |
38 // Constructors and destructor |
40 |
39 |
41 /** |
40 /** |
45 |
44 |
46 /** |
45 /** |
47 * Destructor. |
46 * Destructor. |
48 */ |
47 */ |
49 virtual ~CUsbUiNotifOtgWarning(); |
48 virtual ~CUsbUiNotifOtgWarning(); |
50 /** |
|
51 * Call back function to observe device message box closing. |
|
52 * @param aMessageBox Pointer to the closing message box instance. |
|
53 * @param aButton Button that was pressed. |
|
54 */ |
|
55 void MessageBoxClosed(const CHbDeviceMessageBoxSymbian* aMessageBox, |
|
56 CHbDeviceMessageBoxSymbian::TButtonId aButton); |
|
57 |
49 |
58 protected: |
50 protected: |
59 |
51 |
60 /** |
52 /** |
61 * Second phase contructor |
53 * Second phase contructor |
78 * so resources can be freed and outstanding messages completed. |
70 * so resources can be freed and outstanding messages completed. |
79 */ |
71 */ |
80 void Cancel(); |
72 void Cancel(); |
81 |
73 |
82 /** |
74 /** |
|
75 * From CUSBUINotifierBase. Gets called when a request completes. |
|
76 * @param None. |
|
77 * @return None. |
|
78 */ |
|
79 void RunL(); |
|
80 |
|
81 /** |
83 * From CUSBUINotifierBase. Used in asynchronous notifier launch to |
82 * From CUSBUINotifierBase. Used in asynchronous notifier launch to |
84 * store received parameters into members variables and |
83 * store received parameters into members variables and |
85 * make needed initializations. |
84 * make needed initializations. |
86 * @param aBuffer A buffer containing received parameters |
85 * @param aBuffer A buffer containing received parameters |
87 * @param aReplySlot A reply slot. |
86 * @param aReplySlot A reply slot. |
88 * @param aMessage Should be completed when the notifier is deactivated. |
87 * @param aMessage Should be completed when the notifier is deactivated. |
89 * @return None. |
88 * @return None. |
90 */ |
89 */ |
91 void StartDialogL(const TDesC8& aBuffer, TInt aReplySlot, |
90 void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, |
92 const RMessagePtr2& aMessage); |
91 const RMessagePtr2& aMessage); |
93 |
92 |
94 private: |
93 private: |
95 |
94 |
96 /** |
95 /** |
97 * C++ default constructor. |
96 * C++ default constructor. |
98 */ |
97 */ |
99 CUsbUiNotifOtgWarning(); |
98 CUsbUiNotifOtgWarning(); |
100 |
99 |
|
100 /** |
|
101 * Publish the dialog to the cover UI |
|
102 * The cover UI may use the personality ID or the localized |
|
103 * personality name e.g. "Mass storage". |
|
104 * @param aNote The dialog to be published. |
|
105 * @param aPersonalityId The personality ID. |
|
106 * @param aLocalizedPersonalityDescriptor The personality as a string. |
|
107 */ |
|
108 void |
|
109 PublishToCoverUiL(CAknResourceNoteDialog* aNote, |
|
110 TInt aPersonalityId, |
|
111 const HBufC* aLocalizedPersonalityDescriptor); |
|
112 |
101 private: |
113 private: |
102 // data |
114 // data |
103 CDesCArrayFlat* iStringIds; |
115 RArray<TInt> iStringIds; |
104 |
116 |
105 //Own |
117 //Own |
106 CHbDeviceMessageBoxSymbian* iNote; |
118 CAknResourceNoteDialog* iNote; |
107 |
119 |
108 TInt iNoteId; |
120 TInt iNoteId; |
109 }; |
121 }; |
110 #endif // USBUINOTIFOTGWARNING_H |
122 #endif // USBUINOTIFOTGWARNING_H |
111 // End of file |
123 // End of file |