voicerecorder/RecViewInc/CVRRecView.h
branchRCL_3
changeset 29 c9b63fff5abf
parent 27 41fba8bcf7b7
equal deleted inserted replaced
27:41fba8bcf7b7 29:c9b63fff5abf
    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 
       
    49 // CLASS DEFINITION
    44 // CLASS DEFINITION
    50 /**
    45 /**
    51  * CVRRecView is an CAknView inherited view class that implements
    46  * CVRRecView is an CAknView inherited view class that implements
    52  * the recorder view functionality of Voicer Recorder.
    47  * the recorder view functionality of Voicer Recorder.
    53  * It owns the view container (which, in turn, owns all the ui controls)
    48  * It owns the view container (which, in turn, owns all the ui controls)
   104                 /*
    99                 /*
   105                 * Callback that is called after model is activated
   100                 * Callback that is called after model is activated
   106                 */
   101                 */
   107                 TCallBack iCallback;
   102                 TCallBack iCallback;
   108             };
   103             };
   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             };
       
   150 	
   104 	
   151 	
   105 	
   152 	public: // Constructors and destructor
   106 	public: // Constructors and destructor
   153 
   107 
   154 		/**
   108 		/**
   329     /*
   283     /*
   330      * Non-static method called by ActivationCallBack. Activates
   284      * Non-static method called by ActivationCallBack. Activates
   331      * the actual UI container and deletes the empty one.
   285      * the actual UI container and deletes the empty one.
   332      */
   286      */
   333     void ActivateContainerL();    
   287     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();
       
   350    
   288    
   351 public:
   289 public:
   352     virtual TInt HandleUsbPlugInL();
   290     virtual TInt HandleUsbPlugInL();
   353     virtual TInt HandleUsbPlugOutL();
   291     virtual TInt HandleUsbPlugOutL();
   354     
   292     
   381 		/**
   319 		/**
   382 		* One shot object that is used to activate model in correct context
   320 		* One shot object that is used to activate model in correct context
   383 		* asynchronically. Owned.
   321 		* asynchronically. Owned.
   384 		*/
   322 		*/
   385 		CVRRecViewModelActivator* iModelActivator;
   323 		CVRRecViewModelActivator* iModelActivator;
   386 		
   324 
   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 		
       
   397     /**
   325     /**
   398      * The command that passed to Handlecommand
   326      * The command that passed to Handlecommand
   399      * 
   327      * 
   400      */
   328      */
   401     TInt iCommand;
   329     TInt iCommand;
   404     
   332     
   405     CAknWaitDialog* iUsbWaitDialog;
   333     CAknWaitDialog* iUsbWaitDialog;
   406     
   334     
   407     CVRUSBStateHanlder* iUSBStateHandler;
   335     CVRUSBStateHanlder* iUSBStateHandler;
   408     
   336     
   409     /*
       
   410     * Context that is used to activate model
       
   411     */                
       
   412     TVRRecViewContexts iContext;
       
   413     
       
   414     /**
       
   415     * Own: Indicates USB connection dialog is open or not.
       
   416     * If value is ETrue, don't try to open it again.
       
   417     */
       
   418     TBool iUSBConnectedDialogOpen;
       
   419     };
   337     };
   420 
   338 
   421 #endif // __CVRRECVIEW_H__
   339 #endif // __CVRRECVIEW_H__
   422 
   340