localconnectivityservice/obexserviceman/utils/inc/obexutilslaunchwaiter.h
branchRCL_3
changeset 39 4096754ee773
parent 38 3dcb815346df
child 40 52a167391590
equal deleted inserted replaced
38:3dcb815346df 39:4096754ee773
     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 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef COBEXUTILSLAUNCHWAITER_H
       
    20 #define COBEXUTILSLAUNCHWAITER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <apparc.h>
       
    25 
       
    26 #include <AknServerApp.h>
       
    27 #include <msvapi.h>
       
    28 #include <obexutilsdialog.h>
       
    29 
       
    30 class CDocumentHandler;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  A class waiting for editing of an embedded document to complete.
       
    36 */
       
    37 
       
    38 NONSHARABLE_CLASS( CObexUtilsLaunchWaiter ) : public CMsvOperation, public MAknServerAppExitObserver
       
    39 	{
       
    40     public: // Constructors and destructor
       
    41 
       
    42         /**
       
    43         * Two-phased constructor.
       
    44         */
       
    45 	    static CObexUtilsLaunchWaiter* NewLC( 
       
    46         	CMsvSession& aMsvSession,
       
    47         	CMsvEntry* aMessage,
       
    48             TRequestStatus& aObserverRequestStatus );
       
    49 
       
    50         /**
       
    51         * Two-phased constructor.
       
    52         */
       
    53     	static CObexUtilsLaunchWaiter* NewL( 
       
    54         	CMsvSession& aMsvSession,
       
    55         	CMsvEntry* aMessage,
       
    56             TRequestStatus& aObserverRequestStatus );
       
    57 
       
    58         /**
       
    59         * Destructor.
       
    60         */
       
    61         ~CObexUtilsLaunchWaiter();
       
    62 
       
    63     public: // Functions from base classes		
       
    64        
       
    65         /**
       
    66         * From MAknServerAppExitObserve Editing has completed.
       
    67         * @param TInt The exit mode including document state.
       
    68         * @return None.
       
    69         */
       
    70         void HandleServerAppExit(TInt aReason);
       
    71 
       
    72         /**
       
    73         * From CActive A request has been completed.
       
    74         * @return None.
       
    75         */
       
    76 	    void RunL();
       
    77 
       
    78         /**
       
    79         * From CActive A request has been cancelled.
       
    80         * @return None.
       
    81         */
       
    82 	    void DoCancel();
       
    83 	    
       
    84         /**
       
    85         * ProgressL
       
    86         * @return TDesC8&, progress
       
    87         */
       
    88         virtual const TDesC8& ProgressL();
       
    89 
       
    90     private:
       
    91 
       
    92         /**
       
    93         * C++ default constructor.
       
    94         */
       
    95 	    CObexUtilsLaunchWaiter(
       
    96         	CMsvSession& aMsvSession,
       
    97         	CMsvEntry* aMessage,
       
    98             TRequestStatus& aObserverRequestStatus );
       
    99             
       
   100         void ConstructL( CMsvEntry* aMessage );
       
   101         
       
   102         /**
       
   103          * Locate the file used to fix the broken link in Inbox
       
   104          * @param aFileName the file including full path user selects  ( on return )
       
   105          * @param anOldFileName old file name including full path saved in attachment.
       
   106          * @return TBool 
       
   107          */
       
   108         TBool LocateFileL(TFileName& aFileName, const TFileName& anOldFileName);
       
   109         
       
   110         /**
       
   111          * Launch Selection dialog for user to locate the file
       
   112          * @param aFileName the file including full path user selects  ( on return )
       
   113          * @param anOldFileName old file name excluding full path saved in attachment.
       
   114          * @return TBool
       
   115          */
       
   116         TBool LaunchFileSelectionDialogL(TFileName& aFileName, const TFileName& anOldFileName);
       
   117         
       
   118         /**
       
   119          * Check the drive if available.
       
   120          * @param aDriveNumber enum TDriveNumber defined in f32file.h
       
   121          * @return Symbian error code
       
   122          */
       
   123         TInt CheckDriveL(TDriveNumber aDriveNumber); 
       
   124         
       
   125         /**
       
   126          * Check if the file is saved in memory card.
       
   127          * @param aFileName full path and name of the file 
       
   128          * @return  TDriveNumber if saved in E or F drive; 
       
   129          *          otherwise KErrNotFound. 
       
   130          */
       
   131         TInt CheckIfSaveInMMC(const TFileName& aFileName);
       
   132 
       
   133     private:
       
   134         CDocumentHandler* iDocumentHandler;
       
   135 	};
       
   136 
       
   137 #endif      // COBEXUTILSLAUNCHWAITER_H
       
   138 
       
   139 // End of File