voicerecorder/RecViewInc/CVRRecView.h
branchRCL_3
changeset 19 2f5c9ee7098c
parent 14 f962425b9f8b
--- a/voicerecorder/RecViewInc/CVRRecView.h	Mon Jun 21 15:43:26 2010 +0300
+++ b/voicerecorder/RecViewInc/CVRRecView.h	Thu Aug 19 09:57:40 2010 +0300
@@ -41,6 +41,11 @@
 class CVRRecViewActivationContainer;
 class CVRRecViewModel;
 
+enum TDialogTypeID {
+        EDialogForWaitStorageCard = 0,
+        EDialogForWaitUSBPluggingOut
+    };
+
 // CLASS DEFINITION
 /**
  * CVRRecView is an CAknView inherited view class that implements
@@ -101,6 +106,47 @@
                 */
                 TCallBack iCallback;
             };
+        
+        /*
+        * One shot class for note pop-up
+        */
+        NONSHARABLE_CLASS( CVRRecViewDialogActivator ) 
+            : public CAsyncOneShot
+            {
+            public:  // constructor and destructor
+                CVRRecViewDialogActivator( CVRRecViewModel* aModel);
+                ~CVRRecViewDialogActivator(); 
+                
+            public: // new method
+                void SetDialogType(TDialogTypeID aType);
+                
+                void SetViewContexts(TVRRecViewContexts aContext);
+                
+            private: // Functions from base classes
+
+                /**
+                 * From CActive.
+                 */
+                void RunL();
+                void DoCancel();
+
+            private: // Data:
+
+                /*
+                * State machine model, not owned
+                */
+                CVRRecViewModel* iModel;
+                
+                /*
+                * The type of dialog
+                */
+                TDialogTypeID iType;
+                
+                /*
+                * Context that is used to activate model
+                */                
+                TVRRecViewContexts iContext;  
+            };
 	
 	
 	public: // Constructors and destructor
@@ -285,6 +331,22 @@
      * the actual UI container and deletes the empty one.
      */
     void ActivateContainerL();    
+    
+    /*
+     * Check the current state of drives
+     */
+    void CheckDriveState();    
+    
+    /**
+    * This method show a dialog to warn user to insert the SD card.
+    * @return if user insert the SD card or not
+    */
+    static TBool ShowDialogForWaitStorageCardL();
+    
+    /**
+     * Make user insert the SD card, and choose SD card as the memo storage
+     */
+    void SetDriveL();
    
 public:
     virtual TInt HandleUsbPlugInL();
@@ -321,8 +383,18 @@
 		* asynchronically. Owned.
 		*/
 		CVRRecViewModelActivator* iModelActivator;
+		
+		/**
+        * One shot object that is used to pop up the note
+        */
+		CVRRecViewDialogActivator* iDialogActivator;
 
     /**
+     * The type of dialog
+     */
+	TDialogTypeID iDialogType;
+		
+    /**
      * The command that passed to Handlecommand
      * 
      */
@@ -334,6 +406,10 @@
     
     CVRUSBStateHanlder* iUSBStateHandler;
     
+    /*
+    * Context that is used to activate model
+    */                
+    TVRRecViewContexts iContext;
     };
 
 #endif // __CVRRECVIEW_H__