xml/xmllibxml2parser/test/tef/xmlparser2/src/tetestcontenthandler.cpp
changeset 0 e35f40988205
equal deleted inserted replaced
-1:000000000000 0:e35f40988205
       
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file tetestcontenthandler.cpp
       
    18  @internalTechnology
       
    19 */
       
    20 
       
    21 #include "tetestcontenthandler.h"
       
    22 #include <xml/documentparameters.h>
       
    23 #include <xml/parserfeature.h>
       
    24 #include <xml/matchdata.h>
       
    25 
       
    26 using namespace Xml;
       
    27 /**
       
    28  Allocates and constructs a CTestContentHandler object.
       
    29  Initialises all member data to their default values.
       
    30  */
       
    31 CTestContentHandler* CTestContentHandler::NewL()
       
    32 	{
       
    33 	CTestContentHandler* self = new (ELeave) CTestContentHandler();
       
    34 	CleanupStack::PushL(self);
       
    35 	self->ConstructL();
       
    36 	CleanupStack::Pop();
       
    37 	return self;
       
    38 	}
       
    39 /**
       
    40  * Empty routine
       
    41  */
       
    42 CTestContentHandler::~CTestContentHandler()
       
    43 	{
       
    44 	}
       
    45 /**
       
    46  * Empty routine
       
    47  */
       
    48 CTestContentHandler::CTestContentHandler()
       
    49 	{
       
    50 	}
       
    51 /**
       
    52  * Empty routine
       
    53  */
       
    54 void CTestContentHandler::ConstructL()
       
    55 	{
       
    56 	}
       
    57 /**
       
    58  * Empty routine
       
    59  */
       
    60 void CTestContentHandler::OnStartDocumentL(const RDocumentParameters& /*aDocParam*/, TInt aErrorCode)
       
    61 	{
       
    62 	User::LeaveIfError(aErrorCode);
       
    63 	}
       
    64 /**
       
    65  * Empty routine
       
    66  */
       
    67 void CTestContentHandler::OnEndDocumentL(TInt aErrorCode)
       
    68 	{
       
    69 	User::LeaveIfError(aErrorCode);
       
    70 	}
       
    71 /**
       
    72  * Empty routine
       
    73  */
       
    74 void CTestContentHandler::OnStartElementL(const RTagInfo& /*aElement*/,
       
    75 		const Xml::RAttributeArray& /*aAttributes*/, TInt aErrorCode)
       
    76 	{
       
    77 	User::LeaveIfError(aErrorCode);
       
    78 	}
       
    79 /**
       
    80  * Empty routine
       
    81  */
       
    82 void CTestContentHandler::OnEndElementL(const RTagInfo& /*aElement*/,
       
    83 		TInt aErrorCode)
       
    84 	{
       
    85 	User::LeaveIfError(aErrorCode);
       
    86 	}
       
    87 /**
       
    88  * Empty routine
       
    89  */
       
    90 void CTestContentHandler::OnContentL(const TDesC8& /*aBytes*/, TInt aErrorCode)
       
    91 	{
       
    92 	User::LeaveIfError(aErrorCode);
       
    93 	}
       
    94 /**
       
    95  * Empty routine
       
    96  */
       
    97 void CTestContentHandler::OnStartPrefixMappingL(const RString& /*aPrefix*/,
       
    98 		const RString& /*aUri*/, TInt aErrorCode)
       
    99 	{
       
   100 	User::LeaveIfError(aErrorCode);
       
   101 	}
       
   102 /**
       
   103  * Empty routine
       
   104  */
       
   105 void CTestContentHandler::OnEndPrefixMappingL(const RString& /*aPrefix*/,
       
   106 		TInt aErrorCode)
       
   107 	{
       
   108 	User::LeaveIfError(aErrorCode);
       
   109 	}
       
   110 /**
       
   111  * Empty routine
       
   112  */
       
   113 void CTestContentHandler::OnIgnorableWhiteSpaceL(const TDesC8& /*aBytes*/,
       
   114 		TInt aErrorCode)
       
   115 	{
       
   116 	User::LeaveIfError(aErrorCode);
       
   117 	}
       
   118 /**
       
   119  * Empty routine
       
   120  */
       
   121 void CTestContentHandler::OnSkippedEntityL(const RString& /*aName*/, TInt aErrorCode)
       
   122 	{
       
   123 	User::LeaveIfError(aErrorCode);
       
   124 	}
       
   125 /**
       
   126  * Empty routine
       
   127  */
       
   128 void CTestContentHandler::OnProcessingInstructionL(const TDesC8& /*aTarget*/,
       
   129 		const TDesC8& /*aData*/, TInt aErrorCode)
       
   130 	{
       
   131 	User::LeaveIfError(aErrorCode);
       
   132 	}
       
   133 /**
       
   134  * Empty routine
       
   135  */
       
   136 void CTestContentHandler::OnError(TInt aErrorCode)
       
   137 	{
       
   138 	User::LeaveIfError(aErrorCode);
       
   139 	}
       
   140 
       
   141 /** 
       
   142  Obtain the interface matching the specified uid.
       
   143  */
       
   144 TAny* CTestContentHandler::GetExtendedInterface(const TInt32 /*aUid*/)
       
   145 	{
       
   146 	// do nothing.
       
   147 	return NULL;
       
   148 	}
       
   149