--- a/usbuis/usbuinotif/inc/usbuinotifmsmmerror.h Tue Aug 31 16:13:57 2010 +0300
+++ b/usbuis/usbuinotif/inc/usbuinotifmsmmerror.h Wed Sep 01 12:20:49 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description: Declares MSMM error notifier.
+* Description: Declares USB UI Queries notifier.
*
*/
@@ -20,11 +20,12 @@
#define USBUINOTIFMSMMERROR_H
// INCLUDES
-#include <hb/hbwidgets/hbdevicemessageboxsymbian.h>
-#include <hb/hbwidgets/hbdevicenotificationdialogsymbian.h>
+
#include "usbnotifier.h" // Base class
+#include <AknQueryDialog.h> // AVKON component
+#include "usbuinotifdialerwatcher.h"
-
+#define KUsbUiNotifOtgGeneralQueryGranularity 3
// CLASS DECLARATION
/**
@@ -33,24 +34,19 @@
*
* @lib
*/
-NONSHARABLE_CLASS(CUsbUiNotifMSMMError) : public CUSBUINotifierBase,
- public MHbDeviceMessageBoxObserver,
- public MHbDeviceNotificationDialogObserver
+NONSHARABLE_CLASS(CUsbUiNotifMSMMError) : public CUSBUINotifierBase, public MDialerNotifier
{
public:
- /**
- * Indexes for the strings used in KUsbUiNotifMSMMError which are mapped to 5 errors.
- */
- enum TUsbUiNotifMSMMError
- {
- EUsbMSMMGeneralError,
- EUsbMSMMUnknownFileSystem,
- EUsbMSMMOutOfMemory,
- EUsbMSMMSafeToRemove,
- EUsbMSMMUnableToEject
- };
-
+/**
+ * Possible parameter values for KUsbUiNotifMSMMError
+ */
+enum TUsbUiNotifMSMMError
+ {
+ EUsbMSMMGeneralError,
+ EUsbMSMMUnknownFileSystem,
+ EUsbMSMMOutOfMemory
+ };
// Constructors and destructor
/**
@@ -63,14 +59,6 @@
*/
virtual ~CUsbUiNotifMSMMError();
- /**
- * Call back function to observe device message box closing.
- * @param aMessageBox Pointer to the closing message box instance.
- * @param aButton Button that was pressed.
- */
- void MessageBoxClosed(const CHbDeviceMessageBoxSymbian* aMessageBox,
- CHbDeviceMessageBoxSymbian::TButtonId aButton);
-
protected:
/**
@@ -95,6 +83,11 @@
void Cancel();
/**
+ * From CUSBUINotifierBase Gets called when a request completes.
+ */
+ void RunL();
+
+ /**
* From CUSBUINotifierBase Used in asynchronous notifier launch to
* store received parameters into members variables and
* make needed initializations.
@@ -102,8 +95,25 @@
* @param aReplySlot A reply slot.
* @param aMessage Should be completed when the notifier is deactivated.
*/
- void StartDialogL(const TDesC8& aBuffer, TInt aReplySlot,
+ void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot,
const RMessagePtr2& aMessage);
+
+private:
+
+ /**
+ * From MDialerNotifier
+ * The function to be when Dialaer is activated
+ *
+ */
+ void DialerActivated();
+
+ /**
+ * From MDialerNotifier
+ * The function to be when Dialaer is deactivated
+ * and note can be shown again
+ *
+ */
+ void ReActivateDialog();
private:
@@ -113,21 +123,31 @@
CUsbUiNotifMSMMError();
private:
- // functions from MHbDeviceNotificationDialogObserver
+ // New functions
+
/**
- * Callback function which is called when the dialog is tapped
+ * Show query dialog
+ * @return KErrNone - accepted, KErrCancel - Cancel or End call key
*/
- void NotificationDialogActivated(const CHbDeviceNotificationDialogSymbian* aDialog);
- /**
- * Callback function which is called when the dialog is closed
- */
- void NotificationDialogClosed(const CHbDeviceNotificationDialogSymbian* aDialog,
- TInt aCompletionCode);
+ TInt QueryUserResponseL();
private:
// Data
- CHbDeviceMessageBoxSymbian* iQuery;
- CHbDeviceNotificationDialogSymbian* iDiscreet;
- CDesCArrayFlat* iStringIds;
- };
+ /**
+ * Query
+ * Not own, destroys self when lauched.
+ */
+ CAknQueryDialog* iQuery;
+ RArray<TInt> iStringIds;
+ TInt iErrorId;
+ /**
+ * Dialer watcher
+ * Own.
+ */
+ CUsbuinotifDialerWatcher* iDialerWatcher;
+ /**
+ * Dialog is dismissed.
+ */
+ TBool iDismissed;
+ };
#endif // USBUINOTIFMSMMERROR_H