voicerecorder/AppSrc/CVRAppUi.h
branchRCL_3
changeset 20 072a5fa0c63b
parent 19 2f5c9ee7098c
child 21 c6bafb5162d8
equal deleted inserted replaced
19:2f5c9ee7098c 20:072a5fa0c63b
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *     This class is a part of the standard application framework.
       
    16 *     It instantiates the application views.
       
    17 *     It also acts as the default command handler for the application.
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 #ifndef __CVRAPPUI_H__
       
    23 #define __CVRAPPUI_H__
       
    24 
       
    25 // INCLUDES
       
    26 #include <aknViewAppUi.h>
       
    27 #include <apparc.h>			// MApaEmbeddedDocObserver
       
    28 
       
    29 #include "MVREmbeddedObserver.h"
       
    30 #include "VRUSBStateHanlder.h"
       
    31 // FORWARD DECLARATIONS
       
    32 class MVRSelectionProvider;
       
    33 class CErrorUI;
       
    34 class MVRLayoutChangeObserver;
       
    35 class CAknWaitDialog;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 /**
       
    39 * This class is a part of the standard application framework.
       
    40 * It instantiates the application views.
       
    41 * It also acts as the default command handler for the application.
       
    42 */
       
    43 class CVRAppUi
       
    44 	: public CAknViewAppUi
       
    45 	{
       
    46 	public: // Constructors and destructor
       
    47 
       
    48 		/**
       
    49         * Default constructor.
       
    50         */
       
    51 		CVRAppUi();
       
    52 
       
    53 		/**
       
    54 		* Destructor.
       
    55 		*/
       
    56 		~CVRAppUi();
       
    57 
       
    58 		/**
       
    59         * 2nd phase constructor.
       
    60         */
       
    61 		void ConstructL();
       
    62 
       
    63 		/**
       
    64 		* Receive file handle and observer for recording
       
    65 		* for file new service
       
    66 		* @param aFile File handle
       
    67 		* @param aObserver Observer for handing events back to file service
       
    68 		*/
       
    69 		void RecordNewFileL( RFile& aFile, MVREmbeddedObserver* aObserver );
       
    70 
       
    71 		/**
       
    72 		* Method for setting observer for file new service
       
    73 		* @param aObserver Observer for handing events back to file service
       
    74 		*/
       
    75 		void SetEmbeddedObserver( MVREmbeddedObserver* aObserver );
       
    76 
       
    77 	private: // from CEikAppUi
       
    78 
       
    79 		/**
       
    80 		* Takes care of command handling.
       
    81 		* @param aCommand Command to be handled
       
    82 		*/
       
    83 		void HandleCommandL( TInt aCommand );
       
    84 
       
    85 		/**
       
    86 		* Handles a change to the application's resources
       
    87 		* @param aType The type of changed resource
       
    88 		*/
       
    89 		void HandleResourceChangeL( TInt aType );
       
    90 
       
    91 		/**
       
    92 		* CEikAppUi::ProcessCommandParametersL() is overwritten here, because
       
    93 		* otherwise it messes with the document name.
       
    94 		* @param aCommand The shell command sent to the application
       
    95 		* @param aDocumentName The document name that will be given to OpenFileL()
       
    96 		* @param aTail The rest of the command line
       
    97 		* @return Whether the final document name represents an existing file
       
    98 		*/
       
    99 		TBool ProcessCommandParametersL( TApaCommand aCommand,
       
   100 		    TFileName& aDocumentName, const TDesC8& aTail );
       
   101 
       
   102 		/**
       
   103 		* Handles events from window group  
       
   104 		* @param aType The type of event
       
   105 		*/
       
   106 		
       
   107 		void HandleApplicationSpecificEventL(TInt aType, const TWsEvent& aEvent);
       
   108 
       
   109 	private: // from MVRUSBEventObserver
       
   110 		void HandleUSBEventL();
       
   111 	
       
   112 	private: // new methods
       
   113 
       
   114 		/**
       
   115 		* Provides access to the current view's MVRSelectionProvider
       
   116 		* interface.
       
   117 		* @return pointer to the active view as MVRSelectionProvider.
       
   118 		*/
       
   119 		MVRSelectionProvider* SelectionProviderL();
       
   120 
       
   121 	private: // data
       
   122 		/**
       
   123 		* CActiveScheduler wrapper object. Owned.
       
   124 		*/
       
   125 		CActiveSchedulerWait iActiveWait;
       
   126 
       
   127 		/**
       
   128 		* Owned: CErrorUI object used to display notes when errors occur
       
   129 		* in embedded activation
       
   130 		*/
       
   131 		CErrorUI* iErrorUI;
       
   132 
       
   133 		/**
       
   134 		* Pointer to object that observers layout changes and forwards
       
   135 		* notification to all UI controls
       
   136 		*/
       
   137 		MVRLayoutChangeObserver* iLayoutChangeObserver;
       
   138 		
       
   139 		/**
       
   140 		* Pointer to embedded observer which is notified (if not null) when
       
   141 		* embedded recording is ready
       
   142 		*/
       
   143 		MVREmbeddedObserver* iEmbeddedObserver;
       
   144 
       
   145 		/*
       
   146 		* For help context, whether settings page is active.
       
   147 		*/
       
   148 		TBool iIsSettingsOpen;		
       
   149 
       
   150 
       
   151 	};
       
   152 
       
   153 #endif // __CVRAPPUI_H__