epoc32/include/xmlengserializationoptions.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/xmlengserializationoptions.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/xmlengserializationoptions.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,93 @@
     1.4 -xmlengserializationoptions.h
     1.5 +/*
     1.6 +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). 
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* 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
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:       Serialization options functions
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +
    1.24 +
    1.25 +
    1.26 +
    1.27 +
    1.28 +
    1.29 +#ifndef XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED
    1.30 +#define XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED
    1.31 +
    1.32 +#include <e32base.h>
    1.33 +
    1.34 +// FORWARD DECLARATION
    1.35 +class MXmlEngOutputStream;
    1.36 +class MXmlEngDataSerializer;
    1.37 +class MXmlEngNodeFilter;
    1.38 +
    1.39 +/**
    1.40 + * Class allow to set serialization option during document save.
    1.41 + * 
    1.42 + * @lib XmlEngineDOM.lib
    1.43 + * @since S60 v3.1
    1.44 + */
    1.45 +class TXmlEngSerializationOptions 
    1.46 +	{
    1.47 +public:
    1.48 +    /** Use indent in output */
    1.49 +    static const TUint KOptionIndent                 = 0x01;
    1.50 +    /** Skip xml declaration */
    1.51 +	static const TUint KOptionOmitXMLDeclaration     = 0x02;
    1.52 +	/** Add standalone in xml declaration. KOptionOmitXMLDeclaration must not be set */
    1.53 +	static const TUint KOptionStandalone             = 0x04;
    1.54 +	/** Add encoding in xml declaration. KOptionOmitXMLDeclaration must not be set */
    1.55 +	static const TUint KOptionEncoding               = 0x08;
    1.56 +	/** Not supported currently */
    1.57 +	static const TUint KOptionIncludeNsPrefixes      = 0x10;
    1.58 +	/** Not supported currently */
    1.59 +	static const TUint KOptionCDATASectionElements   = 0x20;
    1.60 +	/** Decode base64 encoded binary containers content upon XOP serialization*/
    1.61 +	static const TUint KOptionDecodeBinaryContainers		 = 0x40;	
    1.62 +    
    1.63 +	/**
    1.64 +     * Constructor
    1.65 +     *
    1.66 +     * @since S60 v3.1
    1.67 +	 * @param aOptionFlags Serialization options
    1.68 +     * @param aEncoding Serialization encoding
    1.69 +     */
    1.70 +    IMPORT_C TXmlEngSerializationOptions( TUint aOptionFlags = 
    1.71 +    								   (TXmlEngSerializationOptions::KOptionIndent | 
    1.72 +    									TXmlEngSerializationOptions::KOptionStandalone |
    1.73 +    									TXmlEngSerializationOptions::KOptionEncoding), 
    1.74 +                                    const TDesC8& aEncoding = KNullDesC8);
    1.75 +
    1.76 +	/**
    1.77 +     * Set node filter
    1.78 +     *
    1.79 +     * @since S60 v3.1
    1.80 +	 * @param aFilter New node filter
    1.81 +     */
    1.82 +    IMPORT_C void SetNodeFilter(MXmlEngNodeFilter* aFilter);  
    1.83 +
    1.84 +public:
    1.85 +	/** Options flag */
    1.86 +    TUint iOptions;
    1.87 +	/** Encoding */
    1.88 +    TPtrC8 iEncoding;
    1.89 +	/** Node filter */
    1.90 +    MXmlEngNodeFilter* iNodeFilter;
    1.91 +    /** Object whose serialization callback is invoked **/
    1.92 +    MXmlEngDataSerializer* iDataSerializer;
    1.93 +	};
    1.94 +
    1.95 +
    1.96 +
    1.97 +#endif /* XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED */