voicerecorder/RecViewInc/CVRRecView.h
branchRCL_3
changeset 13 4e5b531d23cb
parent 0 845549f293a7
child 14 f962425b9f8b
equal deleted inserted replaced
11:a2fdc35b8f46 13:4e5b531d23cb
    23 #ifndef __CVRRECVIEW_H__
    23 #ifndef __CVRRECVIEW_H__
    24 #define __CVRRECVIEW_H__
    24 #define __CVRRECVIEW_H__
    25 
    25 
    26 // INCLUDES
    26 // INCLUDES
    27 #include <aknview.h>
    27 #include <aknview.h>
       
    28 #include <VoiceRecorderContexts.h>
       
    29 #include <voicerecorder.rsg>
       
    30 #include <aknwaitdialog.h>
       
    31 
    28 #include "MVRSelectionProvider.h"
    32 #include "MVRSelectionProvider.h"
    29 #include "MVRLayoutChangeObserver.h"
    33 #include "MVRLayoutChangeObserver.h"
    30 #include <VoiceRecorderContexts.h>
       
    31 #include "voicerecorder.hrh"
    34 #include "voicerecorder.hrh"
       
    35 #include "VRUSBStateHanlder.h"
    32 
    36 
    33 // FORWARD DECLARATIONS
    37 // FORWARD DECLARATIONS
    34 class CAknLaunchAppService;
    38 class CAknLaunchAppService;
    35 class CSendUi;
    39 class CSendUi;
    36 class CVRRecViewContainer;
    40 class CVRRecViewContainer;
    37 class CVRRecViewActivationContainer;
    41 class CVRRecViewActivationContainer;
    38 class CVRRecViewModel;
    42 class CVRRecViewModel;
    39 
    43 
    40 // CLASS DEFINITION
    44 // CLASS DEFINITION
    41 /**
    45 /**
    42 * CVRRecView is an CAknView inherited view class that implements
    46  * CVRRecView is an CAknView inherited view class that implements
    43 * the recorder view functionality of Voicer Recorder.
    47  * the recorder view functionality of Voicer Recorder.
    44 * 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)
    45 * and the view model.
    49  * and the view model.
    46 */
    50  */
    47 class CVRRecView 
    51 class CVRRecView : public CAknView,
    48 	: public CAknView, public MVRSelectionProvider, 
    52         public MVRSelectionProvider,
    49 	  public MVRLayoutChangeObserver
    53         public MVRLayoutChangeObserver,
    50 	{
    54         public MVRUSBStateObserver,
    51 	private:	// nested classes
    55         public MProgressDialogCallback
       
    56     {
       
    57 private:
       
    58     // nested classes
    52 
    59 
    53         /*
    60         /*
    54         * One shot class for model activation. Receives a pointer to
    61         * One shot class for model activation. Receives a pointer to
    55         * constructed CVRRecViewModel object and activates it asynchronically
    62         * constructed CVRRecViewModel object and activates it asynchronically
    56         * when Activate() is called.
    63         * when Activate() is called.
   263 		*/
   270 		*/
   264 		void ReallyDoActivateL( const TVwsViewId& aPrevViewId,
   271 		void ReallyDoActivateL( const TVwsViewId& aPrevViewId,
   265 								  TUid aCustomMessageId,
   272 								  TUid aCustomMessageId,
   266 								  const TDesC8& aCustomMessage );
   273 								  const TDesC8& aCustomMessage );
   267 
   274 
   268 		/*
   275     /*
   269 		* Called by iModelActivator object after model has been
   276      * Called by iModelActivator object after model has been
   270 		* fully activated.
   277      * fully activated.
   271 		* @param aRecView Always a valid pointer to CVRRecView object
   278      * @param aRecView Always a valid pointer to CVRRecView object
   272 		* @return Return value required by TCallBack, not used.
   279      * @return Return value required by TCallBack, not used.
   273 		*/
   280      */
   274 		static TInt ActivationCallBack( TAny* aRecView );
   281     static TInt ActivationCallBack(TAny* aRecView);
   275 		
   282 
   276 		/*
   283     /*
   277 		* Non-static method called by ActivationCallBack. Activates
   284      * Non-static method called by ActivationCallBack. Activates
   278 		* the actual UI container and deletes the empty one.
   285      * the actual UI container and deletes the empty one.
   279 		*/
   286      */
   280 		void ActivateContainerL();
   287     void ActivateContainerL();    
   281 								  
   288    
   282 	private: // data
   289 public:
   283 		
   290     virtual TInt HandleUsbPlugInL();
   284 		/**
   291     virtual TInt HandleUsbPlugOutL();
   285 		* Pointer to the UI control container. Owned.
   292     
   286 		*/
   293     virtual void DialogDismissedL( TInt aButtonId );
   287 		CVRRecViewContainer* iContainer;
   294 
   288 		
   295 private:
   289 		/**
   296     // data
   290 		* Pointer to the container that is displayed during
   297 
   291 		* model construction. Owned
   298     /**
   292 		*/
   299      * Pointer to the UI control container. Owned.
   293 		CVRRecViewActivationContainer* iActivationContainer;		
   300      */
       
   301     CVRRecViewContainer* iContainer;
       
   302 
       
   303     /**
       
   304      * Pointer to the container that is displayed during
       
   305      * model construction. Owned
       
   306      */
       
   307     CVRRecViewActivationContainer* iActivationContainer;
   294 
   308 
   295 		/**
   309 		/**
   296 		* Pointer to the view model (statemachine). Owned.
   310 		* Pointer to the view model (statemachine). Owned.
   297 		*/
   311 		*/
   298 		CVRRecViewModel* iModel;
   312 		CVRRecViewModel* iModel;
   306 		* 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
   307 		* asynchronically. Owned.
   321 		* asynchronically. Owned.
   308 		*/
   322 		*/
   309 		CVRRecViewModelActivator* iModelActivator;
   323 		CVRRecViewModelActivator* iModelActivator;
   310 
   324 
   311 		/**
   325     /**
   312 		* The command that passed to Handlecommand
   326      * The command that passed to Handlecommand
   313 		* 
   327      * 
   314 		*/
   328      */
   315         TInt iCommand;
   329     TInt iCommand;
   316         
   330 
   317         CAknLaunchAppService* iLaunchService;
   331     CAknLaunchAppService* iLaunchService;
   318 	};
   332     
       
   333     CAknWaitDialog* iUsbWaitDialog;
       
   334     
       
   335     CVRUSBStateHanlder* iUSBStateHandler;
       
   336     
       
   337     };
   319 
   338 
   320 #endif // __CVRRECVIEW_H__
   339 #endif // __CVRRECVIEW_H__
   321 
   340