18 #ifndef USBUINCABLECONNECTEDNOTIFIER_H |
18 #ifndef USBUINCABLECONNECTEDNOTIFIER_H |
19 #define USBUINCABLECONNECTEDNOTIFIER_H |
19 #define USBUINCABLECONNECTEDNOTIFIER_H |
20 |
20 |
21 // INCLUDES |
21 // INCLUDES |
22 |
22 |
23 #include <aknlistquerydialog.h> |
23 #include <hbsymbiandevicedialog.h> |
24 #include <AknQueryDialog.h> |
24 #include <hbsymbianvariant.h> |
25 |
25 |
26 #include "usbnotifier.h" // Base class |
26 #include "usbnotifier.h" // Base class |
27 // CLASS DECLARATION |
27 // CLASS DECLARATION |
28 |
28 |
29 /** |
29 /** |
30 * This class is used to show query related to the USB cable connection |
30 * This class is used to show query related to the USB cable connection |
31 * |
31 * |
32 * @lib |
32 * @lib |
33 */ |
33 */ |
34 NONSHARABLE_CLASS(CUSBUICableConnectedNotifier) : public CUSBUINotifierBase, |
34 NONSHARABLE_CLASS(CUSBUICableConnectedNotifier) : public CUSBUINotifierBase, |
35 public MEikCommandObserver |
35 public MHbDeviceDialogObserver |
36 { |
36 { |
37 public: |
37 public: |
38 // Constructors and destructor |
38 // Constructors and destructor |
39 |
39 |
40 /** |
40 /** |
82 * @return None. |
82 * @return None. |
83 */ |
83 */ |
84 void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, |
84 void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, |
85 const RMessagePtr2& aMessage); |
85 const RMessagePtr2& aMessage); |
86 |
86 |
|
87 |
|
88 private: |
|
89 // functions from MHbDeviceDialogObserver |
|
90 |
87 /** |
91 /** |
88 * Handles the command on USB connected note |
92 * lunches the QT usb ui setting |
89 */ |
93 * @param aData is a CHbSymbianVariantMap daya which contains the keys |
90 void ProcessCommandL(TInt aCommandId); |
94 */ |
|
95 void DataReceived(CHbSymbianVariantMap& aData); |
|
96 /* |
|
97 * Virtual function from MHbDeviceDialogObserver |
|
98 * Not implemented |
|
99 */ |
|
100 void DeviceDialogClosed(TInt aCompletionCode); |
|
101 |
|
102 |
91 |
103 |
92 private: |
104 private: |
93 //New functions |
105 //New functions |
94 /** |
106 /** |
95 * Get the ID for current USB personality mode |
107 * Get the ID for current USB personality mode |
96 * @param aCurrentPersonality current personality id |
108 * @param aCurrentPersonality current personality id |
97 */ |
109 */ |
98 void GetCurrentIdL(TInt& aCurrentPersonality); |
110 void GetCurrentIdL(TInt& aCurrentPersonality); |
99 /** |
111 /** |
100 * Get the mode name and header for current personality |
112 * Get the mode name and header for current personality |
|
113 * The parameters are pushed to the cleanup stack in order |
|
114 * aDescription, aHeader. |
101 * @param aDescription The returned current personality string. |
115 * @param aDescription The returned current personality string. |
102 * @param aHeader The header string for message query. |
116 * @param aHeader The header string for message query. |
103 */ |
117 */ |
104 void GetPersonalityStringL(HBufC*& aHeader,HBufC*& aDescription ); |
118 void GetPersonalityStringLC(HBufC*& aHeader,HBufC*& aDescription ); |
105 |
119 |
106 /** |
120 /** |
107 * Runs the connected discreet note |
121 * Runs the connected discreet note |
108 */ |
122 */ |
109 void RunQueryL(); |
123 void RunQueryL(); |
110 |
124 |
111 |
125 |
112 /** |
126 /** |
113 * creates the USB UI setting view |
127 * launches the (USB) application |
114 * @param aProcessName The process name (USBClassChangeUI.exe) |
128 * @param aProcessName The process name (*.exe) |
115 * @param TUidType |
129 * @param TUidType |
116 */ |
130 */ |
117 void CreateChosenViewL(const TDesC & aProcessName,const TUidType & aUidType) const; |
131 void LaunchApplication(const TDesC & aProcessName,const TUidType & aUidType) const; |
|
132 |
|
133 /** |
|
134 * Adds a parameter to the dialog parameters. |
|
135 */ |
|
136 void AddParameterL( |
|
137 CHbSymbianVariantMap* aParameters, |
|
138 const TDesC& aKey, |
|
139 const TAny* aData, |
|
140 CHbSymbianVariant::TType aDataType); |
|
141 |
118 private: |
142 private: |
119 /** |
143 /** |
120 * C++ default constructor. |
144 * C++ default constructor. |
121 */ |
145 */ |
122 CUSBUICableConnectedNotifier(); |
146 CUSBUICableConnectedNotifier(); |
|
147 |
|
148 CHbDeviceDialog* iDialog; |
123 |
149 |
124 }; |
150 }; |
125 #endif // USBUINCABLECONNECTEDNOTIFIER_H |
151 #endif // USBUINCABLECONNECTEDNOTIFIER_H |