usbuis/usbuinotif/inc/usbuinotifotgwarning.h
branchRCL_3
changeset 23 25fce757be94
parent 3 47c263f7e521
child 24 e02eb84a14d2
--- a/usbuis/usbuinotif/inc/usbuinotifotgwarning.h	Thu Aug 19 10:54:11 2010 +0300
+++ b/usbuis/usbuinotif/inc/usbuinotifotgwarning.h	Tue Aug 31 16:13:57 2010 +0300
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  Declares USB UI connection notifier.
+* Description:  Declares USB OTG Warning notifier.
  *
 */
 
@@ -20,11 +20,11 @@
 #define USBUINOTIFOTGWARNING_H
 
 // INCLUDES
-#include <aknnotewrappers.h>
+
 #include <usbuinotif.h>
+#include <hb/hbwidgets/hbdevicemessageboxsymbian.h>
 
 #include "usbnotifier.h"   // Base class
-#define KUsbUiNotifOtgGeneralNoteGranularity 1
 // CLASS DECLARATION
 
 /**
@@ -32,7 +32,8 @@
  *  Synchronous call is enouph.
  * 
  */
-NONSHARABLE_CLASS(CUsbUiNotifOtgWarning) : public CUSBUINotifierBase
+NONSHARABLE_CLASS(CUsbUiNotifOtgWarning) : public CUSBUINotifierBase,
+                                           public MHbDeviceMessageBoxObserver
     {
 public:
     // Constructors and destructor
@@ -46,6 +47,13 @@
      * Destructor.
      */
     virtual ~CUsbUiNotifOtgWarning();
+    /**
+       * 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:
 
@@ -72,13 +80,6 @@
     void Cancel();
 
     /**
-     * From CUSBUINotifierBase. Gets called when a request completes.
-     * @param None.
-     * @return None.
-     */
-    void RunL();
-
-    /**
      * From CUSBUINotifierBase. Used in asynchronous notifier launch to 
      * store received parameters into members variables and 
      * make needed initializations.
@@ -87,7 +88,7 @@
      * @param aMessage Should be completed when the notifier is deactivated.
      * @return None.
      */
-    void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot,
+    void StartDialogL(const TDesC8& aBuffer, TInt aReplySlot,
             const RMessagePtr2& aMessage);
 
 private:
@@ -97,25 +98,12 @@
      */
     CUsbUiNotifOtgWarning();
 
-    /**
-     * Publish the dialog to the cover UI
-     * The cover UI may use the personality ID or the localized
-     * personality name e.g. "Mass storage". 
-     * @param aNote           The dialog to be published.
-     * @param aPersonalityId  The personality ID.
-     * @param aLocalizedPersonalityDescriptor The personality as a string.
-     */
-    void
-            PublishToCoverUiL(CAknResourceNoteDialog* aNote,
-                    TInt aPersonalityId,
-                    const HBufC* aLocalizedPersonalityDescriptor);
-
 private:
     // data
-    RArray<TInt> iStringIds;
+    CDesCArrayFlat* iStringIds;
 
     //Own
-    CAknResourceNoteDialog* iNote;
+    CHbDeviceMessageBoxSymbian* iNote;
 
     TInt iNoteId;
     };