websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/inc/SAXTester.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2009 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 #ifndef ADDRESSBOOKENGINE_H
       
    18 #define ADDRESSBOOKENGINE_H
       
    19 
       
    20 #include <SenBaseFragment.h>
       
    21 //#include <RXMLReader.h>
       
    22 #include <SenXmlReader.h>
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class CSAXTester : public CSenBaseFragment
       
    26 	{
       
    27 	public:
       
    28 		static CSAXTester* NewL( const TDesC8& aLocalName );
       
    29 		static CSAXTester* NewL( const TDesC8& aNsUri, const TDesC8& aLocalName );
       
    30 		static CSAXTester* NewL( const TDesC8& aNsUri, const TDesC8& aLocalName, const TDesC8& aQName );
       
    31 		static CSAXTester* NewL( const TDesC8& aNsUri, const TDesC8& aLocalName, const TDesC8& aQName, const RAttributeArray& apAttrs );
       
    32 		static CSAXTester* NewL( const TDesC8& aNsUri, const TDesC8& aLocalName, const TDesC8& aQName, const RAttributeArray& apAttrs, CSenElement& aParent );
       
    33 		static CSAXTester* NewL( CSenElement& aParent );
       
    34 
       
    35 		void ConstructL();
       
    36 		void ConstructL( const TDesC8& aLocalName );
       
    37 		void ConstructL( const TDesC8& aNsUri, const TDesC8& aLocalName );
       
    38 		void ConstructL( const TDesC8& aNsUri, const TDesC8& aLocalName, const TDesC8& aQName );
       
    39 		void ConstructL( const TDesC8& aNsUri, const TDesC8& aLocalName, const TDesC8& aQName, const RAttributeArray& apAttrs );
       
    40 		void ConstructL( const TDesC8& aNsUri, const TDesC8& aLocalName, const TDesC8& aQName, const RAttributeArray& apAttrs, CSenElement& aParent );
       
    41 		void ConstructL( CSenElement& aParent );
       
    42 		
       
    43 		virtual ~CSAXTester();
       
    44 		TBool CheckParsingStatus(TInt aStart, TInt aEnd, TInt aContent );
       
    45 		void SetRunCase(TInt aCase);
       
    46    		CSenBaseFragment* GetDetachedDelegate();
       
    47 		CSenBaseFragment* GetDelegate();
       
    48 	
       
    49 		HBufC8* iAsXml;
       
    50 	protected:
       
    51 		virtual void StartElementL(
       
    52 			const TDesC8& aNsUri,
       
    53 			const TDesC8& aLocalName,
       
    54 			const TDesC8& aQName,
       
    55 			const RAttributeArray& aAttrs
       
    56 			);
       
    57 		virtual void EndElementL(
       
    58 			const TDesC8& aNsUri,
       
    59 			const TDesC8& aLocalName,
       
    60 			const TDesC8& aQName
       
    61 			);
       
    62 
       
    63 		virtual void CharactersL(
       
    64 			const TDesC8& aChars,
       
    65 			TInt aStart,
       
    66 			TInt aLength
       
    67 			);
       
    68 		
       
    69 		CSAXTester();
       
    70 		
       
    71 	private:
       
    72 
       
    73 		CSenXmlReader* iXmlReader;
       
    74 		TInt iStartElem;
       
    75 		TInt iEndElem;
       
    76 		TInt iContent;
       
    77 		TInt iRunCase;
       
    78 		CSenBaseFragment* iDelegate;
       
    79 		
       
    80 
       
    81 };
       
    82 
       
    83 #endif // ADDRESSBOOKENGINE_H
       
    84 
       
    85 // End of File