epoc32/include/xml/dom/xmlengserializationoptions.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 // Copyright (c) 2006-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 // Serialization options functions
    15 //
    16 
    17 
    18 
    19 /**
    20  @file
    21  @publishedAll
    22  @released
    23 */
    24 
    25 #ifndef XMLENGSERIALIZATIONOPTIONS_H
    26 #define XMLENGSERIALIZATIONOPTIONS_H
    27 
    28 #include <e32base.h>
    29 
    30 class MXmlEngOutputStream;
    31 class MXmlEngDataSerializer;
    32 class MXmlEngNodeFilter;
    33 
    34 /**
    35 This class stores serialization options to be used when a document is
    36 serialized.
    37 @see RXmlEngDocument::SaveL()
    38 */
    39 class TXmlEngSerializationOptions 
    40 	{
    41 public:
    42     /** Use indent in output */
    43     static const TUint KOptionIndent                 = 0x01;
    44     /** Skip xml declaration */
    45 	static const TUint KOptionOmitXMLDeclaration     = 0x02;
    46 	/** Add standalone in xml declaration. KOptionOmitXMLDeclaration must not be set */
    47 	static const TUint KOptionStandalone             = 0x04;
    48 	/** Add encoding in xml declaration. KOptionOmitXMLDeclaration must not be set */
    49 	static const TUint KOptionEncoding               = 0x08;
    50 	/** Not supported */
    51 	static const TUint KOptionIncludeNsPrefixes      = 0x10;
    52 	/** Not supported */
    53 	static const TUint KOptionCDATASectionElements   = 0x20;
    54 	/** Decode base64 encoded binary containers content upon XOP serialization */
    55 	static const TUint KOptionDecodeBinaryContainers		 = 0x40;	
    56     
    57 	/**
    58     Constructor
    59 	@param aOptionFlags Serialization options
    60 	@param aEncoding Serialization encoding.  If KNullDesC8, the document
    61 	encoding is used.
    62     */
    63     IMPORT_C TXmlEngSerializationOptions( TUint aOptionFlags = 
    64     								   (TXmlEngSerializationOptions::KOptionIndent | 
    65     									TXmlEngSerializationOptions::KOptionStandalone |
    66     									TXmlEngSerializationOptions::KOptionEncoding), 
    67                                     const TDesC8& aEncoding = KNullDesC8);
    68 
    69 	/**
    70 	Sets a node filter.  The node filter is used to choose which nodes from the
    71 	tree are serialized.  Ownership of the node filter is not transferred and
    72 	the caller is responsible for freeing aFilter.
    73 
    74 	@param aFilter The node filter to set
    75     */
    76     IMPORT_C void SetNodeFilter(MXmlEngNodeFilter* aFilter);  
    77 
    78 	/**
    79 	Sets a data serializer.  Ownership of the data serializer is not
    80 	transferred and the caller is responsbile for freeing aSerializer.
    81 
    82 	@param aSerializer The data serializer to set
    83     */
    84     IMPORT_C void SetDataSerializer(MXmlEngDataSerializer* aSerializer);  
    85 
    86 public:
    87 	/** Options flag */
    88     TUint iOptions;
    89 	/** Encoding */
    90     TPtrC8 iEncoding;
    91 	/** Node filter */
    92     MXmlEngNodeFilter* iNodeFilter;
    93     /** Data serializer */
    94     MXmlEngDataSerializer* iDataSerializer;
    95 	};
    96 
    97 
    98 #endif /* XMLENGSERIALIZATIONOPTIONS_H */
    99