browserutilities/schemehandler/SchemeDispatcher/inc/FileHandler.h
changeset 0 dd21522fd290
child 36 0ed94ceaa377
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     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 the License "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 *      Declaration of Scheme handler interface implementation for file:// scheme
       
    16 *      
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef FILE_HANDLER_H
       
    22 #define FILE_HANDLER_H
       
    23 
       
    24 // INCLUDES
       
    25 
       
    26 #include "BaseHandler.h"
       
    27 #include <e32base.h>
       
    28 #include <documentHandler.h>
       
    29 #include <eikdoc.h>
       
    30 #include <apparc.h>
       
    31 #include <BrowserLauncher.h>
       
    32 
       
    33 // FORWARD DECLARATION
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 * Scheme Handler IF implementation class for file scheme
       
    39 */
       
    40 class CFileHandler : public CBaseHandler,
       
    41                      public MAknServerAppExitObserver
       
    42     {
       
    43     public:     // Constructors and destructor
       
    44 
       
    45         /**
       
    46         * Two phased constructor. Leaves on failure.
       
    47         * @param - aUrl
       
    48         * @return The created object.
       
    49         */      
       
    50 		static CFileHandler* NewL( const TDesC& aUrl );
       
    51 
       
    52        /**
       
    53         * Destructor.
       
    54         */      
       
    55         virtual ~CFileHandler();
       
    56 
       
    57 	private: // Constructors
       
    58 
       
    59         /**
       
    60         * Constructor.
       
    61         */      
       
    62 		CFileHandler();
       
    63 
       
    64         /**
       
    65         * Second phase constructor. Leaves on failure.
       
    66 		* @param - aUrl
       
    67         */      
       
    68 		void ConstructL( const TDesC& aUrl );
       
    69 
       
    70     private: // Functions from base classes
       
    71 
       
    72 		/**
       
    73 		* Url Handler with embedding
       
    74 		* @param -
       
    75 		*/
       
    76 		void HandleUrlEmbeddedL();
       
    77 
       
    78 		/**
       
    79 		* Url Handler without embedding
       
    80 		* @param -
       
    81 		*/
       
    82 		void HandleUrlStandaloneL();
       
    83 
       
    84 		/**
       
    85 		 *
       
    86 		 * Implements the required behaviour when the editing of an embedded
       
    87 		 * document completes.
       
    88 		 *
       
    89 		 * @param     
       
    90 		 *            Indicates the state of the document.
       
    91 		 */
       
    92         void HandleServerAppExit(TInt aReason);
       
    93 
       
    94 		/**
       
    95         * Convert Url to file path. Leaves on failure.
       
    96         * @param 
       
    97         * @return 
       
    98         */    
       
    99 		void ConvertUrlToPathL( TDes& aLiteral );
       
   100 
       
   101 		/**
       
   102         * Convert Url to file path. Leaves on failure.
       
   103         * @param 
       
   104         * @return 
       
   105         */  
       
   106         void ConvertPathToUrlL( TDes& aLiteral );
       
   107 
       
   108 		/**
       
   109         * Convert .
       
   110         * @param 
       
   111         * @return 
       
   112         */  
       
   113         HBufC* ParseFileSchemeLC( TBool& aDocHandler );
       
   114 
       
   115 	private: // Data
       
   116 
       
   117 		CDocumentHandler* iDocHandler; ///< Owned.
       
   118         CEikDocument* iDoc;            ///< Owned.
       
   119         CBrowserLauncher* iLauncher;   ///< Owned.       
       
   120 	};
       
   121 
       
   122 #endif /* def FILE_HANDLER_H */