csxhelp/HelpEngine/inc/CSXHXMLParseHandler.h
branchRCL_3
changeset 44 12f60d9a73b3
parent 40 0d1adf67ec1b
child 45 cbffe13eac63
equal deleted inserted replaced
40:0d1adf67ec1b 44:12f60d9a73b3
     1 /*
       
     2 * Copyright (c) 2006 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:  CCSXHXMLParseHandler class declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __CCSXHXMLPARSEHANDLER_H__
       
    20 #define __CCSXHXMLPARSEHANDLER_H__
       
    21 
       
    22 #include <coecntrl.h> // CCoeControl
       
    23 #include <MSenContentHandlerClient.h>
       
    24 #include <xml/taginfo.h>
       
    25 #include <xml/attribute.h>
       
    26 
       
    27 class CCSXHGenericTOC2;
       
    28 class CCSXHGenericTOC1;
       
    29 class CCSXHHtmlTOC1;
       
    30 class CCSXHHelpDataBase;
       
    31 class CCSXHHelpContentBase;
       
    32 class CCSXHHTMLContentParser;
       
    33 /** 
       
    34 * @class CCSXHXMLParseHandler
       
    35 * This class is used retrive the data from XML file
       
    36 */
       
    37 class CCSXHXMLParseHandler : public CBase, public MSenContentHandlerClient
       
    38     {
       
    39 	public:
       
    40 /** 
       
    41 *  @function CCSXHXMLParseHandler
       
    42 *  @since S60 3.2
       
    43 *  Construct a CCSXHXMLParseHandler 
       
    44 *  @param aCoeEnv 	- Control Environment 
       
    45 */	
       
    46 		CCSXHXMLParseHandler(CCoeEnv * aCoeEnv);
       
    47 		
       
    48 		virtual ~CCSXHXMLParseHandler();
       
    49 /** 
       
    50 *  @function StartDocument
       
    51 *  @since S60 3.2
       
    52 *  Receive notification of the beginning of a document. 
       
    53 *  @return KErrNone or some of the system-wide Symbian error codes 
       
    54 */	
       
    55 		TInt StartDocument(); 
       
    56 /** 
       
    57 *  @function EndDocument
       
    58 *  @since S60 3.2
       
    59 *  Receive notification of the end of a document. 
       
    60 *  @return KErrNone or some of the system-wide Symbian error codes 
       
    61 */	
       
    62 		TInt EndDocument();
       
    63 
       
    64 /** 
       
    65 *  @function SetDataBasePtr
       
    66 *  @since S60 3.2
       
    67 *  Sets DataBase Pointer
       
    68 */
       
    69 		void  SetDataBasePtr(CCSXHHelpDataBase *aDataBase);		
       
    70 /** 
       
    71 *  @function GetApplicationName
       
    72 *  @since S60 3.2
       
    73 *  Get the Application Name from Meta.xml
       
    74 *  @return Application Name
       
    75 */
       
    76 		TDesC& GetApplicationName();
       
    77 		
       
    78 		TPtr GetFeatureIds();
       
    79  		
       
    80  	protected:
       
    81 /** 
       
    82 *  @function SetAppNameFlagL
       
    83 *  @since S60 3.2
       
    84 *  Set the Application Flag Based on local Name, ResourceID
       
    85 *  @param alocalName - TagName read from XML file
       
    86 *		  ResourceId - Used to Retrive the TagName from resource file   	
       
    87 */		
       
    88  		TBool SetAppNameFlag(const TDesC8 & alocalName,const TDesC& aAppTag);		
       
    89  		
       
    90  	protected:
       
    91 		TBuf<KMaxFileName> iApplicationName;
       
    92 		HBufC* iFeatureIds;		
       
    93 		TBool iIsAppName;
       
    94 		CCSXHHelpDataBase* iDataBase;
       
    95 		CCoeEnv* iCoeEnv;		
       
    96 		
       
    97 	};
       
    98 
       
    99 
       
   100 /** 
       
   101 * @class CCSXHXMLParseHandler_MetaFile
       
   102 * This class is used retrive the data from Meta.xml file
       
   103 */	
       
   104 class CCSXHXMLParseHandler_MasterMetaFile : public CCSXHXMLParseHandler
       
   105 	{
       
   106 	public:
       
   107 /** 
       
   108 *  @function NewL
       
   109 *  @since S60 3.2
       
   110 *  Construct a CCSXHXMLParseHandler_IndexFile 
       
   111 *  @param aCoeEnv 	- Control Environment 
       
   112 *  @retrun a CCSXHXMLParseHandler_IndexFile pointer
       
   113 */
       
   114 		static CCSXHXMLParseHandler_MasterMetaFile* NewL(CCoeEnv * aCoeEnv);
       
   115 	protected:
       
   116 /** 
       
   117 *  @function CCSXHXMLParseHandler_IndexFile
       
   118 *  @since S60 3.2
       
   119 *  Construct a CCSXHXMLParseHandler_IndexFile 
       
   120 *  @param aCoeEnv 	- Control Environment 
       
   121 */	
       
   122 		CCSXHXMLParseHandler_MasterMetaFile(CCoeEnv * aCoeEnv);		
       
   123 	public:	
       
   124 /** 
       
   125 *  @function StartElement
       
   126 *  @since S60 3.2
       
   127 *  Receive notification of the beginning of an element
       
   128 *  @param aURI		 -  The Namespace URI, or the empty string 
       
   129 						if the element has no Namespace URI or
       
   130 						if Namespace processing is not being performed.  
       
   131 		  aLocalName -  The local name (without prefix)  
       
   132 		  aName		 -  The qualified name  
       
   133 		  apAttrs	 -  The attributes attached to the element. 
       
   134 		  				If there are no attributes, it shall be 
       
   135 		  				an empty array.Namespaces declared in the current 
       
   136 		  				element will be located in the array also 
       
   137 *  @return KErrNone or some of the system-wide Symbian error codes 
       
   138 */	
       
   139 		TInt StartElement (const TDesC8 &aURI, const TDesC8 &aLocalName, 
       
   140 		const TDesC8 &aName, const RAttributeArray &apAttrs);
       
   141 /** 
       
   142 *  @function SetHtmlContentParserPtr
       
   143 *  @since S60 3.2
       
   144 *  Set the pointer of the content parser
       
   145 *  @param aParser   -  Pointer to an html content parser
       
   146 */			 
       
   147 		void SetHtmlContentParserPtr(CCSXHHTMLContentParser* aParser);
       
   148 		
       
   149 	private:
       
   150 /** 
       
   151 *  @function CreateTOC2ObjectsL
       
   152 *  @since S60 3.2
       
   153 *  Create TOC2 objects for Html TOC2 
       
   154 *  @param aAttributes - The attributes attached to the element. 
       
   155 */	
       
   156 		void CreateTOC1ObjectsL(const RAttributeArray & aAttributes);
       
   157 	    
       
   158 	    CCSXHHTMLContentParser *iParser;
       
   159 	    
       
   160 	    TInt iDrive;
       
   161 	};
       
   162 
       
   163 /** 
       
   164 * @class CCSXHXMLParseHandler_MetaFile
       
   165 * This class is used retrive the data from Meta.xml file
       
   166 */	
       
   167 class CCSXHXMLParseHandler_MetaFile : public CCSXHXMLParseHandler
       
   168 	{
       
   169 	public:
       
   170 /** 
       
   171 *  @function CCSXHXMLParseHandler_MetaFile
       
   172 *  @since S60 3.2
       
   173 *  Construct a CCSXHXMLParseHandler_MetaFile 
       
   174 *  @param aCoeEnv 	- Control Environment 
       
   175 *  @retrun a CCSXHXMLParseHandler_MetaFile pointer
       
   176 */	
       
   177 		static CCSXHXMLParseHandler_MetaFile* NewL(CCoeEnv * aCoeEnv);
       
   178 	protected:
       
   179 /** 
       
   180 *  @function CCSXHXMLParseHandler_MetaFile
       
   181 *  @since S60 3.2
       
   182 *  Construct a CCSXHXMLParseHandler_MetaFile 
       
   183 *  @param aCoeEnv 	- Control Environment 
       
   184 */
       
   185 		CCSXHXMLParseHandler_MetaFile(CCoeEnv * aCoeEnv);
       
   186 	public:	
       
   187 /** 
       
   188 *  @function StartElement
       
   189 *  @since S60 3.2
       
   190 *  Receive notification of the beginning of an element
       
   191 *  @param aURI		 -  The Namespace URI, or the empty string 
       
   192 						if the element has no Namespace URI or
       
   193 						if Namespace processing is not being performed.  
       
   194 		  aLocalName -  The local name (without prefix)  
       
   195 		  aName		 -  The qualified name  
       
   196 		  apAttrs	 -  The attributes attached to the element. 
       
   197 		  				If there are no attributes, it shall be 
       
   198 		  				an empty array.Namespaces declared in the current 
       
   199 		  				element will be located in the array also 
       
   200 *  @return KErrNone or some of the system-wide Symbian error codes 
       
   201 */	
       
   202 		TInt StartElement (const TDesC8 &aURI, const TDesC8 &aLocalName, 
       
   203 		const TDesC8 &aName, const RAttributeArray &apAttrs);
       
   204 /** 
       
   205 *  @function EndElement
       
   206 *  @since S60 3.2
       
   207 *  Receive notification of the end of an element
       
   208 *  @param aURI		 -  The Namespace URI, or the empty string 
       
   209 						if the element has no Namespace URI or
       
   210 						if Namespace processing is not being performed.  
       
   211 		  aLocalName -  The local name (without prefix)  
       
   212 		  aName		 -  The qualified name  
       
   213 *  @return KErrNone or some of the system-wide Symbian error codes 
       
   214 */		
       
   215 		TInt EndElement  (  const TDesC8 &aURI,const TDesC8 &aLocalName,const TDesC8 &aName);
       
   216 /** 
       
   217 *  @function Characters
       
   218 *  @since S60 3.2
       
   219 *  Receive notification inside an element
       
   220 *  @param aBuff   -  The characters.  
       
   221 *		  aStart  -  The start position in the character buffer.  
       
   222 *		  aLength -  The number of characters to use from the character buffer.  
       
   223 *  @return KErrNone or some of the system-wide Symbian error codes 
       
   224 */		
       
   225 		TInt Characters (const TDesC8 &aBuff, const TInt aStart,
       
   226 			 const TInt aLength); 					
       
   227 		
       
   228 		TInt32 Priority();
       
   229 		
       
   230 	private:
       
   231 		TBuf<8> iPriority;
       
   232 		TBool iIsPriority;
       
   233 	};
       
   234 
       
   235 class CCSXHXMLParseHandler_IndexFile : public CCSXHXMLParseHandler
       
   236 	{
       
   237 	public:
       
   238 /** 
       
   239 *  @function NewL
       
   240 *  @since S60 3.2
       
   241 *  Construct a CCSXHXMLParseHandler_IndexFile 
       
   242 *  @param aCoeEnv 	- Control Environment 
       
   243 *  @retrun a CCSXHXMLParseHandler_IndexFile pointer
       
   244 */
       
   245 		static CCSXHXMLParseHandler_IndexFile* NewL(CCoeEnv * aCoeEnv);
       
   246 	protected:
       
   247 /** 
       
   248 *  @function CCSXHXMLParseHandler_IndexFile
       
   249 *  @since S60 3.2
       
   250 *  Construct a CCSXHXMLParseHandler_IndexFile 
       
   251 *  @param aCoeEnv 	- Control Environment 
       
   252 */	
       
   253 		CCSXHXMLParseHandler_IndexFile(CCoeEnv * aCoeEnv);		
       
   254 	public:	
       
   255 /** 
       
   256 *  @function StartElement
       
   257 *  @since S60 3.2
       
   258 *  Receive notification of the beginning of an element
       
   259 *  @param aURI		 -  The Namespace URI, or the empty string 
       
   260 						if the element has no Namespace URI or
       
   261 						if Namespace processing is not being performed.  
       
   262 		  aLocalName -  The local name (without prefix)  
       
   263 		  aName		 -  The qualified name  
       
   264 		  apAttrs	 -  The attributes attached to the element. 
       
   265 		  				If there are no attributes, it shall be 
       
   266 		  				an empty array.Namespaces declared in the current 
       
   267 		  				element will be located in the array also 
       
   268 *  @return KErrNone or some of the system-wide Symbian error codes 
       
   269 */	
       
   270 		TInt StartElement (const TDesC8 &aURI, const TDesC8 &aLocalName, 
       
   271 		const TDesC8 &aName, const RAttributeArray &apAttrs);
       
   272 /** 
       
   273 *  @function SetArray
       
   274 *  @since S60 3.2
       
   275 *  Get the pointer & fill the contents from Index.xml
       
   276 *  @param aHTMLlist   -  Pointer to an Array
       
   277 */			 
       
   278 		void SetArray(RPointerArray<CCSXHHelpContentBase> *aHTMLlist);	
       
   279 /** 
       
   280 *  @function SetGenericTOC1Object
       
   281 *  @since S60 3.2
       
   282 *  Set GenericTOC1 Object
       
   283 *  @param aParent   -  Generic TOC1 Object
       
   284 */			 
       
   285 		void SetGenericTOC1Object(CCSXHGenericTOC1& aParent); 		
       
   286 /** 
       
   287 *  @function SetPath
       
   288 *  @since S60 3.2
       
   289 *  Set Html file path
       
   290 *  @param aFilePath   -  Set Html file path
       
   291 */		
       
   292 		void SetPath(const TDesC&  aFilePath);
       
   293 		
       
   294 		void SetHtmlContentParserPtr(CCSXHHTMLContentParser* aParser);		
       
   295 	private:
       
   296 /** 
       
   297 *  @function CreateTOC2ObjectsL
       
   298 *  @since S60 3.2
       
   299 *  Create TOC2 objects for Html TOC2 
       
   300 *  @param aAttributes - The attributes attached to the element. 
       
   301 */	
       
   302 		void CreateTOC2ObjectsL(const RAttributeArray & aAttributes);
       
   303 		TBuf<KMaxFileName> iCompressString,iHTMLPageName,iFilePath; 					
       
   304 		RPointerArray<CCSXHHelpContentBase>* iTOC2Array; 
       
   305 		CCSXHGenericTOC1* iParent;	
       
   306 		CCSXHHTMLContentParser *iParser;
       
   307 	};
       
   308 
       
   309 	
       
   310 class CCSXHXMLParseHandler_Kywd : public CCSXHXMLParseHandler
       
   311 	{
       
   312 	public:
       
   313 /** 
       
   314 *  @function NewL
       
   315 *  @since S60 3.2
       
   316 *  Construct a CCSXHXMLParseHandler_Kywd 
       
   317 *  @param aCoeEnv 	- Control Environment 
       
   318 *  @retrun a CCSXHXMLParseHandler_Kywd pointer
       
   319 */
       
   320 		static CCSXHXMLParseHandler_Kywd* NewL(CCoeEnv * aCoeEnv);
       
   321 	protected:
       
   322 /** 
       
   323 *  @function CCSXHXMLParseHandler_Kywd
       
   324 *  @since S60 3.2
       
   325 *  Construct a CCSXHXMLParseHandler_Kywd 
       
   326 *  @param aCoeEnv 	- Control Environment 
       
   327 */	
       
   328 		CCSXHXMLParseHandler_Kywd(CCoeEnv * aCoeEnv);	
       
   329 	public:
       
   330 /** 
       
   331 *  @function StartElement
       
   332 *  @since S60 3.2
       
   333 *  Receive notification of the beginning of an element
       
   334 *  @param aURI		 -  The Namespace URI, or the empty string 
       
   335 						if the element has no Namespace URI or
       
   336 						if Namespace processing is not being performed.  
       
   337 		  aLocalName -  The local name (without prefix)  
       
   338 		  aName		 -  The qualified name  
       
   339 		  apAttrs	 -  The attributes attached to the element. 
       
   340 		  				If there are no attributes, it shall be 
       
   341 		  				an empty array.Namespaces declared in the current 
       
   342 		  				element will be located in the array also 
       
   343 *  @return KErrNone or some of the system-wide Symbian error codes 
       
   344 */	
       
   345 		TInt StartElement (const TDesC8 &aURI, const TDesC8 &aLocalName, 
       
   346 		const TDesC8 &aName, const RAttributeArray &apAttrs);
       
   347 /** 
       
   348 *  @function EndElement
       
   349 *  @since S60 3.2
       
   350 *  Receive notification of the end of an element
       
   351 *  @param aURI		 -  The Namespace URI, or the empty string 
       
   352 						if the element has no Namespace URI or
       
   353 						if Namespace processing is not being performed.  
       
   354 		  aLocalName -  The local name (without prefix)  
       
   355 		  aName		 -  The qualified name  
       
   356 *  @return KErrNone or some of the system-wide Symbian error codes 
       
   357 */		
       
   358 		TInt EndElement  (  const TDesC8 &aURI,const TDesC8 &aLocalName,const TDesC8 &aName);
       
   359 /** 
       
   360 *  @function Characters
       
   361 *  @since S60 3.2
       
   362 *  Receive notification inside an element
       
   363 *  @param aBuff   -  The characters.  
       
   364 *		  aStart  -  The start position in the character buffer.  
       
   365 *		  aLength -  The number of characters to use from the character buffer.  
       
   366 *  @return KErrNone or some of the system-wide Symbian error codes 
       
   367 */		
       
   368 		TInt Characters (const TDesC8 &aBuff, const TInt aStart,
       
   369 			 const TInt aLength); 
       
   370 
       
   371 /** 
       
   372 *  @function SetTOC1Title
       
   373 *  @since S60 3.2
       
   374 *  Set TOC1 Name 
       
   375 *  @param aName   -  TOC1 Name  
       
   376 */
       
   377  		void SetTOC1Title(const TDesC& aName);
       
   378 /** 
       
   379 *  @function SetCurrentHtmlToc1
       
   380 *  @since S60 3.2
       
   381 *  Set HtmlTOC1 Object
       
   382 *  @param aCurrentHtmlToc1   -  Pointyer to HtmlTOC1 Object  
       
   383 */
       
   384 		void SetCurrentHtmlToc1(CCSXHHtmlTOC1 *aCurrentHtmlToc1);
       
   385 /** 
       
   386 *  @function SetIsTOC2
       
   387 *  @since S60 3.2
       
   388 *  Set the flag if parsing in order to get TOC2 Objects, EFalse otherwise
       
   389 *  @param aCurrentHtmlToc1   -  Pointer to HtmlTOC1 Object  
       
   390 */
       
   391 		void SetIsTOC2(TBool aFlag);		
       
   392 
       
   393 /** 
       
   394 *  @function SetPath
       
   395 *  @since S60 3.2
       
   396 *  Set Html file path
       
   397 *  @param aFilePath   -  Set Html file path
       
   398 */		
       
   399 		void SetPath(const TDesC&  aFilePath);
       
   400 		
       
   401 		void SetHtmlContentParserPtr(CCSXHHTMLContentParser* aParser);
       
   402 		
       
   403 	private:
       
   404 /** 
       
   405 *  @function CreateTOC2ObjectsforKeywordSearch
       
   406 *  @since S60 3.2
       
   407 *  Get the Info In order to Create TOC2 objects for Html Keyword 
       
   408 *  @param aName  - TagName
       
   409 *		  aAttrs - The attributes attached to the element. 
       
   410 */
       
   411 		void CreateTOC2ObjectsforKeywordSearch(const TDesC8 &aName,const RAttributeArray& aAttrs); 		
       
   412 /** 
       
   413 *  @function CreateTOC2ObjectsforKeywordSearchL
       
   414 *  @since S60 3.2
       
   415 *  Creates TOC2 objects for Html Keyword And Insert into Database  
       
   416 */
       
   417 		void CreateAndInsertKywdL();		
       
   418  		TBuf<KMaxFileName> iHTMLPageName,iKeywordSearchTOC2TitleName; 					
       
   419  		TBuf<KMaxFileName> iTOC1Name,iFilePath;
       
   420  		CCSXHHtmlTOC1 *iCurrentHtmlToc1;
       
   421  		TBool iIsTargetName,iIsTOC2View;
       
   422  		CCSXHHTMLContentParser* iParser;
       
   423 	};	
       
   424 
       
   425 class CCSXHXMLParseHandler_MasterKywd : public CCSXHXMLParseHandler
       
   426 	{
       
   427 	public:
       
   428 /** 
       
   429 *  @function NewL
       
   430 *  @since S60 3.2
       
   431 *  Construct a CCSXHXMLParseHandler_Kywd 
       
   432 *  @param aCoeEnv 	- Control Environment 
       
   433 *  @retrun a CCSXHXMLParseHandler_Kywd pointer
       
   434 */
       
   435 		static CCSXHXMLParseHandler_MasterKywd* NewL(CCoeEnv * aCoeEnv);
       
   436 	protected:
       
   437 /** 
       
   438 *  @function CCSXHXMLParseHandler_Kywd
       
   439 *  @since S60 3.2
       
   440 *  Construct a CCSXHXMLParseHandler_Kywd 
       
   441 *  @param aCoeEnv 	- Control Environment 
       
   442 */	
       
   443 		CCSXHXMLParseHandler_MasterKywd(CCoeEnv * aCoeEnv);	
       
   444 		
       
   445 	public:
       
   446 /** 
       
   447 *  @function StartElement
       
   448 *  @since S60 3.2
       
   449 *  Receive notification of the beginning of an element
       
   450 *  @param aURI		 -  The Namespace URI, or the empty string 
       
   451 						if the element has no Namespace URI or
       
   452 						if Namespace processing is not being performed.  
       
   453 		  aLocalName -  The local name (without prefix)  
       
   454 		  aName		 -  The qualified name  
       
   455 		  apAttrs	 -  The attributes attached to the element. 
       
   456 		  				If there are no attributes, it shall be 
       
   457 		  				an empty array.Namespaces declared in the current 
       
   458 		  				element will be located in the array also 
       
   459 *  @return KErrNone or some of the system-wide Symbian error codes 
       
   460 */	
       
   461 		TInt StartElement (const TDesC8 &aURI, const TDesC8 &aLocalName, 
       
   462 		const TDesC8 &aName, const RAttributeArray &apAttrs);
       
   463 /** 
       
   464 *  @function CreateTOC1ObjectsL
       
   465 *  @since S60 3.2
       
   466 *  Create TOC1 objects for Keywords
       
   467 *  @param aAttributes - The attributes attached to the element. 
       
   468 */	
       
   469 		void CreateTOC1ObjectsL(const RAttributeArray&  aAttributes);
       
   470 
       
   471 /** 
       
   472 *  @function SetCurrentHtmlToc1
       
   473 *  @since S60 3.2
       
   474 *  Set HtmlTOC1 Object
       
   475 *  @param aCurrentHtmlToc1   -  Pointyer to HtmlTOC1 Object  
       
   476 */
       
   477 		void SetCurrentHtmlToc1(CCSXHHtmlTOC1 *aCurrentHtmlToc1);
       
   478 		
       
   479 /** 
       
   480 *  @function SetHtmlContentParserPtr
       
   481 *  @since S60 3.2
       
   482 *  Set the pointer of the content parser
       
   483 *  @param aParser   -  Pointer to an html content parser
       
   484 */			 
       
   485 		void SetHtmlContentParserPtr(CCSXHHTMLContentParser* aParser);		
       
   486 		
       
   487 
       
   488 	private:
       
   489  		CCSXHHtmlTOC1 *iCurrentHtmlToc1; 		
       
   490  		CCSXHHTMLContentParser *iParser;
       
   491 	};  
       
   492 
       
   493 /** 
       
   494 * @class CCSXHXMLParseHandler_RedirectFile
       
   495 * This class is used retrive the data from redirect.xml file
       
   496 */	
       
   497 class CCSXHXMLParseHandler_RedirectFile : public CCSXHXMLParseHandler
       
   498 	{
       
   499 	public:
       
   500 /** 
       
   501 *  @function CCSXHXMLParseHandler_RedirectFile
       
   502 *  @since S60 3.2
       
   503 *  Construct a CCSXHXMLParseHandler_RedirectFile 
       
   504 *  @param aCoeEnv 	- Control Environment 
       
   505 *  @param aSourceUid - source uid
       
   506 *  @param aSourceContextname - source context name
       
   507 *  @retrun a CCSXHXMLParseHandler_RedirectFile pointer
       
   508 */	
       
   509 		static CCSXHXMLParseHandler_RedirectFile* NewL(CCoeEnv * aCoeEnv, 
       
   510 				const TUid &aSourceUid, const TCoeContextName &aSourceContextName);
       
   511 
       
   512 	protected:
       
   513 /** 
       
   514 *  @function CCSXHXMLParseHandler_RedirectFile
       
   515 *  @since S60 3.2
       
   516 *  Construct a CCSXHXMLParseHandler_RedirectFile 
       
   517 *  @param aCoeEnv 	- Control Environment 
       
   518 *  @param aSourceUid - source uid
       
   519 *  @param aSourceContextname - source context name
       
   520 */
       
   521 		CCSXHXMLParseHandler_RedirectFile(CCoeEnv * aCoeEnv, 
       
   522 				const TUid &aSourceUid, const TCoeContextName &aSourceContextName);
       
   523 
       
   524 	public:	
       
   525 /** 
       
   526 *  @function StartElement
       
   527 *  @since S60 3.2
       
   528 *  Receive notification of the beginning of an element
       
   529 *  @param aURI		 -  The Namespace URI, or the empty string 
       
   530 						if the element has no Namespace URI or
       
   531 						if Namespace processing is not being performed.  
       
   532 		  aLocalName -  The local name (without prefix)  
       
   533 		  aName		 -  The qualified name  
       
   534 		  apAttrs	 -  The attributes attached to the element. 
       
   535 		  				If there are no attributes, it shall be 
       
   536 		  				an empty array.Namespaces declared in the current 
       
   537 		  				element will be located in the array also 
       
   538 *  @return KErrNone or some of the system-wide Symbian error codes 
       
   539 */	
       
   540 		TInt StartElement (const TDesC8 &aURI, const TDesC8 &aLocalName, 
       
   541 		const TDesC8 &aName, const RAttributeArray &apAttrs);
       
   542 /** 
       
   543 *  @function EndElement
       
   544 *  @since S60 3.2
       
   545 *  Receive notification of the end of an element
       
   546 *  @param aURI		 -  The Namespace URI, or the empty string 
       
   547 						if the element has no Namespace URI or
       
   548 						if Namespace processing is not being performed.  
       
   549 		  aLocalName -  The local name (without prefix)  
       
   550 		  aName		 -  The qualified name  
       
   551 *  @return KErrNone or some of the system-wide Symbian error codes 
       
   552 */		
       
   553 		TInt EndElement  (  const TDesC8 &aURI,const TDesC8 &aLocalName,const TDesC8 &aName);
       
   554 /** 
       
   555 *  @function Characters
       
   556 *  @since S60 3.2
       
   557 *  Receive notification inside an element
       
   558 *  @param aBuff   -  The characters.  
       
   559 *		  aStart  -  The start position in the character buffer.  
       
   560 *		  aLength -  The number of characters to use from the character buffer.  
       
   561 *  @return KErrNone or some of the system-wide Symbian error codes 
       
   562 */		
       
   563 		TInt Characters (const TDesC8 &aBuff, const TInt aStart,
       
   564 			 const TInt aLength); 
       
   565 		
       
   566 		TBool IsTargetPathFound();
       
   567 		TUid TargetUid();
       
   568 		TBuf<KMaxFileName>& TargetContextName();
       
   569 
       
   570 	private:
       
   571 
       
   572 		TCoeContextName iSourceContextName;
       
   573 		TCoeContextName iFromContent;
       
   574 		TBuf<KMaxFileName> iTargetPath; 
       
   575 		TBool iIsFromTag;
       
   576 		TBool iIsToTag;
       
   577 		TBool iIsSourceContextNameFound;
       
   578 		TBool iIsTargetPathFound;
       
   579 		TUid  iTargetUid;
       
   580 		TBuf<KMaxFileName> iTargetContextName;
       
   581 	};
       
   582 #endif