commonuis/CommonUi/inc/DocDefaultHandler.h
changeset 0 2f259fa3e83a
child 51 fcdfafb36fe7
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  Concrete implementation of the default (Epoc way) document handling.
       
    15 *                Called and constructed by CDocumentHandler.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #if !defined DEFAULTHANDLER_H
       
    21 #define DEFAULTHANDLER_H
       
    22 
       
    23 // INCLUDE FILES
       
    24 
       
    25 #include <apgcli.h>             // RApaLsSession
       
    26 #include <s32mem.h>             // For TStreamId
       
    27 
       
    28 #include "DocumentHandler.h"    // Common Constants etc.
       
    29 #include "DocHandlerBase.h"     // Base class
       
    30 #include "DocConstants.h"       // Constants of DocumentHandler
       
    31 
       
    32 #include <AiwGenericParam.hrh>	// Generic parameters
       
    33 #include <AknServerApp.h>       // MAknServerAppExitObserver
       
    34 #include <AknOpenFileService.h> // CAknOpenFileService
       
    35 
       
    36 #include "AiwCommon.h"          // CAiwGenericParamList
       
    37 
       
    38 
       
    39 // CONSTANTS
       
    40 
       
    41 // FORWARD DECLARATIONS
       
    42 class CDirectFileStore;
       
    43 class CEikDocument;
       
    44 class CIdle;
       
    45 
       
    46 //  CLASS DECLARATION
       
    47 /**
       
    48 * Default (Epoc-style) implementation of CHandlerBase class.
       
    49 * Constructed and called from CDocumentHandler.
       
    50 */
       
    51 NONSHARABLE_CLASS(CDocDefaultHandler) :
       
    52             public CDocHandlerBase,       
       
    53             public MAknServerAppExitObserver
       
    54     {
       
    55 
       
    56     public:           // Constructors and destructor
       
    57 
       
    58         /**
       
    59         * Two-phased constructor. Leaves the contructed instance in to the
       
    60         * clean up stack.
       
    61         *
       
    62         * @param aDataType      Data type
       
    63         * @param aUid           UID of the handler app
       
    64         * @param aDocDispatcher Pointer to DocumentHandler instance
       
    65         * @param aServiceMode   Are we able to Save, Open or do both
       
    66         *
       
    67         * @return Constructed CDefaultHandler
       
    68         */
       
    69         static CDocDefaultHandler* NewLC(
       
    70             const TDataType& aDataType,
       
    71             const TUid& aUid,
       
    72             CDocumentHandler* aDocDispatcher,
       
    73             TDocServiceMode aServiceMode );
       
    74 
       
    75         /**
       
    76         * Two-phased constructor.
       
    77         *
       
    78         * @param aDataType      Data type
       
    79         * @param aUid           UID of the handler app
       
    80         * @param aDocDispatcher Pointer to DocumentHandler instance
       
    81         * @param aServiceMode   Are we able to Save, Open or do both
       
    82         *
       
    83         * @return Constructed CDefaultHandler
       
    84         */
       
    85         static CDocDefaultHandler* NewL(
       
    86             const TDataType& aDataType,
       
    87             const TUid& aUid,
       
    88             CDocumentHandler* aDocDispatcher,
       
    89             TDocServiceMode aServiceMode );
       
    90 
       
    91         /**
       
    92         * Destructor.
       
    93         */
       
    94         virtual ~CDocDefaultHandler();
       
    95 
       
    96     protected:
       
    97 
       
    98         /**
       
    99         * C++ constructor.
       
   100         *
       
   101         * @param aDataType      A mime type for the content
       
   102         * @param aUid           UID of the handler app
       
   103         * @param aDocDispatcher Pointer to DocumentHandler instance
       
   104         * @param aServiceMode   Are we able to Save, Open or do both
       
   105         */
       
   106         CDocDefaultHandler(
       
   107             const TDataType& aDataType,
       
   108             const TUid& aUid,
       
   109             CDocumentHandler* aDocDispatcher,
       
   110             TDocServiceMode aServiceMode );
       
   111 
       
   112         /**
       
   113         * EPOC constructor. (Base construction for subclasses.)
       
   114         */
       
   115         void BaseConstructL();
       
   116 
       
   117     private:
       
   118 
       
   119         /**
       
   120         * C++ copy constructor
       
   121         */
       
   122         CDocDefaultHandler( const CDocDefaultHandler& );
       
   123 
       
   124     public:           // Functions from CHandlerBase
       
   125 
       
   126         /**
       
   127         * Get Status code
       
   128         *
       
   129         * @return       A Status code for the latest operation.
       
   130         */
       
   131         TInt Status() const;
       
   132 
       
   133         /*
       
   134         * Get a path where the content was saved.
       
   135         *
       
   136         * @param aPath  Return full file name with a path. If the content
       
   137         *               was not saved into a file, returns some string
       
   138         *               representing the object.
       
   139         *
       
   140         */
       
   141         void GetPath( TDes& aPath ) const;
       
   142 
       
   143         /**
       
   144         * Get the Uid of handler application. 
       
   145         *
       
   146         * @param aUid Uid of the handler application. In case of 
       
   147         *             media files this is MediaGallery's Uid.
       
   148         */
       
   149         void HandlerAppUid( TUid& aUid ) const;
       
   150 
       
   151         /**
       
   152         * By default the saving is possible with the default handler.
       
   153         *
       
   154         * @return       Always ETrue
       
   155         */
       
   156         TBool CanSave() const;
       
   157 
       
   158         /**
       
   159         * By default the launching is possible with the default handler.
       
   160         *
       
   161         * @return       Always ETrue
       
   162         */
       
   163         TBool CanOpen() const;
       
   164 
       
   165         /**
       
   166         * Copy/Move a file to the correct directory. Correct operation
       
   167         * is decided based on DocOperation(). Possible operations are
       
   168         * EDocCopy, EDocMove and EDocSilentMove.
       
   169         *
       
   170         * @param        aAttr File attributes.
       
   171         *
       
   172         * @return       KErrNone if success. If fail, a fail reason
       
   173         *               constant declared in CDocumentHandler.h
       
   174         */
       
   175         virtual TInt CopyOrMoveL( const TUint aAttr );
       
   176         
       
   177         /**
       
   178         * Copy a file to the correct directory. 
       
   179         *
       
   180         * @param        aAttr File attributes.
       
   181         * @param        aSourceFile File handle to copied
       
   182         *
       
   183         * @return       KErrNone if success. If fail, a fail reason
       
   184         *               constant declared in CDocumentHandler.h
       
   185         */
       
   186         virtual TInt CopyHandleL( const RFile& aSourceFile, const TUint aAttr );
       
   187 
       
   188         /**
       
   189         * Save aContent to the correct directory.
       
   190         *
       
   191         * @param aContent A content buffer
       
   192         * @param aAttr    File attributes defined in
       
   193         *                 \epoc32\include\f32file.h
       
   194         * @param aFileName Filename of saved file
       
   195         *
       
   196         * @return       KErrNone if success. If fail, a fail reason
       
   197         *               constant declared in CDocumentHandler.h
       
   198         */
       
   199         TInt SaveTempFileL( 
       
   200             const TDesC8& aContent, 
       
   201             const TUint aAttr,
       
   202             TDes& aFileName );
       
   203 
       
   204         /**
       
   205         * Open a file standalone
       
   206         *
       
   207         * @param aFileHandle File to open 
       
   208         * @return       KErrNone if success. If fail, a fail reason
       
   209         *               constant declared in CDocumentHandler.h
       
   210         */
       
   211         virtual TInt OpenFileL(RFile& aFileHandle);
       
   212 
       
   213         /**
       
   214         * Open a file embedded
       
   215         *
       
   216         * @param aFileHandle File to open  
       
   217         * @return       KErrNone if success. If fail, a fail reason
       
   218         *               constant declared in CDocumentHandler.h
       
   219         */
       
   220         virtual TInt OpenFileEmbeddedL(RFile& aFileHandle);
       
   221 
       
   222         /**
       
   223         * Set source file name.
       
   224         *
       
   225         * @param aFileName A source file name with full path
       
   226         *
       
   227         * @return       KErrNone if success. If fail, a fail reason
       
   228         *               constant declared in CDocumentHandler.h
       
   229         */
       
   230         TInt SetSrcFileName( const TDesC& aFileName );
       
   231 
       
   232         /**
       
   233         * Set destination file name.
       
   234         *
       
   235         * @param aFileName A destination file name without path
       
   236         *
       
   237         * @return       KErrNone if success. If fail, a fail reason
       
   238         *               constant declared in CDocumentHandler.h
       
   239         */
       
   240         TInt SetDestName( const TDesC& aFileName );
       
   241 
       
   242         /**
       
   243         * Set the root path of the memory where the file should be moved.
       
   244         * This method is used only in case of SilentMoveL. 
       
   245         *
       
   246         * @param aRootPath Root path of memory
       
   247         *
       
   248         * @return           KErrNone if success. If fail, a fail reason 
       
   249         *                   constant declared in CDocumentHandler.h
       
   250         */
       
   251         TInt SetRootPath( const TDesC& aRootPath );
       
   252 
       
   253         /**
       
   254         * Creates parameter store for given parameter list.
       
   255         * These parameters will be passed to embedded application.
       
   256         *
       
   257         * @param aParams a parameter list to be passed.
       
   258         */
       
   259         virtual void AddToParamListL(const CAiwGenericParamList& aParams);
       
   260 
       
   261         /**
       
   262         * Returns list of output parameters.
       
   263         *
       
   264         * @param aParams a parameter list to be passed.
       
   265         */
       
   266         const CAiwGenericParamList* OutputParamsL();
       
   267         
       
   268         /**
       
   269         * Utility method for deleting temporary file
       
   270         * CDocumentHandler will use this method for deleting temporary file
       
   271         *
       
   272         * @param aFileName a file to be deleted
       
   273         */
       
   274         void DeleteFile(const TDesC& aFileName);
       
   275         
       
   276         /**
       
   277         * Append a correct file name extension for some content. 
       
   278         * This is needed, because we want quarantee that file extension
       
   279         * is correct with mime-type. Some content types cannot be recognized
       
   280         * based on the data it self. (No header information etc.)
       
   281         *
       
   282         * See related contents and extensions from documenthandlerui.rss:
       
   283         * r_extension_guaranteed_mime_types and r_extension_guaranteed_extensions
       
   284         *
       
   285         * @param aFileName  Append extension to this filename.
       
   286         * @param aDataType  The content type of the file.
       
   287         */
       
   288         void CheckFileNameExtensionL(
       
   289             TDes& aFileName,
       
   290             const TDataType& aDatatype );
       
   291 
       
   292 
       
   293     protected:        // New functions
       
   294 
       
   295         /**
       
   296         * Set the data type of the content. 
       
   297         *
       
   298         * @param aDataType A data type.
       
   299         */
       
   300         void SetDataType( const TDataType& aDataType );
       
   301 
       
   302         /**
       
   303         * Get the data directory. Leaves on errors.
       
   304         *
       
   305         * @param aDataType A data type
       
   306         * @param aUid      An application uid
       
   307         * @param aPath     A path to the data directory. Either main doc dir or
       
   308         *                  a mime type specific directory.
       
   309         * @param aDataSize Size of data
       
   310         * @return          Error code
       
   311         */
       
   312         virtual TInt GetDataDirL(
       
   313             const TDataType& aDataType,
       
   314             const TUid& aUid,
       
   315             TDes& aPath,
       
   316             TInt aDataSize);
       
   317 
       
   318         /**
       
   319         * Check disk space for file, generate filename and
       
   320         * and show save as query to user before copying the file.
       
   321         * CopyOrMoveL and CopyHandleL uses this function.
       
   322         *
       
   323         * @param aDataSize Size of data in bytes
       
   324         * @return          Error code
       
   325         */
       
   326         virtual TInt CopyChecksAndQueriesL(TInt aDataSize);
       
   327 
       
   328         /**
       
   329         * Check disk space for file and generate filename.
       
   330         * SaveTempFileL uses this function.
       
   331         *
       
   332         * @param aContent  Data to save
       
   333         *
       
   334         * @return          Error code
       
   335         */
       
   336         virtual TInt SaveChecksL(const TDesC8& aContent);
       
   337 
       
   338         /**
       
   339         * Query user to overwrite or rename an existing file.
       
   340         *
       
   341         * @param aPath     A absolute path to the file. Will be
       
   342         *                  modified to an unique name.
       
   343         *                  E.g. from data.dat to data(01).dat etc.
       
   344         * @return          EDocFileCancelWrite - User canceled
       
   345         *                  EDocFileOverWrite   - Overwrite
       
   346         *                  EDocFileRenameNew   - New name for content
       
   347         */
       
   348         TDocSaveAsResult SaveAsQueryL( TFileName& aPath );
       
   349 
       
   350         /**
       
   351         * Launch a CAknQueryDialog dialog.
       
   352         *
       
   353         * @param aDialogTypeResID   Resource ID for the dialog.
       
   354         * @param aStringResId       String resource ID for the prompt.
       
   355         * @param aFileName          The resource file name.
       
   356         *
       
   357         * @return                   Error value
       
   358         */
       
   359         TInt RunQueryDialogL(
       
   360             TInt aDialogTypeResID,
       
   361             TInt aStringResID,
       
   362             const TDesC& aFileName );
       
   363 
       
   364         /**
       
   365         * Generate a file name for a nameless buffer. First try to load
       
   366         * default document file name from handler application's resources.
       
   367         * If that fail read a general name from the docHadler's resources.
       
   368         *
       
   369         * @param aUid       An UID for handler application.
       
   370         * @param aFileName  The generated file name will be in here
       
   371         * @param aDataType  A data type
       
   372         * @param aDataSize  Size of data
       
   373         * @return           Error code
       
   374         */
       
   375         virtual TInt GenerateFileNameL(
       
   376             const TUid& aUid,
       
   377             TDes& aFileName,
       
   378             const TDataType& aDataType,
       
   379             TInt aDataSize);
       
   380 
       
   381         /**
       
   382         * Leave if the flash disk space would be under critical level.
       
   383         *
       
   384         * @param bytes      Number of bytes to be writen.
       
   385         */
       
   386         void CheckDiskspaceL( TInt bytes );
       
   387 
       
   388         /**
       
   389         * Check if the file is in use.
       
   390         *
       
   391         * @param aFileName  File name
       
   392         *
       
   393         * @return           ETrue if the file is locked or in use, else EFalse.
       
   394         */
       
   395         TBool IsFileInUse( const TDesC& aFileName );
       
   396 
       
   397         /**
       
   398         * Check if the file is writable.
       
   399         *
       
   400         * @param aFileName  File name
       
   401         *
       
   402         * @return           ETrue if the file is writable
       
   403         *                   and not in use, else EFalse.
       
   404         */
       
   405         TBool IsFileWritableL( const TDesC& aFileName );
       
   406 
       
   407         /**
       
   408         * Run query dialog for asking user if
       
   409         * he wants to rename the file.
       
   410         *
       
   411         * @param aName      File name
       
   412         *
       
   413         * @return           ETrue if yes, else EFalse.
       
   414         */
       
   415         TBool QueryRenameL( const TDesC& aName );
       
   416 
       
   417         /**
       
   418         * Run query dialog for asking user if
       
   419         * he wants to overwrite the old file.
       
   420         *
       
   421         * @param aName      File name
       
   422         *
       
   423         * @return           ETrue if yes, else EFalse.
       
   424         */
       
   425         TBool QueryOverWriteL( const TDesC& aName );
       
   426 
       
   427         /**
       
   428         * Run query dialog for asking the new name for a file
       
   429         *
       
   430         * @param aName      Old file name
       
   431         * @param aMaxLen    Max name length
       
   432         *
       
   433         * @return           ETrue if user pressed ok, EFalse if cancel
       
   434         */
       
   435         TBool QueryNewNameL( TFileName& aName, const TInt aMaxLen );
       
   436 
       
   437         /**
       
   438         * Creates a new name (based on existing name) without asking 
       
   439         * anything from user.
       
   440         */
       
   441         void GenerateTempFileNameL( TFileName& aName, const TInt aMaxLen );
       
   442 
       
   443         /**
       
   444         * Get the operation
       
   445         */
       
   446         TDocOperation DocOperation() const;
       
   447 
       
   448         /**
       
   449         * Set and return a SetAndReturnStatus code for the latest operation.
       
   450         *
       
   451         * @param aErrorCode Any error code defined in global Epoc headers of
       
   452         *        DocumentHandler specific error code.
       
   453         * @return The same error code
       
   454         */
       
   455         TInt SetAndReturnStatus( const TInt aErrorCode );
       
   456 
       
   457         /**
       
   458         * Construct a correct application information data. I.e. Construct
       
   459         * iAppInfo member variable. Special handlers should override this
       
   460         * function if the handler application is not the same as the viewer
       
   461         * application. E.g. Mediagallery vs. ImageViewer.
       
   462         * This function is called from BaseConstructL().
       
   463         */
       
   464         virtual void PopulateAppInfo();
       
   465 
       
   466         /**
       
   467         * Construct a correct application information data defined by aUid.
       
   468         * @param
       
   469         */
       
   470         void PopulateAppInfo( const TUid& aUid );
       
   471 
       
   472         /**
       
   473         * Maximum length for the file name and extension.
       
   474         *
       
   475         * @return Length
       
   476         */
       
   477         virtual TInt MaxNameLen();
       
   478 
       
   479         /**
       
   480         * Is the operation for viewing. 
       
   481         *
       
   482         * @param aOperation One of the API operations.
       
   483         *
       
   484         * @return ETrue if yes, otherwise EFalse.
       
   485         */
       
   486         virtual TBool IsViewerOperation( TDocOperation aOperation );
       
   487 
       
   488         /**
       
   489         * Is the confirmation note allowed.
       
   490         *
       
   491         * @return ETrue if yes, otherwise EFalse.
       
   492         */
       
   493         virtual TBool IsConfNoteAllowed();
       
   494 
       
   495         /**
       
   496         * Should the naming dialog hide the file name extension.
       
   497         *
       
   498         * @return Allways EFalse
       
   499         */
       
   500         virtual TBool HideFileExtension();
       
   501 
       
   502         /**
       
   503         * Replace the filename extension with aExt. If there
       
   504         * is no previous extension just append aExt.
       
   505         *
       
   506         * @param aName The file name in descriptor.
       
   507         * @param aExt  The extension
       
   508         */
       
   509         void ReplaceExtension( TDes& aName, const TDesC& aExt );
       
   510 
       
   511         /**
       
   512         * Add the Document Handler's resources to resource pool.
       
   513         * @see RemoveResources
       
   514         */
       
   515         void AddResourcesL();
       
   516 
       
   517         /**
       
   518         * Remove the Document Handler's resources from resource pool.
       
   519         * @see AddResourcesL
       
   520         */
       
   521         void RemoveResources();
       
   522 
       
   523         /**
       
   524         * Queries if given parameter type is already in input param list.
       
   525         *
       
   526         * @return ETrue if given parameter type is already in list.
       
   527         */
       
   528         TBool IsParameterAlreadyInList(TGenericParamId aId);
       
   529         
       
   530         /**
       
   531         * Finds out wheter this data type can be stored
       
   532         * to MMC. This information can be found from
       
   533         * resource file by Uid value.
       
   534         */
       
   535         TBool CanBeSavedToMmcL();
       
   536 
       
   537         /**
       
   538         * Internal helper function needed for parsing filenames from urls.
       
   539         */
       
   540         void ReverseSlashes(TDes& aString);
       
   541 
       
   542         /**
       
   543         * Get folder for given datatype. Default folder for default datatypes
       
   544         * are defined at documenthandlerui.rss.
       
   545         */
       
   546         TBool GetDefaultFolderForDataTypeL(const TDataType& aDataType, TDes& result);
       
   547 
       
   548         /**
       
   549         * Notifies mediagallery that its content may have been changed.
       
   550         */
       
   551         void UpdateMediaGalleryIfNeededL();
       
   552         
       
   553         /**
       
   554         * Notifies DCF Repository about new file
       
   555         */
       
   556         void UpdateDCFRepositoryL();
       
   557         
       
   558         /**
       
   559         * Forwards server application exit to registered listeners.
       
   560         */   
       
   561         void HandleServerAppExit(TInt aReason);
       
   562 
       
   563         /**
       
   564         * Returns ETrue if data is for installer.
       
   565         */
       
   566         TBool IsInstallerData() const;
       
   567         
       
   568         /**
       
   569         * Initialize aReader with aResourceID. Does not need access to CCoeEnv.
       
   570         */
       
   571         void CreateDocResourceReaderLC(TResourceReader& aReader, TInt aResourceID);
       
   572 
       
   573     private:
       
   574 
       
   575         /**
       
   576         * Prohibit the assignment operator
       
   577         */
       
   578         CDocDefaultHandler operator=( const CDocDefaultHandler& );
       
   579 
       
   580         /**
       
   581         * Set temporary path to aPath.
       
   582         */
       
   583         TInt SetTemporaryPathL(TInt aDataSize, TDes& aPath, TBool aPrivate);
       
   584         
       
   585         /**
       
   586         * Check if it is allowed to save content to MMC. Save result
       
   587         * to iMMCSaveAllowed member variable.
       
   588         */
       
   589         void IsMMCSaveAllowedL(const TDesC& aSourceFile);
       
   590         
       
   591         /**
       
   592         * Check if MMC card is locked        
       
   593         */
       
   594         TBool IsMMCLocked();
       
   595         
       
   596         /**
       
   597         * Mount MMC drive.        
       
   598         */
       
   599         TInt TryMountMMC();
       
   600         
       
   601         /**
       
   602         * Check if it is allowed to save content to MMC. Save result
       
   603         * to iMMCSaveAllowed member variable.
       
   604         */
       
   605         void IsMMCSaveAllowedL(const RFile& aSourceFile);
       
   606         
       
   607         /**
       
   608         * Used for notifying server app exit with CIdle when
       
   609         * OpenFileEmbedded operation has actually opened stand-alone.
       
   610         */
       
   611         static TInt IdleNotifyServerAppExit( TAny* aParam );
       
   612         
       
   613         /**
       
   614         * Finds correct text for Save confirmation note.
       
   615         *
       
   616         * @param aText result of the query will be stored here.
       
   617         */
       
   618         void ConfirmationNoteTextL( TPtr& aText );
       
   619         
       
   620         /**
       
   621         * Finds correct text for Save wait note.
       
   622         *
       
   623         * @param aText result of the query will be stored here.
       
   624         */        
       
   625         void WaitNoteTextL( TPtr& aText );
       
   626         
       
   627         /**
       
   628         * Resolve correct caption text for notes.
       
   629         *
       
   630         * @param aCaption result will be stored here.
       
   631         */  
       
   632         void ResolveCaptionName( TApaAppCaption& aCaption );
       
   633 #ifdef RD_MULTIPLE_DRIVE 
       
   634          /**
       
   635          * check to see if the content can only be saved to Phone memory
       
   636          *
       
   637          * @param 
       
   638          */        
       
   639         TBool CanOnlyBeSavedToPhoneMemoryL();  
       
   640         /**
       
   641          * gets the number of system drives available in phone including phone memory
       
   642          * This should not be called when RD_MULTIPLE_DRIVE flag is diabled
       
   643          * @param 
       
   644          */       
       
   645         TInt GetAvailableDrivesCountL();
       
   646         /**
       
   647          * check drive availability ie is it available for user read/write operations
       
   648          * This should not be called when RD_MULTIPLE_DRIVE flag is diabled
       
   649          * @param 
       
   650          */  
       
   651         TBool IsDriveAvailableL(const TInt & aDriveNumber);
       
   652 #endif
       
   653     protected:
       
   654 
       
   655         /*
       
   656         * Application list server session client
       
   657         */
       
   658         RApaLsSession* iApaLs;
       
   659 
       
   660         /**
       
   661         * Data type of the content
       
   662         */
       
   663         TDataType iDataType;
       
   664 
       
   665         /**
       
   666         * Destination filename
       
   667         */
       
   668         TFileName iDestFile;
       
   669 
       
   670         /**
       
   671         * DocumentHandler (Dispatcher object)
       
   672         */
       
   673         CDocumentHandler* iDocDispatcher;
       
   674 
       
   675         /**
       
   676         * FileManager
       
   677         */
       
   678         CFileMan* iFileManager;
       
   679 
       
   680         /**
       
   681         * FileServer
       
   682         */
       
   683         RFs iFs;
       
   684 
       
   685         /**
       
   686         * Is the content saved to temp dir. Remember to delete temp files!
       
   687         */
       
   688         TBool iSavedAsTemp;
       
   689 
       
   690         /**
       
   691         * Flag for service mode.
       
   692         */
       
   693         TDocServiceMode iServiceMode;
       
   694 
       
   695         /**
       
   696         * Source filename
       
   697         */
       
   698         TFileName iSourceFile;
       
   699 
       
   700         /**
       
   701         * Request status for the latest operation.
       
   702         */
       
   703         TInt iStatus;
       
   704 
       
   705         /**
       
   706         * Handler applications UID
       
   707         */
       
   708         TUid iUid;
       
   709 
       
   710         /**
       
   711         * Application information
       
   712         */
       
   713         TApaAppInfo iAppInfo;
       
   714 
       
   715         /**
       
   716         * Is the exit already notified.
       
   717         */
       
   718         TBool iExitNotified;
       
   719 
       
   720         /**
       
   721         * Generic param list for parameter passing
       
   722         */
       
   723         CAiwGenericParamList* iAiwParams;
       
   724 
       
   725         /**
       
   726         * Generic param list for parameter passing
       
   727         */
       
   728         CAiwGenericParamList* iOutAiwParams;
       
   729 
       
   730         /**
       
   731         * Handle to open file service framework.
       
   732         */
       
   733         CAknOpenFileService* iOpenService; 
       
   734 
       
   735         /**
       
   736         * List of mime types whose extension will be overriden when saved.
       
   737         */
       
   738         CDesCArrayFlat* iMimeExtensions;
       
   739 
       
   740         /**
       
   741         * List of extensions mapping to iMimeExtensions list.
       
   742         */
       
   743         CDesCArrayFlat* iExtensions;
       
   744 
       
   745         /**
       
   746         * Is data media gallery data.
       
   747         */
       
   748         TBool iMediaGalleryData;
       
   749 
       
   750         /**
       
   751         * Root path of memory. This variable is used only in case of SilentMoveL.
       
   752         */
       
   753         TBuf<32> iRootPath;
       
   754         
       
   755         /**
       
   756         * Is save to MMC allowed for DRM encrypted content.
       
   757         */
       
   758         TBool iMMCSaveAllowed;
       
   759 
       
   760         /**
       
   761         * Used for notifying server app exit with CIdle when
       
   762         * OpenFileEmbedded operation has actually opened stand-alone.
       
   763         */
       
   764         CIdle* iIdle;        
       
   765     };
       
   766 
       
   767 #endif // !defined DEFAULTHANDLER_
       
   768 
       
   769 // End of File