voicerecorder/RecViewInc/CVRRecView.h
branchRCL_3
changeset 19 2f5c9ee7098c
parent 14 f962425b9f8b
equal deleted inserted replaced
17:41c99112ff9d 19:2f5c9ee7098c
    39 class CSendUi;
    39 class CSendUi;
    40 class CVRRecViewContainer;
    40 class CVRRecViewContainer;
    41 class CVRRecViewActivationContainer;
    41 class CVRRecViewActivationContainer;
    42 class CVRRecViewModel;
    42 class CVRRecViewModel;
    43 
    43 
       
    44 enum TDialogTypeID {
       
    45         EDialogForWaitStorageCard = 0,
       
    46         EDialogForWaitUSBPluggingOut
       
    47     };
       
    48 
    44 // CLASS DEFINITION
    49 // CLASS DEFINITION
    45 /**
    50 /**
    46  * CVRRecView is an CAknView inherited view class that implements
    51  * CVRRecView is an CAknView inherited view class that implements
    47  * the recorder view functionality of Voicer Recorder.
    52  * the recorder view functionality of Voicer Recorder.
    48  * It owns the view container (which, in turn, owns all the ui controls)
    53  * It owns the view container (which, in turn, owns all the ui controls)
    99                 /*
   104                 /*
   100                 * Callback that is called after model is activated
   105                 * Callback that is called after model is activated
   101                 */
   106                 */
   102                 TCallBack iCallback;
   107                 TCallBack iCallback;
   103             };
   108             };
       
   109         
       
   110         /*
       
   111         * One shot class for note pop-up
       
   112         */
       
   113         NONSHARABLE_CLASS( CVRRecViewDialogActivator ) 
       
   114             : public CAsyncOneShot
       
   115             {
       
   116             public:  // constructor and destructor
       
   117                 CVRRecViewDialogActivator( CVRRecViewModel* aModel);
       
   118                 ~CVRRecViewDialogActivator(); 
       
   119                 
       
   120             public: // new method
       
   121                 void SetDialogType(TDialogTypeID aType);
       
   122                 
       
   123                 void SetViewContexts(TVRRecViewContexts aContext);
       
   124                 
       
   125             private: // Functions from base classes
       
   126 
       
   127                 /**
       
   128                  * From CActive.
       
   129                  */
       
   130                 void RunL();
       
   131                 void DoCancel();
       
   132 
       
   133             private: // Data:
       
   134 
       
   135                 /*
       
   136                 * State machine model, not owned
       
   137                 */
       
   138                 CVRRecViewModel* iModel;
       
   139                 
       
   140                 /*
       
   141                 * The type of dialog
       
   142                 */
       
   143                 TDialogTypeID iType;
       
   144                 
       
   145                 /*
       
   146                 * Context that is used to activate model
       
   147                 */                
       
   148                 TVRRecViewContexts iContext;  
       
   149             };
   104 	
   150 	
   105 	
   151 	
   106 	public: // Constructors and destructor
   152 	public: // Constructors and destructor
   107 
   153 
   108 		/**
   154 		/**
   283     /*
   329     /*
   284      * Non-static method called by ActivationCallBack. Activates
   330      * Non-static method called by ActivationCallBack. Activates
   285      * the actual UI container and deletes the empty one.
   331      * the actual UI container and deletes the empty one.
   286      */
   332      */
   287     void ActivateContainerL();    
   333     void ActivateContainerL();    
       
   334     
       
   335     /*
       
   336      * Check the current state of drives
       
   337      */
       
   338     void CheckDriveState();    
       
   339     
       
   340     /**
       
   341     * This method show a dialog to warn user to insert the SD card.
       
   342     * @return if user insert the SD card or not
       
   343     */
       
   344     static TBool ShowDialogForWaitStorageCardL();
       
   345     
       
   346     /**
       
   347      * Make user insert the SD card, and choose SD card as the memo storage
       
   348      */
       
   349     void SetDriveL();
   288    
   350    
   289 public:
   351 public:
   290     virtual TInt HandleUsbPlugInL();
   352     virtual TInt HandleUsbPlugInL();
   291     virtual TInt HandleUsbPlugOutL();
   353     virtual TInt HandleUsbPlugOutL();
   292     
   354     
   319 		/**
   381 		/**
   320 		* One shot object that is used to activate model in correct context
   382 		* One shot object that is used to activate model in correct context
   321 		* asynchronically. Owned.
   383 		* asynchronically. Owned.
   322 		*/
   384 		*/
   323 		CVRRecViewModelActivator* iModelActivator;
   385 		CVRRecViewModelActivator* iModelActivator;
   324 
   386 		
       
   387 		/**
       
   388         * One shot object that is used to pop up the note
       
   389         */
       
   390 		CVRRecViewDialogActivator* iDialogActivator;
       
   391 
       
   392     /**
       
   393      * The type of dialog
       
   394      */
       
   395 	TDialogTypeID iDialogType;
       
   396 		
   325     /**
   397     /**
   326      * The command that passed to Handlecommand
   398      * The command that passed to Handlecommand
   327      * 
   399      * 
   328      */
   400      */
   329     TInt iCommand;
   401     TInt iCommand;
   332     
   404     
   333     CAknWaitDialog* iUsbWaitDialog;
   405     CAknWaitDialog* iUsbWaitDialog;
   334     
   406     
   335     CVRUSBStateHanlder* iUSBStateHandler;
   407     CVRUSBStateHanlder* iUSBStateHandler;
   336     
   408     
       
   409     /*
       
   410     * Context that is used to activate model
       
   411     */                
       
   412     TVRRecViewContexts iContext;
   337     };
   413     };
   338 
   414 
   339 #endif // __CVRRECVIEW_H__
   415 #endif // __CVRRECVIEW_H__
   340 
   416