williamr@2: /* williamr@2: * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Interface for SAX Parser Callback events. williamr@2: * williamr@2: */ williamr@2: williamr@2: #ifndef __MSENCONTENTHANDLERCLIENT_H williamr@2: #define __MSENCONTENTHANDLERCLIENT_H williamr@2: williamr@2: // INCLUDES williamr@2: #include williamr@2: #include williamr@2: williamr@2: using namespace Xml; williamr@2: williamr@2: // CLASS DECLARATION williamr@2: williamr@2: /** williamr@2: * Interface for SAX Parser Callback events. williamr@2: * If an application (client) needs to be informed of basic parsing events, williamr@2: * it implements this interface and registers an instance with the SAX parser williamr@2: * using the SetContentHandler() method. williamr@2: * The parser uses the instance to report basic document-related events like williamr@2: * the start and end of elements.* williamr@2: * williamr@2: * @lib SenXML.dll williamr@2: * @since Series60 3.0 williamr@2: */ williamr@2: class MSenContentHandlerClient williamr@2: { williamr@2: public: // New functions williamr@2: /** williamr@2: * Receive notification of the beginning of a document. williamr@2: * Called when OnStartDocumentL callback is received from Symbian XML framework. williamr@2: * @return KErrNone or some of the system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt StartDocument() = 0; williamr@2: williamr@2: /** williamr@2: * Receive notification of the end of a document. williamr@2: * Called when OnEndDocumentL callback is received from Symbian XML framework. williamr@2: * @return KErrNone or some of the system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt EndDocument() = 0; williamr@2: williamr@2: /** williamr@2: * Receive notification of the beginning of an element. williamr@2: * Called when OnStartElementL callback is received from Symbian XML framework. williamr@2: * @param aURI: The Namespace URI, or the empty string if the element williamr@2: * has no Namespace URI or if Namespace processing is not williamr@2: * being performed. williamr@2: * @param aLocalName: The local name (without prefix) williamr@2: * @param aName: The qualified name williamr@2: * @param apAttrs: The attributes attached to the element. williamr@2: * If there are no attributes, it shall be an empty array. williamr@2: * Namespaces declared in the current element will be williamr@2: * located in the array also. williamr@2: * williamr@2: * @return KErrNotSupported If the class implementing this williamr@2: * interface doesn't override this. williamr@2: * KErrNone or other system-wide Symbian error codes. williamr@2: */ williamr@2: inline virtual TInt StartElement( const TDesC8& /*aURI*/, williamr@2: const TDesC8& /*aLocalName*/, williamr@2: const TDesC8& /*aName*/, williamr@2: const RAttributeArray& /* apAttrs */) williamr@2: { williamr@2: return KErrNotSupported; williamr@2: } williamr@2: williamr@2: /** williamr@2: * Receive notification of the end of an element. williamr@2: * Called when OnEndElementL callback is received from Symbian XML framework. williamr@2: * @param aURI: The Namespace URI, or the empty string if the element williamr@2: * has no Namespace URI or if Namespace processing is not williamr@2: * being performed. williamr@2: * @param aLocalName: The local name (without prefix) williamr@2: * @param aName: The qualified name williamr@2: * williamr@2: * @return KErrNotSupported If the class implementing this williamr@2: * interface doesn't override this. williamr@2: * KErrNone or other system-wide Symbian error codes. williamr@2: */ williamr@2: inline virtual TInt EndElement( const TDesC8& /*aURI*/, williamr@2: const TDesC8& /*aLocalName*/, williamr@2: const TDesC8& /*aName*/) williamr@2: { williamr@2: return KErrNotSupported; williamr@2: } williamr@2: williamr@2: williamr@2: /** williamr@2: * Receive notification of character data inside an element. williamr@2: * Called when OnContentL callback is received from Symbian XML framework. williamr@2: * @param aBuff: The characters. williamr@2: * @param aStart: The start position in the character buffer. williamr@2: * @param aLength: The number of characters to use from the character buffer. williamr@2: * @return KErrNotSupported If the class implementing this williamr@2: * interface doesn't override this. williamr@2: * KErrNone or other system-wide Symbian error codes. williamr@2: */ williamr@2: inline virtual TInt Characters(const TDesC8& /*aBuf*/, williamr@2: const TInt /*aStart*/, williamr@2: const TInt /*aLength*/) williamr@2: { williamr@2: return KErrNotSupported; williamr@2: } williamr@2: williamr@2: /** williamr@2: * Receive notification of a processing instruction williamr@2: * Called when OnProcessingInstructionL callback is received from Symbian XML framework. williamr@2: * @deprefaceted This method is currently not in use - inlined. williamr@2: * @param aTarget: The processing instruction target. williamr@2: * @param aData: The processing instruction data, williamr@2: * or null if none is supplied. williamr@2: * @return KErrNotSupported If the class implementing this williamr@2: * interface doesn't override this. williamr@2: * KErrNone or other system-wide Symbian error codes. williamr@2: */ williamr@2: inline virtual TInt ProcessingInstructions(const TDesC8& /*aTarget*/, williamr@2: const TDesC8& /*aData*/) williamr@2: { williamr@2: return KErrNotSupported; williamr@2: } williamr@2: williamr@2: /** williamr@2: * Receive notification of a skipped entity. williamr@2: * Called when OnSkippedEntityL callback is received from Symbian XML framework. williamr@2: * @param aName: The name of the skipped entity. williamr@2: * @return KErrNotSupported If the class implementing this williamr@2: * interface doesn't override this. williamr@2: * KErrNone or other system-wide Symbian error codes. williamr@2: */ williamr@2: inline virtual TInt SkippedEntity(const TDesC8& /*aName*/) williamr@2: { williamr@2: return KErrNotSupported; williamr@2: } williamr@2: williamr@2: williamr@2: /** williamr@2: * Receive notification of error situation during parsing. williamr@2: * Called when OnError callback is received from Symbian XML framework. williamr@2: * Complete list of error codes is listed under williamr@2: * @param aErrorCode: Error status code. williamr@2: * @param aSeverity: Error Severity. williamr@2: * @return KErrNotSupported If the class implementing this williamr@2: * interface doesn't override this. williamr@2: * KErrNone or other system-wide Symbian error codes. williamr@2: */ williamr@2: inline virtual TInt Error(TInt /*aErrorCode*/) williamr@2: { williamr@2: return KErrNotSupported; williamr@2: } williamr@2: williamr@2: /** williamr@2: * Receive notification of prefix mapping start. williamr@2: * Called when OnStartPrefixMappingL callback is received from Symbian XML framework. williamr@2: * @param aPrefix: The prefix williamr@2: * @param aUri: The URI mapped to the prefix. williamr@2: * @return KErrNotSupported If the class implementing this williamr@2: * interface doesn't override this. williamr@2: * KErrNone or other system-wide Symbian error codes. williamr@2: */ williamr@2: inline virtual TInt StartPrefixMappingL( const TDesC8& /* aPrefix */, williamr@2: const TDesC8& /* aUri */) williamr@2: { williamr@2: return KErrNotSupported; williamr@2: } williamr@2: williamr@2: /** williamr@2: * Receive notification of prefix mapping end. williamr@2: * Called when OnEndPrefixMappingL callback is received from Symbian XML framework. williamr@2: * @param aPrefix: The prefix williamr@2: * @return KErrNotSupported If the class implementing this williamr@2: * interface doesn't override this. williamr@2: * KErrNone or other system-wide Symbian error codes. williamr@2: */ williamr@2: inline virtual TInt EndPrefixMappingL(const TDesC8& /* aPrefix */) williamr@2: { williamr@2: return KErrNotSupported; williamr@2: } williamr@2: williamr@2: /** williamr@2: * Receive notification of ignorable whitespace in element content. williamr@2: * Called when OnIgnorableWhiteSpaceL callback is received from Symbian XML framework. williamr@2: * @param aBytes: The whitespace characters. williamr@2: * @return KErrNotSupported If the class implementing this williamr@2: * interface doesn't override this. williamr@2: * KErrNone or other system-wide Symbian error codes. williamr@2: */ williamr@2: inline virtual TInt OnIgnorableWhiteSpaceL(const TDesC8& /* aBytes */) williamr@2: { williamr@2: return KErrNotSupported; williamr@2: } williamr@2: williamr@2: /** williamr@2: * Method obtains the interface matching the specified UID. williamr@2: * @param aUid the UID identifying the required interface. williamr@2: * @return NULL if no interface matching the UID is found or method is not williamr@2: * overridden in the implementing class. williamr@2: * Otherwise, the this pointer cast to that interface. williamr@2: */ williamr@2: inline virtual TAny* GetExtendedInterface(const TInt32 /* aUid */) williamr@2: { williamr@2: return NULL; williamr@2: } williamr@2: }; williamr@2: williamr@2: #endif // __MSENCONTENTHANDLERCLIENT_H williamr@2: williamr@2: // End of File