epoc32/include/xmlengserializationoptions.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000 (2010-03-16)
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 /*
     2 * Copyright (c) 2004-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:       Serialization options functions
    15 *
    16 */
    17 
    18 
    19 
    20 
    21 
    22 
    23 
    24 
    25 #ifndef XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED
    26 #define XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED
    27 
    28 #include <e32base.h>
    29 
    30 // FORWARD DECLARATION
    31 class MXmlEngOutputStream;
    32 class MXmlEngDataSerializer;
    33 class MXmlEngNodeFilter;
    34 
    35 /**
    36  * Class allow to set serialization option during document save.
    37  * 
    38  * @lib XmlEngineDOM.lib
    39  * @since S60 v3.1
    40  */
    41 class TXmlEngSerializationOptions 
    42 	{
    43 public:
    44     /** Use indent in output */
    45     static const TUint KOptionIndent                 = 0x01;
    46     /** Skip xml declaration */
    47 	static const TUint KOptionOmitXMLDeclaration     = 0x02;
    48 	/** Add standalone in xml declaration. KOptionOmitXMLDeclaration must not be set */
    49 	static const TUint KOptionStandalone             = 0x04;
    50 	/** Add encoding in xml declaration. KOptionOmitXMLDeclaration must not be set */
    51 	static const TUint KOptionEncoding               = 0x08;
    52 	/** Not supported currently */
    53 	static const TUint KOptionIncludeNsPrefixes      = 0x10;
    54 	/** Not supported currently */
    55 	static const TUint KOptionCDATASectionElements   = 0x20;
    56 	/** Decode base64 encoded binary containers content upon XOP serialization*/
    57 	static const TUint KOptionDecodeBinaryContainers		 = 0x40;	
    58     
    59 	/**
    60      * Constructor
    61      *
    62      * @since S60 v3.1
    63 	 * @param aOptionFlags Serialization options
    64      * @param aEncoding Serialization encoding
    65      */
    66     IMPORT_C TXmlEngSerializationOptions( TUint aOptionFlags = 
    67     								   (TXmlEngSerializationOptions::KOptionIndent | 
    68     									TXmlEngSerializationOptions::KOptionStandalone |
    69     									TXmlEngSerializationOptions::KOptionEncoding), 
    70                                     const TDesC8& aEncoding = KNullDesC8);
    71 
    72 	/**
    73      * Set node filter
    74      *
    75      * @since S60 v3.1
    76 	 * @param aFilter New node filter
    77      */
    78     IMPORT_C void SetNodeFilter(MXmlEngNodeFilter* aFilter);  
    79 
    80 public:
    81 	/** Options flag */
    82     TUint iOptions;
    83 	/** Encoding */
    84     TPtrC8 iEncoding;
    85 	/** Node filter */
    86     MXmlEngNodeFilter* iNodeFilter;
    87     /** Object whose serialization callback is invoked **/
    88     MXmlEngDataSerializer* iDataSerializer;
    89 	};
    90 
    91 
    92 
    93 #endif /* XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED */