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 <hbdevicedialogsymbian.h> |
23 #include <hb/hbcore/hbdevicedialogsymbian.h> |
24 #include <hbsymbianvariant.h> |
24 #include <hb/hbwidgets/hbdevicenotificationdialogsymbian.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 MHbDeviceDialogObserver |
35 public MHbDeviceNotificationDialogObserver |
36 { |
36 { |
37 public: |
37 public: |
38 // Constructors and destructor |
38 // Constructors and destructor |
39 |
39 |
40 /** |
40 /** |
64 * @return None. |
64 * @return None. |
65 */ |
65 */ |
66 void Cancel(); |
66 void Cancel(); |
67 |
67 |
68 /** |
68 /** |
69 * From CUSBUINotifierBase Gets called when a request completes. |
|
70 * @param None. |
|
71 * @return None. |
|
72 */ |
|
73 void RunL(); |
|
74 |
|
75 /** |
|
76 * From CUSBUINotifierBase Used in asynchronous notifier launch to |
69 * From CUSBUINotifierBase Used in asynchronous notifier launch to |
77 * store received parameters into members variables and |
70 * store received parameters into members variables and |
78 * make needed initializations. |
71 * make needed initializations. |
79 * @param aBuffer A buffer containing received parameters |
72 * @param aBuffer A buffer containing received parameters |
80 * @param aReplySlot a Reply slot. |
73 * @param aReplySlot a Reply slot. |
81 * @param aMessage Should be completed when the notifier is deactivated. |
74 * @param aMessage Should be completed when the notifier is deactivated. |
82 * @return None. |
75 * @return None. |
83 */ |
76 */ |
84 void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, |
77 void StartDialogL(const TDesC8& aBuffer, TInt aReplySlot, |
85 const RMessagePtr2& aMessage); |
78 const RMessagePtr2& aMessage); |
86 |
79 |
87 |
80 |
88 private: |
81 private: |
89 // functions from MHbDeviceDialogObserver |
82 // functions from MHbDeviceNotificationDialogObserver |
90 |
|
91 /** |
83 /** |
92 * lunches the QT usb ui setting |
84 * Callback function which is called when the dialog is tapped |
93 * @param aData is a CHbSymbianVariantMap daya which contains the keys |
85 */ |
94 */ |
86 void NotificationDialogActivated(const CHbDeviceNotificationDialogSymbian* aDialog); |
95 void DataReceived(CHbSymbianVariantMap& aData); |
87 /** |
96 /* |
88 * Callback function which is called when the dialog is closed |
97 * Virtual function from MHbDeviceDialogObserver |
89 */ |
98 * Not implemented |
90 void NotificationDialogClosed(const CHbDeviceNotificationDialogSymbian* aDialog, |
99 */ |
91 TInt aCompletionCode); |
100 void DeviceDialogClosed(TInt aCompletionCode); |
|
101 |
|
102 |
|
103 |
92 |
104 private: |
93 private: |
105 //New functions |
94 //New functions |
106 /** |
95 /** |
107 * Get the ID for current USB personality mode |
96 * Get the ID for current USB personality mode |
115 * @param aDescription The returned current personality string. |
104 * @param aDescription The returned current personality string. |
116 * @param aHeader The header string for message query. |
105 * @param aHeader The header string for message query. |
117 */ |
106 */ |
118 void GetPersonalityStringLC(HBufC*& aHeader,HBufC*& aDescription ); |
107 void GetPersonalityStringLC(HBufC*& aHeader,HBufC*& aDescription ); |
119 |
108 |
120 /** |
109 /** |
121 * Runs the connected discreet note |
|
122 */ |
|
123 void RunQueryL(); |
|
124 |
|
125 |
|
126 /** |
|
127 * launches the (USB) application |
110 * launches the (USB) application |
128 * @param aProcessName The process name (*.exe) |
111 * @param aProcessName The process name (*.exe) |
129 * @param TUidType |
112 * @param TUidType |
130 */ |
113 */ |
131 void LaunchApplication(const TDesC & aProcessName,const TUidType & aUidType) const; |
114 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 |
115 |
142 private: |
116 private: |
143 /** |
117 /** |
144 * C++ default constructor. |
118 * C++ default constructor. |
145 */ |
119 */ |
146 CUSBUICableConnectedNotifier(); |
120 CUSBUICableConnectedNotifier(); |
147 |
121 |
148 CHbDeviceDialogSymbian* iDialog; |
122 CHbDeviceNotificationDialogSymbian* iDialog; |
149 |
123 |
150 }; |
124 }; |
151 #endif // USBUINCABLECONNECTEDNOTIFIER_H |
125 #endif // USBUINCABLECONNECTEDNOTIFIER_H |